Seg3D  2.4
Seg3D is a free volume segmentation and processing tool developed by the NIH Center for Integrative Biomedical Computing at the University of Utah Scientific Computing and Imaging (SCI) Institute.
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Seg3D::ProjectManager Class Reference
Inheritance diagram for Seg3D::ProjectManager:
Core::StateHandler Core::RecursiveLockable Core::ConnectionHandler

Public Types

typedef boost::signals2::signal< void() > recent_project_signal_type
 
typedef boost::signals2::signal< void() > current_project_changed_signal_type
 
- Public Types inherited from Core::RecursiveLockable
typedef boost::recursive_mutex mutex_type
 
typedef boost::unique_lock< mutex_type > lock_type
 

Public Member Functions

bool new_project (const std::string &project_location, const std::string &project_name)
 
bool open_project (const std::string &project_path)
 
bool save_project_as (const std::string &project_location, const std::string &project_name, bool anonymize)
 
bool export_project (const std::string &export_path, const std::string &project_name, long long session_id)
 
bool save_project_session (const std::string &session_name)
 
bool load_project_session (long long session_id)
 
bool delete_project_session (long long session_id)
 
void checkpoint_projectmanager ()
 
ProjectHandle get_current_project () const
 
bool get_recent_projects (ProjectInfoList &recent_projects)
 
boost::filesystem::path get_current_project_folder ()
 
boost::filesystem::path get_current_file_folder ()
 
- Public Member Functions inherited from Core::StateHandler
 StateHandler (const std::string &type_str, bool auto_id)
 
template<class HANDLE , class T >
bool add_state (const std::string &key, HANDLE &state, const T &default_value)
 Add a local state variable with default value.
 
template<class HANDLE , class T >
bool add_state (const std::string &key, HANDLE &state, const T &default_value, const T &min_value, const T &max_value, const T &step)
 Add a local state variable with default value and min and max.
 
template<class HANDLE >
bool add_state (const std::string &key, HANDLE &state)
 Add a local state variable without default value.
 
template<class HANDLE >
bool add_state (const std::string &key, HANDLE &state, const std::string &default_option, const std::string &option_list)
 Add a local state variable with option list.
 
template<class HANDLE >
bool add_state (const std::string &key, HANDLE &state, const std::string &default_option, const std::vector< std::string > option_list)
 Add a local state variable with option list.
 
template<class HANDLE >
bool add_state (const std::string &key, HANDLE &state, const std::string &default_option, const std::vector< OptionLabelPair > option_list)
 Add a local state variable with option list.
 
template<class HANDLE >
bool add_state (const std::string &key, HANDLE &state, const std::vector< std::string > &default_options, const std::vector< OptionLabelPair > option_list)
 Add a local state variable with option list.
 
template<class HANDLE >
bool add_state (const std::string &key, HANDLE &state, const std::vector< std::string > &default_options, const std::string &option_list)
 Add a local state variable with option list.
 
template<class HANDLE , class T >
bool add_state (const std::string &key, HANDLE &state, const std::vector< T > &default_value)
 Add a local state variable without default value.
 
void invalidate ()
 this function is called when you need to delete something from the state engine, but may have More...
 
bool is_valid ()
 returns true if the function hasn't been invalidated
 
void mark_as_project_data ()
 Mask the states that are added to this state handler as project data.
 
void do_not_save_id_number ()
 The id number of the statehandler will not be saved.
 
void set_initializing (bool initializing)
 
bool load_states (const StateIO &state_io)
 Load the states into the StateIO variable.
 
bool save_states (StateIO &state_io)
 Save the states into the StateIO variable.
 
const std::string & get_statehandler_id () const
 The id of the handler that will be the prefix of the state variables.
 
const std::string & get_statehandler_id_base () const
 The id of the handler that will be the prefix of the state variables.
 
size_t get_statehandler_id_number () const
 The id number of the handler that will be at the end of the prefix.
 
- Public Member Functions inherited from Core::RecursiveLockable
mutex_type & get_mutex () const
 

