Skip to content

shapeworks::Shape

Representation of a single shape/patient/subject.

#include <Shape.h>

Public Classes

Name
class Point
TODO: replace this wherever it is used.

Public Functions

Name
Shape()
~Shape()
std::string get_display_name()
MeshGroup get_meshes(DisplayMode display_mode, bool wait =false)
void set_annotations(std::vector< std::string > annotations, bool only_overwrite_blank =true)
std::vector< std::string > get_annotations()
void set_mesh_manager(std::shared_ptr< MeshManager > mesh_manager)
void set_subject(std::shared_ptr< shapeworks::Subject > subject)
bool is_subject()
Is this shape a population subject (e.g. mean/pca constructions are not)
std::shared_ptr< shapeworks::Subject > get_subject()
Return the pointer to the subject object.
bool is_fixed()
Helper to ask if this shape is fixed or not.
bool is_excluded()
Helper to ask if this shape is excluded.
void import_original_file(const std::string & filename)
Import the original raw mesh or image file.
MeshGroup get_original_meshes(bool wait =false)
Retrieve the original meshes.
MeshGroup get_groomed_meshes(bool wait =false)
Retrieve the groomed meshes.
MeshGroup get_reconstructed_meshes(bool wait =false)
Retrieve the reconstructed meshes.
void set_reconstructed_meshes(MeshGroup meshes)
Set the reconstructed meshes.
void reset_groomed_mesh()
Reset the groomed mesh so that it will be re-created.
bool import_global_point_files(std::vector< std::string > filenames)
Import global correspondence point files.
bool import_local_point_files(std::vector< std::string > filenames)
Import local correspondence point files.
bool import_landmarks_files(std::vector< std::string > filenames)
Import landmarks files.
bool store_landmarks()
Store landmarks.
bool import_constraints(std::vector< std::string > filenames)
import constraints
bool store_constraints()
Store constraints.
void set_particles(Particles particles)
Set particles.
Particles get_particles()
Get particles.
void set_particle_transform(vtkSmartPointer< vtkTransform > transform)
Set the particle transform (alignment)
void set_groomed_centroids(const std::vector< Eigen::Vector3d > & centroids)
Set per-domain centroid offsets for world-space positioning.
void set_alignment_type(int alignment)
Set the alignment type.
Eigen::VectorXd get_global_correspondence_points()
Get the global correspondence points.
std::vector< Eigen::VectorXd > get_particles_for_display()
Get the global correspondence points for display.
Eigen::VectorXd get_local_correspondence_points()
Get the local correspondence points.
void clear_reconstructed_mesh()
int get_id()
Get the id of this shape.
void set_id(int id)
Set the id of this shape.
void update_annotations()
Update the name of this shape.
std::vector< std::string > get_original_filenames()
std::vector< std::string > get_original_filenames_with_path()
std::string get_original_filename()
std::string get_original_filename_with_path()
std::string get_groomed_filename()
std::string get_groomed_filename_with_path(int domain)
std::string get_global_point_filename()
std::string get_global_point_filename_with_path()
std::string get_local_point_filename()
std::string get_local_point_filename_with_path()
void set_transform(vtkSmartPointer< vtkTransform > transform)
vtkSmartPointer< vtkTransform > get_transform(int domain =0)
vtkSmartPointer< vtkTransform > get_inverse_transform(int domain =0)
bool has_alignment()
vtkSmartPointer< vtkTransform > get_original_transform(int domain =0)
void set_reconstruction_transforms(std::vector< vtkSmartPointer< vtkTransform > > transforms)
vtkSmartPointer< vtkTransform > get_reconstruction_transform(int domain)
vtkSmartPointer< vtkTransform > get_groomed_transform(int domain =0)
std::vector< Eigen::Vector3d > get_groomed_centroids()
Get the centroid of each groomed mesh domain.
vtkSmartPointer< vtkTransform > get_procrustes_transform(int domain =0)
std::vector< vtkSmartPointer< vtkTransform > > get_procrustes_transforms()
vtkSmartPointer< vtkTransform > get_alignment(int domain =0)
void load_feature(DisplayMode display_mode, std::string feature)
std::shared_ptr< Image > get_image_volume(std::string image_volume_name)
std::shared_ptr< Image > get_segmentation()
std::string get_segmentation_filename()
Eigen::VectorXd get_point_features(std::string feature)
void set_point_features(std::string feature, Eigen::VectorXd values)
void load_feature_from_scalar_file(std::string filename, std::string feature_name)
void set_override_feature(std::string feature)
std::string get_override_feature()
Eigen::MatrixXd & landmarks()
std::vector< Constraints > & constraints()
Constraints & get_constraints(int domain_id)
bool has_constraints()
bool has_planes()
std::vector< std::shared_ptr< Surface > > get_groomed_mesh_wrappers()
void recompute_original_surface()
void ensure_segmentation()
If a segmentation doesn't exist, create a blank canvas.

