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 XLSX file.
bool save(const std::string & filename)
Save to XLSX file.
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)
std::vector< std::shared_ptr< Subject > > & get_subjects()
Return the Subjects (as a reference)
void set_subjects(const std::vector< std::shared_ptr< Subject >> & subjects)
Set the 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)
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.
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.
void store_subjects()
Store from subject list to spreadsheet.
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.
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 XLSX file.

function save

bool save(
    const std::string & filename
)

Save to XLSX file.

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 get_subjects

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

Return the Subjects (as a reference)

function set_subjects

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

Set the 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_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 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 store_subjects

void store_subjects()

Store from subject list to spreadsheet.

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