Skip to content

shapeworks::Project

Representation of a project. More...

#include <Project.h>

Public Functions

Name
Project()
~Project()
bool load(const std::string & filename)
Load from project file.
bool save(const std::string & filename ="")
Save to project file.
void set_project_path(const std::string & path)
Set the project path.
std::string get_project_path()
Return the project path.
std::string get_filename()
Return the filename.
void set_filename(std::string filename)
Set project filename.
std::vector< std::string > get_headers()
Return the headers of the subject sheet.
std::vector< std::string > get_string_column(const std::string & name) const
Return a column by name.
int get_number_of_subjects()
Return the number of subjects in the project.
int get_number_of_domains_per_subject()
Return the number of domains.
std::vector< std::string > get_domain_names()
Return the domain names (e.g. femur, pelvis, etc)
void set_domain_names(std::vector< std::string > domain_names)
Set the domain names.
std::vector< std::shared_ptr< Subject > > & get_subjects()
Return the Subjects (as a reference)
std::vector< std::shared_ptr< Subject > > get_non_excluded_subjects()
Return the non-excluded Subjects (as a reference)
void set_subjects(const std::vector< std::shared_ptr< Subject > > & subjects)
Set the Subjects.
void update_subjects()
bool get_originals_present() const
Return if originals are present.
bool get_groomed_present() const
Return if groomed files are present.
bool get_particles_present() const
Return if particle files are present.
bool get_images_present()
Return if images are present (e.g. CT/MRI)
bool get_fixed_subjects_present()
Return if there are fixed subjects present.
bool get_excluded_subjects_present()
Return if there are excluded subjects present.
std::vector< std::string > get_feature_names()
Get feature names.
std::vector< std::string > get_image_names()
Get image names.
std::vector< std::string > get_group_names()
Get group names.
std::vector< std::string > get_group_values(const std::string & group_name) const
Get possible group values.
Parameters get_parameters(const std::string & name, std::string domain_name ="")
Retrieve parameters based on key.
std::map< std::string, Parameters > get_parameter_map(const std::string & name)
Retrieve full parameter map for a given name.
void set_parameter_map(const std::string & name, std::map< std::string, Parameters > map)
Set parameter map for a given name.
void set_parameters(const std::string & name, Parameters params, std::string domain_name ="")
Store parameters based on key.
void clear_parameters(const std::string & name)
Clear parameters based on key.
int get_supported_version() const
Get the supported version (this version of the code)
int get_version() const
Get the version of the currently loaded project.
std::vector< LandmarkDefinition > get_landmarks(int domain_id)
Return the set of landmarks definitions for a particular domain.
std::vector< std::vector< LandmarkDefinition > > get_all_landmark_definitions()
Return all landmark definitions.
void set_landmark_definitions(std::vector< std::vector< LandmarkDefinition > > defs)
Set all landmark definitions.
bool get_landmarks_present()
Return if landmarks are present.
void set_landmarks(int domain_id, std::vector< LandmarkDefinition > landmarks)
Set landmarks for this project.
void new_landmark(int domain_id)
Add a new landmark.
std::vector< DomainType > get_original_domain_types()
Return the original domain types.
std::vector< DomainType > get_groomed_domain_types()
Return the groomed domain types.
void set_original_domain_types(std::vector< DomainType > domain_types)
Set the original domain types.
void set_groomed_domain_types(std::vector< DomainType > domain_types)
Get the groomed domain types.

Detailed Description

class shapeworks::Project;

Representation of a project.

The Project class encapsulates the spreadsheet based file format for storing project data.

Public Functions Documentation

function Project

Project()

function ~Project

~Project()

function load

bool load(
    const std::string & filename
)

Load from project file.

function save

bool save(
    const std::string & filename =""
)

Save to project file.

function set_project_path

void set_project_path(
    const std::string & path
)

Set the project path.

function get_project_path

std::string get_project_path()

Return the project path.

function get_filename

std::string get_filename()

Return the filename.

function set_filename

void set_filename(
    std::string filename
)

Set project filename.

