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 Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
Seg3D::MaskLayer Class Reference

CLASS MaskLayer. More...

#include <MaskLayer.h>

Inheritance diagram for Seg3D::MaskLayer:
Seg3D::Layer Core::StateHandler Core::ConnectionHandler

Public Member Functions

 MaskLayer (const std::string &name, const Core::MaskVolumeHandle &volume)
 
 MaskLayer (const std::string &state_id)
 
virtual Core::VolumeType get_type () const
 
virtual size_t get_byte_size () const
 
virtual Core::GridTransform get_grid_transform () const
 
virtual void set_grid_transform (const Core::GridTransform &grid_transform, bool preserve_centering)
 
virtual Core::DataType get_data_type () const
 
virtual bool has_valid_data () const
 
virtual LayerHandle duplicate () const
 
virtual Core::VolumeHandle get_volume () const
 
Core::MaskVolumeHandle get_mask_volume () const
 
bool set_mask_volume (Core::MaskVolumeHandle volume)
 
Core::IsosurfaceHandle get_isosurface ()
 
void compute_isosurface (double quality_factor, bool capping_enabled)
 
void calculate_volume ()
 
void delete_isosurface ()
 
- Public Member Functions inherited from Seg3D::Layer
void update_progress (double amount, double progress_start=0.0f, double progress_amount=1.0f)
 
bool is_visible (size_t viewer_id) const
 
LayerGroupHandle get_layer_group ()
 
void set_layer_group (LayerGroupWeakHandle layer_group)
 
std::string get_layer_id () const
 
std::string get_layer_name () const
 
Core::DataBlock::generation_type get_generation () const
 
LayerMetaData get_meta_data () const
 
void set_meta_data (const LayerMetaData &meta_data)
 
bool check_abort ()
 
void reset_abort ()
 
bool check_stop ()
 
void reset_stop ()
 
bool check_filter_key (filter_key_type key) const
 
void add_filter_key (filter_key_type key)
 
void remove_filter_key (filter_key_type key)
 
void clear_filter_keys ()
 
size_t num_filter_keys () const
 
void set_filter_handle (LayerAbstractFilterHandle layer)
 
void reset_filter_handle ()
 
LayerAbstractFilterHandle get_filter_handle ()
 
void set_allow_stop ()
 
void reset_allow_stop ()
 
- 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.
 

Static Public Member Functions

static size_t GetColorCount ()
 
static void SetColorCount (size_t count)
 
- Static Public Member Functions inherited from Seg3D::Layer
static mutex_typeGetMutex ()
 
static filter_key_type GenerateFilterKey ()
 

Public Attributes

boost::signals2::signal< void() > isosurface_updated_signal_
 
Core::StateIntHandle color_state_
 Which color to use for displaying the mask.
 
Core::StateOptionHandle border_state_
 State that describes whether to use a fat border for the mask.
 
Core::StateOptionHandle fill_state_
 State that describes whether to fill the mask solid.
 
Core::StateBoolHandle show_isosurface_state_
 State that describes whether to show the isosurface state.
 
Core::StateBoolHandle iso_generated_state_
 State that describes whether the isosurface has been generated.
 
Core::StateDoubleHandle isosurface_area_state_
 The area of the generated isosurface.
 
Core::StateStringHandle calculated_volume_state_
 
Core::StateStringHandle counted_pixels_state_
 
Core::StateDoubleHandle min_value_state_
 
Core::StateDoubleHandle max_value_state_
 
- Public Attributes inherited from Seg3D::Layer
update_progress_signal_type update_progress_signal_
 
layer_updated_signal_type layer_updated_signal_
 
abort_signal_type abort_signal_
 
stop_signal_type stop_signal_
 
Core::StateNameHandle name_state_
 The name of the layer.
 
std::vector< Core::StateBoolHandle > visible_state_
 Per viewer state of whether this layer is visible.
 
Core::StateBoolHandle master_visible_state_
 Master state of the layer visibility.
 
Core::StateBoolHandle locked_state_
 State indicating whether the layer is locked.
 
Core::StateRangedDoubleHandle opacity_state_
 State that describes the opacity with which the layer is displayed.
 
Core::StateOptionHandle data_state_
 State that stores the current layer state.
 
Core::StateBoolHandle show_information_state_
 Whether to show the layer information.
 
Core::StateBoolHandle show_appearance_state_
 Whether to show the layer information.
 
Core::StateBoolHandle show_advanced_visibility_state_
 Whether to show the layer information.
 
Core::StateBoolHandle show_opacity_state_
 Whether to show the opacity control.
 
Core::StateBoolHandle show_progress_bar_state_
 Whether to show the progress bar.
 
Core::StateBoolHandle show_abort_message_state_
 Whether to show the abort message.
 
Core::StateBoolHandle show_stop_button_state_
 Whether to show the stop button.
 
Core::BooleanStateGroupHandle gui_state_group_
 An exclusive group of boolean states that control the visibility of different parts.
 
Core::StateLongLongHandle provenance_id_state_
 State that keeps track of the provenance number. More...
 
Core::StateStringHandle meta_data_state_
 State of the MetaData associated with this layer.
 
Core::StateStringHandle meta_data_info_state_
 State variable that keeps track of what type of meta data was provided by the importer.
 
Core::StateStringHandle centering_state_
 Centering (node vs. cell) is stored per layer for all layers (mask and data)
 

Protected Member Functions

virtual bool pre_save_states (Core::StateIO &state_io)
 
