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 | List of all members
Seg3D::ActionActivateTool Class Reference
Inheritance diagram for Seg3D::ActionActivateTool:
Core::Action

Public Member Functions

virtual bool validate (Core::ActionContextHandle &context)
 
virtual bool run (Core::ActionContextHandle &context, Core::ActionResultHandle &result)
 
- Public Member Functions inherited from Core::Action
virtual ActionInfoHandle get_action_info () const =0
 
std::string get_definition () const
 Get the definition of the action (in XML format)
 
std::string get_type () const
 Get the type of the action.
 
std::string get_usage () const
 Get a usage description.
 
std::string get_key (size_t index) const
 Get the name of the key with a certain index.
 
std::string get_default_key_value (size_t index) const
 Get the name of the key with a certain index.
 
int get_key_index (const std::string &name) const
 Get the index of a certain key.
 
bool is_undoable () const
 Check whether the action is undoable.
 
virtual bool changes_project_data ()
 
virtual bool translate (ActionContextHandle &context)
 
virtual void clear_cache ()
 
std::string export_to_string () const
 
bool import_from_string (const std::string &action, std::string &error)
 
bool import_from_string (const std::string &action)
 Same as function above, but without the error report.
 

Static Public Member Functions

static Core::ActionHandle Create (const std::string &toolid)
 
static void Dispatch (Core::ActionContextHandle context, const std::string &toolid)
 

Additional Inherited Members

- Protected Member Functions inherited from Core::Action
template<class T >
void add_parameter (T &parameter)
 
void add_param (ActionParameterBase *parameter)
 Add a parameter to the internal structure of the action.
 
ActionParameterBaseget_param (size_t index) const
 Retrieve the parameter from the internal structure of the action.
 
const size_t num_params () const
 Number of parameter in this action.
 

Member Function Documentation

static Core::ActionHandle Seg3D::ActionActivateTool::Create ( const std::string &  toolid)
static

CREATE Create action that activates a tool

void Seg3D::ActionActivateTool::Dispatch ( Core::ActionContextHandle  context,
const std::string &  toolid 
)
static

DISPATCH Create and dispatch action that activates a tool

bool Seg3D::ActionActivateTool::run ( Core::ActionContextHandle &  context,
Core::ActionResultHandle &  result 
)
virtual

Each action needs to have this piece implemented. It spells out how the action is run. It returns whether the action was successful or not. NOTE: In case of an asynchronous action, the return value is ignored and the program relies on report_done() from the context to be triggered when the asynchronous part has finished. In any other case the ActionDispatcher will issue the report_done() when run returns.

Implements Core::Action.

bool Seg3D::ActionActivateTool::validate ( Core::ActionContextHandle &  context)
virtual

Each action needs to be validated just before it is posted. This way we enforce that every action that hits the main post_action signal will be a valid action to execute. NOTE: This function is not const and may alter the values of the parameters and correct faulty input. Run on the other hand is not allowed to change anything in the action, as it is posted to any observers after the action is validated.

Implements Core::Action.


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