Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
Base class from with interactors that handle DataNodes are to be derived. More...
#include <mitkDataInteractor.h>
Public Types | |
typedef DataInteractor | Self |
typedef EventStateMachine | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
Public Types inherited from mitk::EventStateMachine | |
typedef EventStateMachine | Self |
typedef InteractionEventHandler | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef std::map< std::string, TActionFunctor * > | ActionFunctionsMapType |
typedef itk::SmartPointer< StateMachineState > | StateMachineStateType |
Public Types inherited from mitk::InteractionEventHandler | |
typedef InteractionEventHandler | Self |
typedef itk::Object | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
Public Member Functions | |
virtual std::vector< std::string > | GetClassHierarchy () const override |
virtual const char * | GetClassName () const |
Pointer | Clone () const |
DataNode * | GetDataNode () const |
virtual void | SetDataNode (DataNode *dataNode) |
int | GetLayer () const |
ProcessEventMode | GetMode () const |
Public Member Functions inherited from mitk::EventStateMachine | |
bool | LoadStateMachine (const std::string &filename, const us::Module *module=nullptr) |
Loads XML resource. More... | |
bool | HandleEvent (InteractionEvent *event, DataNode *dataNode) |
void | EnableUndo (bool enable) |
Enables or disabled Undo. More... | |
void | EnableInteraction (bool enable) |
Enables/disables the state machine. In un-enabled state it won't react to any events. More... | |
Public Member Functions inherited from mitk::InteractionEventHandler | |
bool | SetEventConfig (const std::string &filename, const us::Module *module=nullptr) |
Loads a configuration from an XML resource. More... | |
bool | SetEventConfig (const EventConfig &config) |
Loads a configuration from an EventConfig object. More... | |
EventConfig | GetEventConfig () const |
Returns the current configuration. More... | |
bool | AddEventConfig (const std::string &filename, const us::Module *module=nullptr) |
This method extends the configuration. More... | |
bool | AddEventConfig (const EventConfig &config) |
This method extends the configuration. The configuration from the EventConfig object is loaded and only the ones conflicting are replaced by the new one. This way several configurations can be combined. More... | |
Static Public Member Functions | |
static const char * | GetStaticNameOfClass () |
static Pointer | New () |
Static Public Member Functions inherited from mitk::EventStateMachine | |
static const char * | GetStaticNameOfClass () |
Static Public Member Functions inherited from mitk::InteractionEventHandler | |
static const char * | GetStaticNameOfClass () |
Static Public Attributes | |
static const std::string | IntDeactivateMe |
static const std::string | IntLeaveWidget |
static const std::string | IntEnterWidget |
Protected Member Functions | |
DataInteractor () | |
virtual | ~DataInteractor () |
virtual void | ConnectActionsAndFunctions () override |
Overwrite this function to connect actions from StateMachine description with functions. More... | |
virtual void | DataNodeChanged () |
Is called when a DataNode is initially set or changed To be implemented by sub-classes for initialization code which require a DataNode. More... | |
virtual void | NotifyStart () |
Sends StartInteraction event via the mitk::DataNode. More... | |
virtual void | NotifyResultReady () |
NotifyResultReady Sends ResultReady event via the mitk::DataNode. More... | |
Protected Member Functions inherited from mitk::EventStateMachine | |
EventStateMachine () | |
virtual | ~EventStateMachine () |
void | AddActionFunction (const std::string &action, TActionFunctor *functor) |
void | AddActionFunction (const std::string &action, const ActionFunctionDelegate &delegate) |
void | AddConditionFunction (const std::string &condition, const ConditionFunctionDelegate &delegate) |
StateMachineState * | GetCurrentState () const |
void | ResetToStartState () |
ResetToStartState Reset state machine to it initial starting state. More... | |
virtual bool | CheckCondition (const StateMachineCondition &condition, const InteractionEvent *interactionEvent) |
virtual void | ExecuteAction (StateMachineAction *action, InteractionEvent *interactionEvent) |
virtual bool | FilterEvents (InteractionEvent *interactionEvent, DataNode *dataNode) |
void | SetMouseCursor (const char *xpm[], int hotspotX, int hotspotY) |
Sets the specified mouse cursor. More... | |
void | ResetMouseCursor () |
Resets the mouse cursor (if modified by the SlicesCoordinator) to its original state. More... | |
StateMachineTransition * | GetExecutableTransition (InteractionEvent *event) |
Returns the executable transition for the given event. More... | |
Protected Member Functions inherited from mitk::InteractionEventHandler | |
InteractionEventHandler () | |
virtual | ~InteractionEventHandler () |
PropertyList::Pointer | GetAttributes () const |
std::string | MapToEventVariant (InteractionEvent *interactionEvent) |
virtual void | ConfigurationChanged () |
Additional Inherited Members | |
Protected Types inherited from mitk::EventStateMachine | |
typedef MessageAbstractDelegate2< StateMachineAction *, InteractionEvent *, void > | ActionFunctionDelegate |
typedef MessageAbstractDelegate1< const InteractionEvent *, bool > | ConditionFunctionDelegate |
Protected Attributes inherited from mitk::EventStateMachine | |
bool | m_IsActive |
UndoController * | m_UndoController |
bool | m_UndoEnabled |
Base class from with interactors that handle DataNodes are to be derived.
Base class from with interactors that handle DataNodes are to be derived. Provides an interface that is relevant for the interactor to work together with the dispatcher. To implement a new interactor overwrite the ConnectActionsAndFunctions to connect the actions.
Definition at line 52 of file mitkDataInteractor.h.
typedef itk::SmartPointer<const Self> mitk::DataInteractor::ConstPointer |
Definition at line 60 of file mitkDataInteractor.h.
Definition at line 60 of file mitkDataInteractor.h.
Definition at line 60 of file mitkDataInteractor.h.
Definition at line 60 of file mitkDataInteractor.h.
|
protected |
Definition at line 26 of file mitkDataInteractor.cpp.
|
protectedvirtual |
Definition at line 30 of file mitkDataInteractor.cpp.
Pointer mitk::DataInteractor::Clone | ( | ) | const |
|
overrideprotectedvirtual |
Overwrite this function to connect actions from StateMachine description with functions.
Following example shows how to connect the 'addpoint' action from the StateMachine XML description using the CONNECT_FUNCTION macro with the AddPoint() function in the TestInteractor.
Reimplemented from mitk::EventStateMachine.
Reimplemented in mitk::PointSetDataInteractor, mitk::TubeGraphDataInteractor, mitk::PlanarFigureInteractor, mitk::AffineBaseDataInteractor3D, mitk::ContourModelLiveWireInteractor, mitk::ContourModelInteractor, mitk::AffineImageCropperInteractor, mitk::ClippingPlaneInteractor3D, mitk::SurfaceDeformationDataInteractor3D, mitk::SimulationInteractor, and mitk::ExampleInteractor.
Definition at line 70 of file mitkDataInteractor.cpp.
References MITK_WARN.
|
protectedvirtual |
Is called when a DataNode is initially set or changed To be implemented by sub-classes for initialization code which require a DataNode.
Reimplemented in mitk::PointSetDataInteractor, mitk::TubeGraphDataInteractor, mitk::AffineBaseDataInteractor3D, mitk::SinglePointDataInteractor, mitk::AffineImageCropperInteractor, mitk::ClippingPlaneInteractor3D, mitk::SurfaceDeformationDataInteractor3D, and mitk::SimulationInteractor.
Definition at line 98 of file mitkDataInteractor.cpp.
|
inlineoverridevirtual |
Reimplemented from mitk::EventStateMachine.
Reimplemented in mitk::PointSetDataInteractor, and mitk::SinglePointDataInteractor.
Definition at line 60 of file mitkDataInteractor.h.
|
virtual |
Reimplemented from mitk::EventStateMachine.
Reimplemented in mitk::PointSetDataInteractor, and mitk::SinglePointDataInteractor.
mitk::DataNode * mitk::DataInteractor::GetDataNode | ( | ) | const |
Definition at line 39 of file mitkDataInteractor.cpp.
int mitk::DataInteractor::GetLayer | ( | ) | const |
Definition at line 60 of file mitkDataInteractor.cpp.
mitk::ProcessEventMode mitk::DataInteractor::GetMode | ( | ) | const |
Definition at line 75 of file mitkDataInteractor.cpp.
|
inlinestatic |
Definition at line 60 of file mitkDataInteractor.h.
|
static |
Referenced by mitk::LiveWireTool2D::FinishTool(), and mitkDispatcherTest().
|
protectedvirtual |
NotifyResultReady Sends ResultReady event via the mitk::DataNode.
Use to get notfied when the mitk::DataNode is in a ready state for further processing.
Definition at line 93 of file mitkDataInteractor.cpp.
|
protectedvirtual |
Sends StartInteraction event via the mitk::DataNode.
Definition at line 88 of file mitkDataInteractor.cpp.
|
virtual |
Reimplemented in mitk::AffineBaseDataInteractor3D.
Definition at line 44 of file mitkDataInteractor.cpp.
References mitk::DataNodeChanged(), and mitk::DataNode::SetDataInteractor().
Referenced by mitk::AffineBaseDataInteractor3D::SetDataNode(), and mitk::GizmoInteractor::SetGizmoNode().
|
static |
Definition at line 56 of file mitkDataInteractor.h.
|
static |
Definition at line 58 of file mitkDataInteractor.h.
|
static |
Definition at line 57 of file mitkDataInteractor.h.