virtual bool post_load_states (const Core::StateIO &state_io)
 
virtual void clean_up ()
 
- Protected Member Functions inherited from Seg3D::Layer
 Layer (const std::string &name, bool creating=false)
 
 Layer (const std::string &name, const std::string &state_id, bool creating=false)
 
virtual bool post_save_states (Core::StateIO &state_io)
 
virtual int get_version ()
 
- Protected Member Functions inherited from Core::StateHandler
void enable_signals (bool enabled)
 This function enables/disables signals in the state variables.
 
virtual bool pre_load_states (const 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 ()
 

Additional Inherited Members

- Public Types inherited from Seg3D::Layer
typedef boost::signals2::signal< void(double) > update_progress_signal_type
 
typedef boost::signals2::signal< void() > layer_updated_signal_type
 
typedef boost::signals2::signal< void() > abort_signal_type
 
typedef boost::signals2::signal< void() > stop_signal_type
 
typedef long long filter_key_type
 
typedef Core::StateEngine::mutex_type mutex_type
 This code just aligns the layer locking with the StateEngine locking.
 
typedef Core::StateEngine::lock_type lock_type
 
- Static Public Attributes inherited from Seg3D::Layer
static const std::string CREATING_C
 
static const std::string PROCESSING_C
 
static const std::string AVAILABLE_C
 
static const std::string IN_USE_C
 
- Protected Attributes inherited from Seg3D::Layer
Core::StateLongLongHandle generation_state_
 State that stores the generation of its datablock.
 

Detailed Description

CLASS MaskLayer.

Member Function Documentation

void Seg3D::MaskLayer::calculate_volume ( )

CALCULATE_VOLUME: function that is called by the calculate volume action that calculate the volume of the mask

void Seg3D::MaskLayer::clean_up ( )
protectedvirtual

CLEAN_UP: this function cleans up the mask volume for when you are deleting the mask and reloading

Reimplemented from Core::StateHandler.

void Seg3D::MaskLayer::compute_isosurface ( double  quality_factor,
bool  capping_enabled 
)

COMPUTE_ISOSURFACE Compute the isosurface for this layer using the given quality factor. Quality factor must be one of: 1.0, 0.5, 0.25, 0.125

void Seg3D::MaskLayer::delete_isosurface ( )

DELETE_ISOSURFACE: Delete the isosurface associated with this layer

LayerHandle Seg3D::MaskLayer::duplicate ( ) const
virtual

DUPLICATE_LAYER: Duplicate layer

Implements Seg3D::Layer.

size_t Seg3D::MaskLayer::get_byte_size ( ) const
virtual

GET_BYTE_SIZE: Get the size of the data contained in the layer in bytes

Implements Seg3D::Layer.

Core::DataType Seg3D::MaskLayer::get_data_type ( ) const
virtual

GET_DATA_TYPE: Get the data type of the underlying data

Implements Seg3D::Layer.

Core::GridTransform Seg3D::MaskLayer::get_grid_transform ( ) const
virtual

GET_GRID_TRANSFORM: This function returns the grid transform of the mask volume. Locks: StateEngine

Implements Seg3D::Layer.

Core::IsosurfaceHandle Seg3D::MaskLayer::get_isosurface ( )

GET_ISOSURFACE: Get the isosurface associated with this layer

Core::MaskVolumeHandle Seg3D::MaskLayer::get_mask_volume ( ) const

GET_MASK_VOLUME: This function returns the mask volume.

virtual Core::VolumeType Seg3D::MaskLayer::get_type ( ) const
inlinevirtual

GET_TYPE: This function returns the a Core::VolumeType indicating that this is a MaskLayer.

Implements Seg3D::Layer.

Core::VolumeHandle Seg3D::MaskLayer::get_volume ( ) const
virtual

GET_VOLUME: Get the underlying volume.

Implements Seg3D::Layer.

size_t Seg3D::MaskLayer::GetColorCount ( )
static

GETCOLORCOUNT: Get the current count from which the next color is derived

bool Seg3D::MaskLayer::has_valid_data ( ) const
virtual

HAS_VALID_DATA: Check whether the layer has valid data

Implements Seg3D::Layer.

bool Seg3D::MaskLayer::post_load_states ( const Core::StateIO state_io)
protectedvirtual

POST_LOAD_STATES: this function takes care of connecting the MaskVolume to the mask layer after it's settings have been loaded

Reimplemented from Core::StateHandler.

bool Seg3D::MaskLayer::pre_save_states ( Core::StateIO state_io)
protectedvirtual

PRE_SAVE_STATES: this function synchronize the generation number for the session saving

Reimplemented from Core::StateHandler.

void Seg3D::MaskLayer::set_grid_transform ( const Core::GridTransform grid_transform,
bool  preserve_centering 
)
virtual

SET_GRID_TRANSFORM: Set the grid transform of the mask volume.

Implements Seg3D::Layer.

bool Seg3D::MaskLayer::set_mask_volume ( Core::MaskVolumeHandle  volume)

SET_MASK_VOLUME: This function set the mask volume to a new mask.

void Seg3D::MaskLayer::SetColorCount ( size_t  count)
static

SETCOLORCOUNT: Set the color count to a specific number

Member Data Documentation

Core::StateStringHandle Seg3D::MaskLayer::calculated_volume_state_

State that describes the calculated volume of the mask, as string because its connected to a label that will show a non numeric value, when the volume has not been calculated.


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