Skip to content

shapeworks::Session

Representation of a session. More...

#include <Session.h>

Inherits from QObject, QEnableSharedFromThis< Session >

Public Slots

Name
void set_feature_auto_scale(bool value)
void set_landmark_drag_mode(bool mode)
bool get_landmark_drag_mode()
void handle_clear_cache()
void handle_new_mesh()
void handle_thread_complete()

Public Signals

Name
void data_changed()
signal that the data has changed
void points_changed()
void landmarks_changed()
void planes_changed()
void ffc_changed()
void update_display()
void reset_stats()
void new_mesh()
void feature_range_changed()
void update_view_mode()
void image_slice_settings_changed()
void ffc_paint_mode_changed()
void repaint()
void reinsert_shapes()
void annotations_changed()
void save()

Public Functions

Name
Session(QWidget * parent, Preferences & prefs)
constructor
~Session()
destructor
void set_parent(QWidget * parent)
set QWidget parent
bool save_project(QString filename)
save project to file
bool load_project(QString filename)
load project from file
bool load_light_project(QString filename)
read a lightweight project file
bool load_xl_project(QString filename)
load a shapeworks project
void set_project_path(QString relative_path)
std::shared_ptr< shapeworks::Project > get_project()
void load_original_files(std::vector< std::string > filenames)
import files
void load_groomed_files(std::vector< std::string > file_names, double iso, int domains_per_shape)
load groomed files
bool load_point_files(std::vector< std::string > local, std::vector< std::string > world, int domains_per_shape)
bool update_particles(std::vector< Particles > particles)
int get_num_particles()
Return the total number of particles for all domains, combined.
ParticleSystemEvaluation get_local_particle_system(int domain)
void update_procrustes_transforms(std::vector< std::vector< std::vector< double > > > transforms)
bool is_light_project()
bool get_groomed_present()
void remove_shapes(QList< int > list)
remove shapes
ShapeList get_shapes()
return all shapes
ShapeList get_non_excluded_shapes()
return all non-excluded shapes
void calculate_reconstructed_samples()
QString get_filename()
get the filename
QString get_display_name()
get file display name
bool original_present()
bool groomed_present()
bool particles_present()
bool groups_available()
int get_num_shapes()
int get_domains_per_shape()
std::string get_default_feature_map()
std::shared_ptr< MeshManager > get_mesh_manager()
shapeworks::Parameters & parameters()
std::vector< DomainType > get_groomed_domain_types()
double update_auto_glyph_size()
double get_auto_glyph_size()
void clear_particles()
clear particles from session (e.g. groom start, optimize start)
bool get_feature_auto_scale()
double get_feature_range_max()
double get_feature_range_min()
void set_feature_range(double min, double max)
void set_feature_range_min(double value)
void set_feature_range_max(double value)
void handle_ctrl_click(PickResult result)
void trigger_landmarks_changed()
void trigger_planes_changed()
void trigger_ffc_changed()
void trigger_annotations_changed()
void trigger_save()
void trigger_data_changed()
void reload_particles()
void set_active_landmark_domain(int id)
int get_active_landmark_domain()
void set_placing_landmark(int id)
int get_placing_landmark()
void set_landmarks_active(bool active)
bool get_landmarks_active()
void set_planes_active(bool active)
bool get_planes_active()
void set_show_landmark_labels(bool show)
bool get_show_landmark_labels()
void set_show_planes(bool show)
bool get_show_planes()
bool should_show_planes()
void set_show_landmarks(bool show)
bool get_show_landmarks()
bool set_image_name(std::string image_name)
std::string get_image_name()
void set_image_axis(QString axis)
Axis get_image_axis()
void set_image_3d_mode(bool mode)
bool get_image_3d_mode()
void set_image_share_window_and_level(bool enabled)
bool get_image_share_brightness_contrast()
void set_image_sync_slice(bool enabled)
bool get_image_sync_slice()
void set_image_thickness_feature(bool enabled)
bool get_image_thickness_feature()
void set_feature_map(std::string feature_map)
std::string get_feature_map()
bool has_constraints()
void set_loading(bool loading)
bool is_loading()
void set_tool_state(std::string state)
std::string get_tool_state()
bool is_analysis_mode()
void set_ffc_paint_active(bool enabled)
bool get_ffc_paint_active()
void set_ffc_paint_mode_inclusive(bool inclusive)
bool get_ffc_paint_mode_inclusive()
void set_ffc_paint_size(double size)
double get_ffc_paint_size()
bool get_show_good_bad_particles()
void set_show_good_bad_particles(bool enabled)
bool get_show_difference_vectors()
void set_show_difference_vectors(bool enabled)
bool should_difference_vectors_show()
std::vector< bool > get_good_bad_particles()
void set_good_bad_particles(const std::vector< bool > & good_bad)
void set_difference_particles(Particles particles)
Particles get_difference_particles()
void set_compare_settings(CompareSettings settings)
CompareSettings get_compare_settings()
void trigger_repaint()
void trigger_reinsert_shapes()
void set_display_mode(DisplayMode mode)
set display mode (original, groomed, reconstructed)
DisplayMode get_display_mode()
return the current display mode
void set_glyph_lut(vtkSmartPointer< vtkLookupTable > lut)
vtkSmartPointer< vtkLookupTable > get_glyph_lut()
void set_py_worker(QSharedPointer< PythonWorker > worker)
QSharedPointer< PythonWorker > get_py_worker()
Eigen::MatrixXd get_all_particles()
Return all world particles (number of shapes, 3 x num particles)
Eigen::MatrixXd get_all_scalars(std::string target_feature)
Return all scalars for all shapes, given target feature.
bool is_supported_file_format(std::string filename)
Point3 get_point(const Eigen::VectorXd & points, int i)

