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 | Public Attributes | Protected Member Functions | Friends | List of all members
Seg3D::PaintTool Class Reference
Inheritance diagram for Seg3D::PaintTool:
Seg3D::SeedPointsTool Seg3D::SingleTargetTool Seg3D::Tool Core::StateHandler Core::ConnectionHandler

Public Member Functions

virtual bool handle_mouse_enter (ViewerHandle viewer, int x, int y)
 
virtual bool handle_mouse_leave (ViewerHandle viewer)
 
virtual bool handle_mouse_move (ViewerHandle viewer, const Core::MouseHistory &mouse_history, int button, int buttons, int modifiers)
 
virtual bool handle_mouse_press (ViewerHandle viewer, const Core::MouseHistory &mouse_history, int button, int buttons, int modifiers)
 
virtual bool handle_mouse_release (ViewerHandle viewer, const Core::MouseHistory &mouse_history, int button, int buttons, int modifiers)
 
virtual bool handle_wheel (ViewerHandle viewer, int delta, int x, int y, int buttons, int modifiers)
 
virtual bool handle_key_press (ViewerHandle viewer, int key, int modifiers)
 
virtual bool handle_update_cursor (ViewerHandle viewer)
 
virtual void redraw (size_t viewer_id, const Core::Matrix &proj_mat, int viewer_width, int viewer_height)
 
virtual bool has_2d_visual ()
 
virtual void activate ()
 
virtual void deactivate ()
 
void flood_fill (Core::ActionContextHandle context, bool erase)
 
- Public Member Functions inherited from Seg3D::SeedPointsTool
 SeedPointsTool (Core::VolumeType target_volume_type, const std::string &toolid)
 
virtual bool has_3d_visual ()
 
virtual void handle_seed_points_changed ()
 
void clear (Core::ActionContextHandle context)
 
bool find_point (ViewerHandle viewer, double world_x, double world_y, Core::VolumeSliceHandle vol_slice, Core::Point &pt)
 
- Public Member Functions inherited from Seg3D::SingleTargetTool
 SingleTargetTool (int target_volume_type, const std::string &tool_type)
 
void add_extra_layer_input (Core::StateLabeledOptionHandle input_layer_state, Core::VolumeType type, bool required=false, bool dependent=true)
 Add a state whose input is linked to the target.
 
- Public Member Functions inherited from Seg3D::Tool
 Tool (const std::string &tool_type)
 
virtual ToolInfoHandle get_tool_info () const =0
 
std::string get_name () const
 
std::string get_menu () const
 
std::string get_menu_label () const
 
std::string get_shortcut_key () const
 
std::string get_hotkeys_and_descriptions () const
 
std::string get_url () const
 
std::string get_definition () const
 
const std::string & toolid () const
 
virtual std::string tool_name () const
 
virtual bool handle_key_release (ViewerHandle viewer, int key, int modifiers)
 
virtual void close ()
 
virtual void execute (Core::ActionContextHandle context)
 
- 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::StateLabeledOptionHandle data_constraint_layer_state_
 
Core::StateLabeledOptionHandle mask_constraint1_layer_state_
 
Core::StateLabeledOptionHandle mask_constraint2_layer_state_
 
Core::StateBoolHandle negative_data_constraint_state_
 
Core::StateBoolHandle negative_mask_constraint1_state_
 
Core::StateBoolHandle negative_mask_constraint2_state_
 
Core::StateBoolHandle show_data_cstr_bound_state_
 
Core::StateRangedIntHandle brush_radius_state_
 Radius of the brush.
 
Core::StateRangedDoubleHandle upper_threshold_state_
 Upper threshold for painting.
 
Core::StateRangedDoubleHandle lower_threshold_state_
 Lower threshold for painting.
 
Core::StateBoolHandle erase_state_
 Erase data instead of painting.
 
- Public Attributes inherited from Seg3D::SeedPointsTool
Core::StatePointVectorHandle seed_points_state_
 
- Public Attributes inherited from Seg3D::SingleTargetTool
Core::StateLabeledOptionHandle target_layer_state_
 
Core::StateBoolHandle use_active_layer_state_
 Whether to use the active of one from the list.
 
Core::StateBoolHandle valid_primary_target_state_
 
Core::StateBoolHandle valid_target_state_
 Whether a valid layer has been selected.
 

Protected Member Functions

virtual bool post_load_states ()
 
- 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 ()
 

Friends

class ActionPaint
 

Additional Inherited Members

- Static Public Attributes inherited from Seg3D::SeedPointsTool
static const Core::Color yellow
 
static const Core::Color dark_yellow
 
- Static Public Attributes inherited from Seg3D::Tool
static const std::string NONE_OPTION_C
 

Member Function Documentation

void Seg3D::PaintTool::activate ( )
virtual

ACTIVATE: Activate a tool: this tool is set as the active tool and hence it should setup the right mouse tools in the viewers.

Reimplemented from Seg3D::Tool.

void Seg3D::PaintTool::deactivate ( )
virtual

DEACTIVATE: Deactivate a tool. A tool is always deactivate before the next one is activated.

Reimplemented from Seg3D::Tool.

bool Seg3D::PaintTool::handle_key_press ( ViewerHandle  viewer,
int  key,
int  modifiers 
)
virtual

HANDLE_KEY_PRESS: Called when a key is pressed.

Reimplemented from Seg3D::SeedPointsTool.

bool Seg3D::PaintTool::handle_mouse_enter ( ViewerHandle  viewer,
int  x,
int  y 
)
virtual

HANDLE_MOUSE_ENTER: Called when the mouse has entered a viewer.

Reimplemented from Seg3D::Tool.

bool Seg3D::PaintTool::handle_mouse_leave ( ViewerHandle  viewer)
virtual

HANDLE_MOUSE_LEAVE: Called when the mouse has left a viewer.

Reimplemented from Seg3D::Tool.

bool Seg3D::PaintTool::handle_mouse_move ( ViewerHandle  viewer,
const Core::MouseHistory mouse_history,
int  button,
int  buttons,
int  modifiers 
)
virtual

HANDLE_MOUSE_MOVE: Called when the mouse moves in a viewer.

Reimplemented from Seg3D::SeedPointsTool.

bool Seg3D::PaintTool::handle_mouse_press ( ViewerHandle  viewer,
const Core::MouseHistory mouse_history,
int  button,
int  buttons,
int  modifiers 
)
virtual

HANDLE_MOUSE_PRESS: Called when a mouse button has been pressed.

Reimplemented from Seg3D::SeedPointsTool.

bool Seg3D::PaintTool::handle_mouse_release ( ViewerHandle  viewer,
const Core::MouseHistory mouse_history,
int  button,
int  buttons,
int  modifiers 
)
virtual

HANDLE_MOUSE_RELEASE: Called when a mouse button has been released.

Reimplemented from Seg3D::Tool.

bool Seg3D::PaintTool::handle_update_cursor ( ViewerHandle  viewer)
virtual

HANDLE_UPDATE_CURSOR: Called when a viewer requires an update to its cursor.

Reimplemented from Seg3D::Tool.

bool Seg3D::PaintTool::handle_wheel ( ViewerHandle  viewer,
int  delta,
int  x,
int  y,
int  buttons,
int  modifiers 
)
virtual

HANDLE_WHEEL: Called when the mouse wheel has been rotated.

Reimplemented from Seg3D::Tool.

bool Seg3D::PaintTool::has_2d_visual ( )
virtual

HAS_2D_VISUAL: Returns true if the tool draws itself in the 2D view, otherwise false. The default implementation returns false.

Reimplemented from Seg3D::SeedPointsTool.

void Seg3D::PaintTool::redraw ( size_t  viewer_id,
const Core::Matrix proj_mat,
int  viewer_width,
int  viewer_height 
)
virtual

REDRAW: Draw the paint tool in the specified viewer. The function should only be called by the renderer, which has a valid GL context.

Reimplemented from Seg3D::SeedPointsTool.


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