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.
|
#include <LayerGroup.h>
Public Member Functions | |
LayerGroup (Core::GridTransform grid_transform, ProvenanceID provenance_id, const LayerMetaData &meta_data) | |
LayerGroup (const std::string &state_id) | |
const Core::GridTransform & | get_grid_transform () const |
const std::string & | get_group_id () const |
void | get_layers (std::vector< LayerHandle > &layers) const |
LayerHandle | top_layer () const |
LayerHandle | bottom_layer () const |
size_t | number_of_layers () const |
bool | is_empty () const |
bool | has_a_valid_layer () const |
void | get_layer_names (std::vector< LayerIDNamePair > &layer_names, Core::VolumeType type, LayerHandle excluded_layer=LayerHandle()) const |
size_t | get_layer_position (LayerHandle layer) const |
LayerMetaData | get_meta_data () const |
void | set_meta_data (const LayerMetaData &meta_data) |
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 Attributes | |
Core::StateOptionHandle | isosurface_quality_state_ |
= Isosurface state variables = | |
Core::StateBoolHandle | isosurface_capping_enabled_state_ |
Core::StatePointHandle | dimensions_state_ |
The following three variables are for displaying only. | |
Core::StatePointHandle | origin_state_ |
Core::StatePointHandle | spacing_state_ |
Core::StateOptionHandle | layers_visible_state_ |
Visibility of layers. | |
Core::StateOptionHandle | layers_iso_visible_state_ |
Visibility of mask layer isosurfaces. | |
Core::StateLongLongHandle | provenance_id_state_ |
The provenance id of the layer that created this group. | |
Core::StateStringHandle | meta_data_state_ |
State of the MetaData associated with this group. | |
Core::StateStringHandle | meta_data_info_state_ |
State variable that keeps track of what type of meta data was provided by the importer. | |
Core::StateBoolHandle | show_iso_menu_state_ |
Whether to show the isosurface menu. | |
Core::StateBoolHandle | show_delete_menu_state_ |
Whether to show the delete layers menu. | |
Core::StateBoolHandle | show_duplicate_menu_state_ |
Whether to show the duplicate layers menu. | |
Core::StateBoolHandle | group_widget_expanded_state_ |
Whether the group is expanded or not. | |
Protected Member Functions | |
virtual bool | post_save_states (Core::StateIO &state_io) |
virtual bool | post_load_states (const Core::StateIO &state_io) |
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 | pre_save_states (StateIO &state_io) |
virtual void | state_changed () |
virtual int | get_session_priority () |
virtual int | get_version () |
Get the version number of this class, this one is used for versioning of session files. | |
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 () |
Friends | |
class | LayerManager |
class | LayerManagerPrivate |
CLASS LayerGroup This is the class that records the layers that are grouped together
LayerHandle Seg3D::LayerGroup::bottom_layer | ( | ) | const |
BOTTOM_LAYER: Get the layer at the bottom.
const Core::GridTransform & Seg3D::LayerGroup::get_grid_transform | ( | ) | const |
GRID_TRANSFORM Get the transform of the layer
const std::string & Seg3D::LayerGroup::get_group_id | ( | ) | const |
GET_GROUP_ID: Get the group ID.
void Seg3D::LayerGroup::get_layer_names | ( | std::vector< LayerIDNamePair > & | layer_names, |
Core::VolumeType | type, | ||
LayerHandle | excluded_layer = LayerHandle() |
||
) | const |
GET_LAYER_NAMES: Get a list of all the names of the layers in the group.
size_t Seg3D::LayerGroup::get_layer_position | ( | LayerHandle | layer | ) | const |
GET_LAYER_POSITION: Returns the position of the given layer within the group.
void Seg3D::LayerGroup::get_layers | ( | std::vector< LayerHandle > & | layers | ) | const |
GET_LAYERS: Get all layers in top to bottom order.
LayerMetaData Seg3D::LayerGroup::get_meta_data | ( | ) | const |
GET_METADATA: NOTE: Group meta data is derived from the first layer that generates the group. Retrieve all the meta data that was part of this layer in one convenient structure
bool Seg3D::LayerGroup::has_a_valid_layer | ( | ) | const |
HAS_A_VALID_LAYER: Check whether the group contains at least one valid layer.
bool Seg3D::LayerGroup::is_empty | ( | ) | const |
IS_EMPTY: Check whether the group contains any layers.
size_t Seg3D::LayerGroup::number_of_layers | ( | ) | const |
NUMBER_OF_LAYERS: Get the number of layers in the group.
|
protectedvirtual |
POST_LOAD_STATES: this function creates the layers who's information was saved to file, and then tells them to populate their state variables from file
Reimplemented from Core::StateHandler.
|
protectedvirtual |
POST_SAVE_STATES: This function is called after the LayerGroup's states have been saved and then tells the layers to save their states as well.
Reimplemented from Core::StateHandler.
void Seg3D::LayerGroup::set_meta_data | ( | const LayerMetaData & | meta_data | ) |
SET_METADATA: Set all the metadata state variables
LayerHandle Seg3D::LayerGroup::top_layer | ( | ) | const |
TOP_LAYER: Get the layer at the top.