Public Attributes

Name
const std::string DATA_C
const std::string GROOM_C
const std::string OPTIMIZE_C
const std::string ANALYSIS_C
const std::string DEEPSSM_C

Detailed Description

class shapeworks::Session;

Representation of a session.

The Session class encapsulates everything about a session/project.

Public Slots Documentation

slot set_feature_auto_scale

void set_feature_auto_scale(
    bool value
)

slot set_landmark_drag_mode

void set_landmark_drag_mode(
    bool mode
)

slot get_landmark_drag_mode

bool get_landmark_drag_mode()

slot handle_clear_cache

void handle_clear_cache()

slot handle_new_mesh

void handle_new_mesh()

slot handle_thread_complete

void handle_thread_complete()

Public Signals Documentation

signal data_changed

void data_changed()

signal that the data has changed

signal points_changed

void points_changed()

signal landmarks_changed

void landmarks_changed()

signal planes_changed

void planes_changed()

signal ffc_changed

void ffc_changed()

signal update_display

void update_display()

signal reset_stats

void reset_stats()

signal new_mesh

void new_mesh()

signal feature_range_changed

void feature_range_changed()

signal update_view_mode

void update_view_mode()

signal image_slice_settings_changed

void image_slice_settings_changed()

signal ffc_paint_mode_changed

void ffc_paint_mode_changed()

signal repaint

void repaint()

signal reinsert_shapes

void reinsert_shapes()

signal annotations_changed

void annotations_changed()

signal save

void save()

Public Functions Documentation

function Session

Session(
    QWidget * parent,
    Preferences & prefs
)

constructor

function ~Session

~Session()

destructor

function set_parent

void set_parent(
    QWidget * parent
)

set QWidget parent

function save_project

bool save_project(
    QString filename
)

save project to file

function load_project

bool load_project(
    QString filename
)

load project from file

function load_light_project

bool load_light_project(
    QString filename
)

read a lightweight project file

function load_xl_project

bool load_xl_project(
    QString filename
)

load a shapeworks project

function set_project_path

void set_project_path(
    QString relative_path
)

function get_project

std::shared_ptr< shapeworks::Project > get_project()

