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_message(QString s)
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 new_mesh()
void message(QString )
void error(QString )
void feature_range_changed()
void update_view_mode()
void image_slice_settings_changed()
void ffc_paint_mode_changed()
void repaint()

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< StudioParticles > particles)
int get_num_particles()
Return the total number of particles for all domains, combined.
ParticleSystem 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
QVector< QSharedPointer< Shape > > get_shapes()
return all 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()
QSharedPointer< 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 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_window_and_level()
void set_image_sync_slice(bool enabled)
bool get_image_sync_slice()
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(StudioParticles particles)
StudioParticles get_difference_particles()
void set_compare_settings(CompareSettings settings)
CompareSettings get_compare_settings()
void trigger_repaint()
void set_display_mode(DisplayMode mode)
set display mode (original, groomed, reconstructed)
DisplayMode get_display_mode()
return the current display mode
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_message

void handle_message(
    QString s
)

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 new_mesh

void new_mesh()

signal message

void message(
    QString 
)

signal error

void error(
    QString 
)

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()

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< StudioParticles > particles
)

function get_num_particles

int get_num_particles()

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

function get_local_particle_system

ParticleSystem 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

QVector< QSharedPointer< Shape > > get_shapes()

return all 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 QSharedPointer< 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 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_window_and_level

bool get_image_share_window_and_level()

function set_image_sync_slice

void set_image_sync_slice(
    bool enabled
)

function get_image_sync_slice

bool get_image_sync_slice()

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(
    StudioParticles particles
)

function get_difference_particles

inline StudioParticles 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 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 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 2022-07-23 at 17:50:04 -0600