Public Functions Documentation

function Shape

cpp Shape()

function ~Shape

cpp ~Shape()

function get_display_name

cpp std::string get_display_name()

function get_meshes

cpp MeshGroup get_meshes( DisplayMode display_mode, bool wait =false )

function set_annotations

cpp void set_annotations( std::vector< std::string > annotations, bool only_overwrite_blank =true )

function get_annotations

cpp std::vector< std::string > get_annotations()

function set_mesh_manager

cpp void set_mesh_manager( std::shared_ptr< MeshManager > mesh_manager )

function set_subject

cpp void set_subject( std::shared_ptr< shapeworks::Subject > subject )

function is_subject

cpp bool is_subject()

Is this shape a population subject (e.g. mean/pca constructions are not)

function get_subject

cpp std::shared_ptr< shapeworks::Subject > get_subject()

Return the pointer to the subject object.

function is_fixed

cpp bool is_fixed()

Helper to ask if this shape is fixed or not.

function is_excluded

cpp bool is_excluded()

Helper to ask if this shape is excluded.

function import_original_file

cpp void import_original_file( const std::string & filename )

Import the original raw mesh or image file.

function get_original_meshes

cpp MeshGroup get_original_meshes( bool wait =false )

Retrieve the original meshes.

function get_groomed_meshes

cpp MeshGroup get_groomed_meshes( bool wait =false )

Retrieve the groomed meshes.

function get_reconstructed_meshes

cpp MeshGroup get_reconstructed_meshes( bool wait =false )

Retrieve the reconstructed meshes.

function set_reconstructed_meshes

cpp void set_reconstructed_meshes( MeshGroup meshes )

Set the reconstructed meshes.

function reset_groomed_mesh

cpp void reset_groomed_mesh()

Reset the groomed mesh so that it will be re-created.

function import_global_point_files

cpp bool import_global_point_files( std::vector< std::string > filenames )

Import global correspondence point files.

function import_local_point_files

cpp bool import_local_point_files( std::vector< std::string > filenames )

Import local correspondence point files.

function import_landmarks_files

cpp bool import_landmarks_files( std::vector< std::string > filenames )

Import landmarks files.

function store_landmarks

cpp bool store_landmarks()

Store landmarks.

function import_constraints

cpp bool import_constraints( std::vector< std::string > filenames )

import constraints

function store_constraints

cpp bool store_constraints()

Store constraints.

function set_particles

cpp void set_particles( Particles particles )

Set particles.

function get_particles

cpp Particles get_particles()

Get particles.

function set_particle_transform

cpp void set_particle_transform( vtkSmartPointer< vtkTransform > transform )

Set the particle transform (alignment)

function set_groomed_centroids

cpp void set_groomed_centroids( const std::vector< Eigen::Vector3d > & centroids )

Set per-domain centroid offsets for world-space positioning.

function set_alignment_type

cpp void set_alignment_type( int alignment )

Set the alignment type.

function get_global_correspondence_points

cpp Eigen::VectorXd get_global_correspondence_points()

Get the global correspondence points.

function get_particles_for_display