function load_original_files

void load_original_files(
    std::vector< std::string > filenames
)

import files

function load_groomed_files

void load_groomed_files(
    std::vector< std::string > file_names,
    double iso,
    int domains_per_shape
)

load groomed files

function load_point_files

bool load_point_files(
    std::vector< std::string > local,
    std::vector< std::string > world,
    int domains_per_shape
)

function update_particles

bool update_particles(
    std::vector< Particles > particles
)

function get_num_particles

int get_num_particles()

Return the total number of particles for all domains, combined.

function get_local_particle_system

ParticleSystemEvaluation get_local_particle_system(
    int domain
)

function update_procrustes_transforms

void update_procrustes_transforms(
    std::vector< std::vector< std::vector< double > > > transforms
)

function is_light_project

bool is_light_project()

function get_groomed_present

bool get_groomed_present()

function remove_shapes

void remove_shapes(
    QList< int > list
)

remove shapes

function get_shapes

ShapeList get_shapes()

return all shapes

function get_non_excluded_shapes

ShapeList get_non_excluded_shapes()

return all non-excluded shapes

function calculate_reconstructed_samples

void calculate_reconstructed_samples()

function get_filename

QString get_filename()

get the filename

function get_display_name

QString get_display_name()

get file display name

function original_present

bool original_present()

function groomed_present

bool groomed_present()

function particles_present

bool particles_present()

function groups_available

bool groups_available()

function get_num_shapes

int get_num_shapes()

function get_domains_per_shape

int get_domains_per_shape()

function get_default_feature_map

std::string get_default_feature_map()

function get_mesh_manager

inline std::shared_ptr< MeshManager > get_mesh_manager()

function parameters

shapeworks::Parameters & parameters()

function get_groomed_domain_types

std::vector< DomainType > get_groomed_domain_types()

function update_auto_glyph_size

double update_auto_glyph_size()

function get_auto_glyph_size

double get_auto_glyph_size()

function clear_particles

void clear_particles()

clear particles from session (e.g. groom start, optimize start)

function get_feature_auto_scale

bool get_feature_auto_scale()

function get_feature_range_max

double get_feature_range_max()

function get_feature_range_min

double get_feature_range_min()

function set_feature_range

void set_feature_range(
    double min,
    double max
)

function set_feature_range_min

void set_feature_range_min(
    double value
)

function set_feature_range_max

void set_feature_range_max(
    double value
)

function handle_ctrl_click

void handle_ctrl_click(
    PickResult result
)

function trigger_landmarks_changed

void trigger_landmarks_changed()

function trigger_planes_changed

void trigger_planes_changed()

function trigger_ffc_changed

void trigger_ffc_changed()

function trigger_annotations_changed

void trigger_annotations_changed()

function trigger_save

void trigger_save()

function trigger_data_changed

void trigger_data_changed()

function reload_particles

void reload_particles()

function set_active_landmark_domain

void set_active_landmark_domain(
    int id
)

function get_active_landmark_domain

int get_active_landmark_domain()

function set_placing_landmark

void set_placing_landmark(
    int id
)

function get_placing_landmark

int get_placing_landmark()

function set_landmarks_active

void set_landmarks_active(
    bool active
)

function get_landmarks_active

bool get_landmarks_active()

function set_planes_active

void set_planes_active(
    bool active
)

function get_planes_active

bool get_planes_active()

function set_show_landmark_labels

void set_show_landmark_labels(
    bool show
)

function get_show_landmark_labels

bool get_show_landmark_labels()

function set_show_planes

void set_show_planes(
    bool show
)

function get_show_planes

bool get_show_planes()

function should_show_planes

bool should_show_planes()

function set_show_landmarks

void set_show_landmarks(
    bool show
)

function get_show_landmarks

bool get_show_landmarks()

function set_image_name

bool set_image_name(
    std::string image_name
)

function get_image_name

std::string get_image_name()

function set_image_axis

void set_image_axis(
    QString axis
)