Static Public Member Functions

static bool CheckProjectFile (const boost::filesystem::path &path, std::string &error)
 

Public Attributes

recent_project_signal_type recent_projects_changed_signal_
 
current_project_changed_signal_type current_project_changed_signal_
 
Core::StateIntHandle default_project_name_counter_state_
 Counter for making new project names.
 
Core::StateStringHandle current_project_folder_state_
 Path to the directory from which projects are loaded.
 
Core::StateStringHandle current_file_folder_state_
 Path to the directory from which files are loaded.
 

Additional Inherited Members

- Protected Member Functions inherited from Core::StateHandler
virtual void clean_up ()
 This function is called by invalidate to clean up stuff in the statehandler subclasses.
 
void enable_signals (bool enabled)
 This function enables/disables signals in the state variables.
 
virtual bool pre_load_states (const StateIO &state_io)
 
virtual bool post_load_states (const StateIO &state_io)
 
virtual bool pre_save_states (StateIO &state_io)
 
virtual bool post_save_states (StateIO &state_io)
 
virtual void state_changed ()
 
virtual int get_session_priority ()
 
int get_loaded_version ()
 Get the version number of the data that was loaded.
 
void set_loaded_version (int loaded_version)
 Set the version number of the data that was loaded.
 
- Protected Member Functions inherited from Core::ConnectionHandler
void add_connection (const boost::signals2::connection &connection)
 
void add_connection (const ConnectionHandlerConnectionHandle &connection)
 
void disconnect_all ()
 

Member Function Documentation

void Seg3D::ProjectManager::checkpoint_projectmanager ( )

CHECKPOINT_PROJECTMANAGER: This function calls save_states that writes the state values of ProjectManager to file

bool Seg3D::ProjectManager::CheckProjectFile ( const boost::filesystem::path &  path,
std::string &  error 
)
static

CHECKPROJECTFILE: Check if a file is a valid project

bool Seg3D::ProjectManager::delete_project_session ( long long  session_id)

DELETE_PROJECT_SESSION: this function deletes the current session from disk

bool Seg3D::ProjectManager::export_project ( const std::string &  export_path,
const std::string &  project_name,
long long  session_id 
)

EXPORT_PROJECT: this function saves the value in current_project_, and the selected session to the desired save location

boost::filesystem::path Seg3D::ProjectManager::get_current_file_folder ( )

GET_CURRENT_FILE_FOLDER: Get a current_file_folder that is actually available

ProjectHandle Seg3D::ProjectManager::get_current_project ( ) const

GET_CURRENT_PROJECT: Get the current project

boost::filesystem::path Seg3D::ProjectManager::get_current_project_folder ( )

GET_CURRENT_PROJECT_FOLDER: Get a current_project_folder that is actually available

bool Seg3D::ProjectManager::get_recent_projects ( ProjectInfoList &  recent_projects)

GET_RECENT_PROJECTS: Get a vector of recent projects

bool Seg3D::ProjectManager::load_project_session ( long long  session_id)

LOAD_PROJECT_SESSION: this function saves the current session to disk

bool Seg3D::ProjectManager::new_project ( const std::string &  project_location,
const std::string &  project_name 
)

NEW_PROJECT: this function sets the state values of the current project to reflect the desired values NOTE: If no location is given, the project is not saved to disk

bool Seg3D::ProjectManager::open_project ( const std::string &  project_path)

OPEN_PROJECT: this function takes the path to the desired project and loads the values from the file located at that location

bool Seg3D::ProjectManager::save_project_as ( const std::string &  project_location,
const std::string &  project_name,
bool  anonymize 
)

SAVE_PROJECT_AS: this function saves the values in current_project_ to the current save location. If anonymize is true then patient-specific data will be removed when saving the project.

bool Seg3D::ProjectManager::save_project_session ( const std::string &  session_name)

SAVE_PROJECT_SESSION: this function saves the current session to disk


The documentation for this class was generated from the following files: