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 | Public Attributes | Friends | List of all members
Core::AbstractViewer Class Reference
Inheritance diagram for Core::AbstractViewer:
Core::StateHandler Core::Lockable Core::ConnectionHandler Seg3D::Viewer

Public Types

typedef boost::signals2::signal< void() > update_display_signal_type
 Types of signals.
 
typedef boost::signals2::signal< void() > redraw_signal_type
 

Public Member Functions

 AbstractViewer (size_t viewer_id)
 
virtual void mouse_move_event (const MouseHistory &mouse_history, int button, int buttons, int modifiers)
 
virtual void mouse_press_event (const MouseHistory &mouse_history, int button, int buttons, int modifiers)
 
virtual void mouse_release_event (const MouseHistory &mouse_history, int button, int buttons, int modifiers)
 
virtual void mouse_enter_event (int x, int y)
 This function is called by the render widget when a mouse enter event has occurred.
 
virtual void mouse_leave_event ()
 This function is called by the render widget when a mouse leave event has occurred.
 
virtual bool wheel_event (int delta, int x, int y, int buttons, int modifiers)
 
virtual bool key_press_event (int key, int modifiers, int x, int y)
 This function is called when a key is pressed while hovering over the render widget.
 
virtual bool key_release_event (int key, int modifiers, int x, int y)
 This function is called when a key is released while hovering over the render widget.
 
virtual void resize (int width, int height)
 This function is called when the viewer is resized by the render widget.
 
virtual void install_renderer (AbstractRendererHandle renderer)
 Install a renderer to the viewer.
 
size_t get_viewer_id () const
 
Texture2DHandle get_texture ()
 Returns the texture generated by the renderer.
 
Texture2DHandle get_overlay_texture ()
 Returns the overlay texture generated by the renderer.
 
int get_width () const
 Get the width of the viewer.
 
int get_height () const
 Get the height of the viewer.
 
void set_cursor (CursorShape cursor)
 Set the shape of the cursor in the viewer.
 
CursorShape get_cursor () const
 Get the shape of the cursor in the viewer.
 
- 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

update_display_signal_type update_display_signal_
 Triggered when new texture is received, or a different cursor shape is set.
 
redraw_signal_type redraw_scene_signal_
 Signals that the scene needs to be redrawn.
 
redraw_signal_type redraw_overlay_signal_
 Signals that the overlay needs to be redrawn.
 
redraw_signal_type redraw_all_signal_
 Signals that the scene needs to be redrawn.
 
StateBoolHandle viewer_visible_state_
 

Friends

class AbstractViewerPrivate
 

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 ()
 
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 ()
 

Member Function Documentation

size_t Core::AbstractViewer::get_viewer_id ( ) const

Get the id number of this viewer. All the viewers are number and can be identified by this number

void Core::AbstractViewer::mouse_move_event ( const MouseHistory mouse_history,
int  button,
int  buttons,
int  modifiers 
)
virtual

This function is called by the render widget when a mouse move event has occurred. This function needs to be overloaded to record mouse movements.

Reimplemented in Seg3D::Viewer.

void Core::AbstractViewer::mouse_press_event ( const MouseHistory mouse_history,
int  button,
int  buttons,
int  modifiers 
)
virtual

This function is called by the render widget when a mouse button press event has occurred. This function needs to be overloaded to record mouse buttons being pressed.

Reimplemented in Seg3D::Viewer.

void Core::AbstractViewer::mouse_release_event ( const MouseHistory mouse_history,
int  button,
int  buttons,
int  modifiers 
)
virtual

This function is called by the render widget when a mouse button release event has occurred. This function needs to be overloaded to record mouse buttons being released.

Reimplemented in Seg3D::Viewer.

bool Core::AbstractViewer::wheel_event ( int  delta,
int  x,
int  y,
int  buttons,
int  modifiers 
)
virtual

This function is called by the render widget when a mouse wheel event has occurred. This function needs to be overloaded to track mouse wheel events.

Reimplemented in Seg3D::Viewer.

Member Data Documentation

StateBoolHandle Core::AbstractViewer::viewer_visible_state_

State variable that keeps track of whether this viewer is visible and hence needs data to be rendered.


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