function get_headers

std::vector< std::string > get_headers()

Return the headers of the subject sheet.

function get_string_column

std::vector< std::string > get_string_column(
    const std::string & name
) const

Return a column by name.

function get_number_of_subjects

int get_number_of_subjects()

Return the number of subjects in the project.

function get_number_of_domains_per_subject

int get_number_of_domains_per_subject()

Return the number of domains.

function get_domain_names

std::vector< std::string > get_domain_names()

Return the domain names (e.g. femur, pelvis, etc)

function set_domain_names

void set_domain_names(
    std::vector< std::string > domain_names
)

Set the domain names.

function get_subjects

std::vector< std::shared_ptr< Subject > > & get_subjects()

Return the Subjects (as a reference)

function get_non_excluded_subjects

std::vector< std::shared_ptr< Subject > > get_non_excluded_subjects()

Return the non-excluded Subjects (as a reference)

function set_subjects

void set_subjects(
    const std::vector< std::shared_ptr< Subject > > & subjects
)

Set the Subjects.

function update_subjects

void update_subjects()

function get_originals_present

bool get_originals_present() const

Return if originals are present.

function get_groomed_present

bool get_groomed_present() const

Return if groomed files are present.

function get_particles_present

bool get_particles_present() const

Return if particle files are present.

function get_images_present

bool get_images_present()

Return if images are present (e.g. CT/MRI)

function get_fixed_subjects_present

bool get_fixed_subjects_present()

Return if there are fixed subjects present.

function get_excluded_subjects_present

bool get_excluded_subjects_present()

Return if there are excluded subjects present.

function get_feature_names

std::vector< std::string > get_feature_names()

Get feature names.

function get_image_names

std::vector< std::string > get_image_names()

Get image names.

function get_group_names

std::vector< std::string > get_group_names()

Get group names.

function get_group_values

std::vector< std::string > get_group_values(
    const std::string & group_name
) const

Get possible group values.

function get_parameters

Parameters get_parameters(
    const std::string & name,
    std::string domain_name =""
)

Retrieve parameters based on key.

function get_parameter_map

std::map< std::string, Parameters > get_parameter_map(
    const std::string & name
)

Retrieve full parameter map for a given name.

function set_parameter_map

void set_parameter_map(
    const std::string & name,
    std::map< std::string, Parameters > map
)

Set parameter map for a given name.

function set_parameters

void set_parameters(
    const std::string & name,
    Parameters params,
    std::string domain_name =""
)

Store parameters based on key.

function clear_parameters

void clear_parameters(
    const std::string & name
)

Clear parameters based on key.

function get_supported_version

int get_supported_version() const

Get the supported version (this version of the code)

function get_version

int get_version() const

Get the version of the currently loaded project.

function get_landmarks

std::vector< LandmarkDefinition > get_landmarks(
    int domain_id
)

Return the set of landmarks definitions for a particular domain.

function get_all_landmark_definitions

std::vector< std::vector< LandmarkDefinition > > get_all_landmark_definitions()

Return all landmark definitions.

function set_landmark_definitions

void set_landmark_definitions(
    std::vector< std::vector< LandmarkDefinition > > defs
)

Set all landmark definitions.

function get_landmarks_present

bool get_landmarks_present()

Return if landmarks are present.

function set_landmarks

void set_landmarks(
    int domain_id,
    std::vector< LandmarkDefinition > landmarks
)

Set landmarks for this project.

function new_landmark

void new_landmark(
    int domain_id
)

Add a new landmark.

function get_original_domain_types

std::vector< DomainType > get_original_domain_types()

Return the original domain types.

function get_groomed_domain_types

std::vector< DomainType > get_groomed_domain_types()

Return the groomed domain types.

function set_original_domain_types

void set_original_domain_types(
    std::vector< DomainType > domain_types
)

Set the original domain types.

function set_groomed_domain_types

void set_groomed_domain_types(
    std::vector< DomainType > domain_types
)

Get the groomed domain types.


Updated on 2024-07-14 at 17:07:24 +0000