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.
All Classes Namespaces Functions Variables Typedefs Enumerator Friends
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Friends | List of all members
Seg3D::ViewerManager Class Reference
Inheritance diagram for Seg3D::ViewerManager:
Core::StateHandler Core::ConnectionHandler

Public Types

typedef boost::signals2::signal< void(size_t) > picking_target_changed_signal_type
 

Public Member Functions

size_t number_of_viewers ()
 
ViewerHandle get_viewer (size_t idx)
 
ViewerHandle get_viewer (const std::string viewer_name)
 
ViewerHandle get_active_viewer ()
 
void get_2d_viewers_info (ViewerInfoList viewers[3])
 
std::vector< size_t > get_locked_viewers (int mode_index)
 
void update_viewers_overlay (const std::string &view_mode)
 
void update_2d_viewers_overlay ()
 
void update_volume_viewers ()
 
void reset_cursor ()
 
bool is_busy ()
 
Core::TransferFunctionHandle get_transfer_function ()
 
virtual int get_session_priority ()
 
- 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 layout_state_
 Which layout is used to display the data (single, 1and1, 1and2, 1and3, 2and2, 3and3 )
 
Core::StateIntHandle active_viewer_state_
 Number of the viewer that is the active viewer.
 
Core::StateRangedDoubleHandle fog_density_state_
 The density of the fog in 3D view.
 
Core::StateLabeledOptionHandle volume_rendering_target_state_
 The target data layer for volume rendering.
 
Core::StateLabeledOptionHandle volume_renderer_state_
 Which volume renderer to use.
 
Core::StateRangedDoubleHandle volume_sample_rate_state_
 The sampling rate of volume rendering.
 
Core::StateRangedDoubleHandle vr_occlusion_angle_state_
 The aperture angle of the cone for occlusion volume rendering.
 
Core::StateRangedIntHandle vr_occlusion_grid_resolution_state_
 The grid resolution for sampling the cone base.
 
Core::StateBoolHandle enable_clip_plane_state_ [6]
 Clipping planes enabled state.
 
Core::StateRangedDoubleHandle clip_plane_x_state_ [6]
 X component of clipping plane normals.
 
Core::StateRangedDoubleHandle clip_plane_y_state_ [6]
 Y component of clipping plane normals.
 
Core::StateRangedDoubleHandle clip_plane_z_state_ [6]
 Z component of clipping plane normals.
 
Core::StateRangedDoubleHandle clip_plane_distance_state_ [6]
 Distance of the clipping planes.
 
Core::StateBoolHandle clip_plane_reverse_norm_state_ [6]
 Whether to reverse the normal of clipping planes.
 
Core::StateBoolHandle show_fog_control_state_
 Whether to show controls for fog.
 
Core::StateBoolHandle show_clipping_control_state_
 Whether to show controls for clipping.
 
Core::StateBoolHandle show_volume_rendering_control_state_
 Whether to show controls for volume rendering.
 
Core::StateIntHandle active_axial_viewer_
 
Core::StateIntHandle active_coronal_viewer_
 Number of the viewer that is the active coronal viewer ( for picking )
 
Core::StateIntHandle active_sagittal_viewer_
 Number of the viewer that is the active sagittal viewer ( for picking )
 
picking_target_changed_signal_type picking_target_changed_signal_
 

Static Public Attributes

static const std::string VIEW_SINGLE_C
 
static const std::string VIEW_1AND1_C
 
static const std::string VIEW_1AND2_C
 
static const std::string VIEW_1AND3_C
 
static const std::string VIEW_2AND2_C
 
static const std::string VIEW_2AND3_C
 
static const std::string VIEW_3AND3_C
 

Protected Member Functions

virtual bool post_save_states (Core::StateIO &state_io)
 
virtual bool pre_load_states (const 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_save_states (StateIO &state_io)
 
virtual void state_changed ()
 
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 ActionPickPoint
 
class ActionNewFeature
 
class ActionDeleteFeature
 

Member Function Documentation

void Seg3D::ViewerManager::get_2d_viewers_info ( ViewerInfoList  viewers[3])

GET_2D_VIEWERS_INFO: Get a snapshot of all the 2D viewers.

ViewerHandle Seg3D::ViewerManager::get_active_viewer ( )

GET_ACTIVE_VIEWER: Returns the active viewer.

std::vector< size_t > Seg3D::ViewerManager::get_locked_viewers ( int  mode_index)

GET_LOCKED_VIEWERS: Returns the IDs of locked viewers in the specified view mode.

int Seg3D::ViewerManager::get_session_priority ( )
virtual

Returns the session priority of the state handler. State handlers with higher priorities gets loaded earlier than those with lower priorities. By default this functions returns -1, which means that the state handler won't be saved/loaded by the state engine.

Reimplemented from Core::StateHandler.

Core::TransferFunctionHandle Seg3D::ViewerManager::get_transfer_function ( )

GET_TRANSFER_FUNCTION: Returns a const handle to the transfer function.

ViewerHandle Seg3D::ViewerManager::get_viewer ( size_t  idx)

GET_VIEWER: Returns the specified viewer.

bool Seg3D::ViewerManager::is_busy ( )

IS_BUSY: Returns true if the mouse is pressed in any viewer, otherwise false.

size_t Seg3D::ViewerManager::number_of_viewers ( )
inline

NUMBER_OF_VIEWERS The number of viewers that is available in the application This is a preset number to simplify the dependency scheme

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

POST_LOAD_STATES: This function is called by the statehandler once the initial state loading has finished and will then load the states of each of the viewers.

Reimplemented from Core::StateHandler.

bool Seg3D::ViewerManager::post_save_states ( Core::StateIO state_io)
protectedvirtual

POST_SAVE_STATES: This function is called by the statehandler once the initial state saving has finished and will then save the states of each of the viewers.

Reimplemented from Core::StateHandler.

bool Seg3D::ViewerManager::pre_load_states ( const Core::StateIO state_io)
protectedvirtual

PRE_LOAD_STATES: This virtual function is called by StateHandler::load_states before loading any states.

Reimplemented from Core::StateHandler.

void Seg3D::ViewerManager::reset_cursor ( )

RESET_CURSOR: Reset the cursors of all the viewers to default.

void Seg3D::ViewerManager::update_2d_viewers_overlay ( )

UPDATE_2D_VIEWERS: Cause all the visible 2D viewers to redraw overlay.

void Seg3D::ViewerManager::update_viewers_overlay ( const std::string &  view_mode)

UPDATE_VIEWERS: Cause all the visible viewers in the specified mode to redraw overlay.

void Seg3D::ViewerManager::update_volume_viewers ( )

UPDATE_VOLUME_VIEWERS: Cause all the visible volume viewers to redraw.

Member Data Documentation

Core::StateIntHandle Seg3D::ViewerManager::active_axial_viewer_

TODO: The next ones should not be state variables –JGS Number of the viewer that is the active axial viewer ( for picking )


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