cpp std::vector< Eigen::VectorXd > get_particles_for_display()

Get the global correspondence points for display.

function get_local_correspondence_points

cpp Eigen::VectorXd get_local_correspondence_points()

Get the local correspondence points.

function clear_reconstructed_mesh

cpp void clear_reconstructed_mesh()

function get_id

cpp int get_id()

Get the id of this shape.

function set_id

cpp void set_id( int id )

Set the id of this shape.

function update_annotations

cpp void update_annotations()

Update the name of this shape.

function get_original_filenames

cpp std::vector< std::string > get_original_filenames()

function get_original_filenames_with_path

cpp std::vector< std::string > get_original_filenames_with_path()

function get_original_filename

cpp std::string get_original_filename()

function get_original_filename_with_path

cpp std::string get_original_filename_with_path()

function get_groomed_filename

cpp std::string get_groomed_filename()

function get_groomed_filename_with_path

cpp std::string get_groomed_filename_with_path( int domain )

function get_global_point_filename

cpp std::string get_global_point_filename()

function get_global_point_filename_with_path

cpp std::string get_global_point_filename_with_path()

function get_local_point_filename

cpp std::string get_local_point_filename()

function get_local_point_filename_with_path

cpp std::string get_local_point_filename_with_path()

function set_transform

cpp void set_transform( vtkSmartPointer< vtkTransform > transform )

function get_transform

cpp vtkSmartPointer< vtkTransform > get_transform( int domain =0 )

function get_inverse_transform

cpp vtkSmartPointer< vtkTransform > get_inverse_transform( int domain =0 )

function has_alignment

cpp bool has_alignment()

function get_original_transform

cpp vtkSmartPointer< vtkTransform > get_original_transform( int domain =0 )

function set_reconstruction_transforms

cpp void set_reconstruction_transforms( std::vector< vtkSmartPointer< vtkTransform > > transforms )

function get_reconstruction_transform

cpp vtkSmartPointer< vtkTransform > get_reconstruction_transform( int domain )

function get_groomed_transform

cpp vtkSmartPointer< vtkTransform > get_groomed_transform( int domain =0 )

function get_groomed_centroids

cpp std::vector< Eigen::Vector3d > get_groomed_centroids()

Get the centroid of each groomed mesh domain.

function get_procrustes_transform

cpp vtkSmartPointer< vtkTransform > get_procrustes_transform( int domain =0 )

function get_procrustes_transforms

cpp std::vector< vtkSmartPointer< vtkTransform > > get_procrustes_transforms()

function get_alignment

cpp vtkSmartPointer< vtkTransform > get_alignment( int domain =0 )

function load_feature

cpp void load_feature( DisplayMode display_mode, std::string feature )

function get_image_volume

cpp std::shared_ptr< Image > get_image_volume( std::string image_volume_name )

function get_segmentation

cpp std::shared_ptr< Image > get_segmentation()

function get_segmentation_filename

cpp inline std::string get_segmentation_filename()

function get_point_features

cpp Eigen::VectorXd get_point_features( std::string feature )

function set_point_features

cpp void set_point_features( std::string feature, Eigen::VectorXd values )

function load_feature_from_scalar_file

cpp void load_feature_from_scalar_file( std::string filename, std::string feature_name )

function set_override_feature

cpp void set_override_feature( std::string feature )

function get_override_feature

cpp std::string get_override_feature()

function landmarks

cpp Eigen::MatrixXd & landmarks()

function constraints

cpp std::vector< Constraints > & constraints()

function get_constraints

cpp Constraints & get_constraints( int domain_id )

function has_constraints

cpp bool has_constraints()

function has_planes

cpp bool has_planes()

function get_groomed_mesh_wrappers

cpp std::vector< std::shared_ptr< Surface > > get_groomed_mesh_wrappers()

function recompute_original_surface

cpp void recompute_original_surface()

function ensure_segmentation

cpp void ensure_segmentation()

If a segmentation doesn't exist, create a blank canvas.


Updated on 2026-03-31 at 16:02:10 +0000