function get_image_axis

Axis get_image_axis()

function set_image_3d_mode

void set_image_3d_mode(
    bool mode
)

function get_image_3d_mode

bool get_image_3d_mode()

function set_image_share_window_and_level

void set_image_share_window_and_level(
    bool enabled
)

function get_image_share_brightness_contrast

bool get_image_share_brightness_contrast()

function set_image_sync_slice

void set_image_sync_slice(
    bool enabled
)

function get_image_sync_slice

bool get_image_sync_slice()

function set_image_thickness_feature

void set_image_thickness_feature(
    bool enabled
)

function get_image_thickness_feature

bool get_image_thickness_feature()

function set_feature_map

void set_feature_map(
    std::string feature_map
)

function get_feature_map

std::string get_feature_map()

function has_constraints

bool has_constraints()

function set_loading

void set_loading(
    bool loading
)

function is_loading

bool is_loading()

function set_tool_state

void set_tool_state(
    std::string state
)

function get_tool_state

std::string get_tool_state()

function is_analysis_mode

bool is_analysis_mode()

function set_ffc_paint_active

void set_ffc_paint_active(
    bool enabled
)

function get_ffc_paint_active

bool get_ffc_paint_active()

function set_ffc_paint_mode_inclusive

void set_ffc_paint_mode_inclusive(
    bool inclusive
)

function get_ffc_paint_mode_inclusive

bool get_ffc_paint_mode_inclusive()

function set_ffc_paint_size

void set_ffc_paint_size(
    double size
)

function get_ffc_paint_size

double get_ffc_paint_size()

function get_show_good_bad_particles

bool get_show_good_bad_particles()

function set_show_good_bad_particles

void set_show_good_bad_particles(
    bool enabled
)

function get_show_difference_vectors

bool get_show_difference_vectors()

function set_show_difference_vectors

void set_show_difference_vectors(
    bool enabled
)

function should_difference_vectors_show

bool should_difference_vectors_show()

function get_good_bad_particles

std::vector< bool > get_good_bad_particles()

function set_good_bad_particles

void set_good_bad_particles(
    const std::vector< bool > & good_bad
)

function set_difference_particles

inline void set_difference_particles(
    Particles particles
)

function get_difference_particles

inline Particles get_difference_particles()

function set_compare_settings

void set_compare_settings(
    CompareSettings settings
)

function get_compare_settings

CompareSettings get_compare_settings()

function trigger_repaint

void trigger_repaint()

function trigger_reinsert_shapes

void trigger_reinsert_shapes()

function set_display_mode

void set_display_mode(
    DisplayMode mode
)

set display mode (original, groomed, reconstructed)

function get_display_mode

DisplayMode get_display_mode()

return the current display mode

function set_glyph_lut

inline void set_glyph_lut(
    vtkSmartPointer< vtkLookupTable > lut
)

function get_glyph_lut

inline vtkSmartPointer< vtkLookupTable > get_glyph_lut()

function set_py_worker

inline void set_py_worker(
    QSharedPointer< PythonWorker > worker
)

function get_py_worker

inline QSharedPointer< PythonWorker > get_py_worker()

function get_all_particles

Eigen::MatrixXd get_all_particles()

Return all world particles (number of shapes, 3 x num particles)

function get_all_scalars

Eigen::MatrixXd get_all_scalars(
    std::string target_feature
)

Return all scalars for all shapes, given target feature.

function is_supported_file_format

static bool is_supported_file_format(
    std::string filename
)

function get_point

static Point3 get_point(
    const Eigen::VectorXd & points,
    int i
)

Public Attributes Documentation

variable DATA_C

static const std::string DATA_C;

variable GROOM_C

static const std::string GROOM_C;

variable OPTIMIZE_C

static const std::string OPTIMIZE_C;

variable ANALYSIS_C

static const std::string ANALYSIS_C;

variable DEEPSSM_C

static const std::string DEEPSSM_C;

Updated on 2024-03-17 at 12:58:44 -0600