Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::SinglePointDataInteractor Class Reference

Implementation of the single point interaction. More...

#include <mitkSinglePointDataInteractor.h>

Inheritance diagram for mitk::SinglePointDataInteractor:
Collaboration diagram for mitk::SinglePointDataInteractor:

Public Types

typedef SinglePointDataInteractor Self
 
typedef PointSetDataInteractor Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
- Public Types inherited from mitk::PointSetDataInteractor
typedef PointSetDataInteractor Self
 
typedef DataInteractor Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
- Public Types inherited from mitk::DataInteractor
typedef DataInteractor Self
 
typedef EventStateMachine Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
- Public Types inherited from mitk::EventStateMachine
typedef EventStateMachine Self
 
typedef InteractionEventHandler Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef std::map< std::string, TActionFunctor * > ActionFunctionsMapType
 
typedef itk::SmartPointer< StateMachineStateStateMachineStateType
 
- Public Types inherited from mitk::InteractionEventHandler
typedef InteractionEventHandler Self
 
typedef itk::Object Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 

Public Member Functions

virtual std::vector< std::string > GetClassHierarchy () const override
 
virtual const char * GetClassName () const
 
Pointer Clone () const
 
- Public Member Functions inherited from mitk::PointSetDataInteractor
Pointer Clone () const
 
void SetAccuracy (float accuracy)
 
void SetMaxPoints (unsigned int maxNumber=0)
 SetMaxPoints Sets the maximal number of points for the pointset Default ist zero, which result in infinite number of allowed points. More...
 
- Public Member Functions inherited from mitk::DataInteractor
Pointer Clone () const
 
DataNodeGetDataNode () 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::PointSetDataInteractor
static const char * GetStaticNameOfClass ()
 
static Pointer New ()
 
- Static Public Member Functions inherited from mitk::DataInteractor
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 ()
 

Protected Member Functions

 SinglePointDataInteractor ()
 
virtual ~SinglePointDataInteractor ()
 
virtual void AddPoint (StateMachineAction *, InteractionEvent *event) override
 
virtual void SetMaxPoints (unsigned int=0)
 SetMaxPoints Sets the maximal number of points for the pointset Overwritten, per design this class will always have a maximal number of one. More...
 
virtual void DataNodeChanged () override
 
- Protected Member Functions inherited from mitk::PointSetDataInteractor
 PointSetDataInteractor ()
 
virtual ~PointSetDataInteractor ()
 
virtual void ConnectActionsAndFunctions () override
 
virtual int GetPointIndexByPosition (Point3D position, unsigned int time=0, float accuracy=-1)
 Return index in PointSet of the point that is within given accuracy to the provided position. More...
 
virtual bool CheckSelection (const InteractionEvent *interactionEvent)
 
virtual void RemovePoint (StateMachineAction *, InteractionEvent *interactionEvent)
 
virtual void IsClosedContour (StateMachineAction *, InteractionEvent *)
 
virtual void MovePoint (StateMachineAction *, InteractionEvent *)
 
virtual void InitMove (StateMachineAction *, InteractionEvent *interactionEvent)
 
virtual void FinishMove (StateMachineAction *, InteractionEvent *)
 
virtual void SelectPoint (StateMachineAction *, InteractionEvent *)
 
virtual void UnSelectPointAtPosition (StateMachineAction *, InteractionEvent *)
 
virtual void UnSelectAll (StateMachineAction *, InteractionEvent *)
 
virtual void UpdatePointSet (StateMachineAction *stateMachineAction, InteractionEvent *)
 UpdatePointSet Updates the member variable that holds the point set, evaluating the time step of the sender. More...
 
virtual void Abort (StateMachineAction *, InteractionEvent *)
 
void UnselectAll (unsigned int timeStep, ScalarType timeInMs)
 
void SelectPoint (int position, unsigned int timeStep, ScalarType timeInMS)
 
- Protected Member Functions inherited from mitk::DataInteractor
 DataInteractor ()
 
virtual ~DataInteractor ()
 
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)
 
StateMachineStateGetCurrentState () 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...
 
StateMachineTransitionGetExecutableTransition (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

- Static Public Attributes inherited from mitk::DataInteractor
static const std::string IntDeactivateMe
 
static const std::string IntLeaveWidget
 
static const std::string IntEnterWidget
 
- Protected Types inherited from mitk::EventStateMachine
typedef MessageAbstractDelegate2< StateMachineAction *, InteractionEvent *, void > ActionFunctionDelegate
 
typedef MessageAbstractDelegate1< const InteractionEvent *, bool > ConditionFunctionDelegate
 
- Protected Attributes inherited from mitk::PointSetDataInteractor
Point3D m_LastPoint
 to calculate a direction vector from last point and actual point More...
 
Vector3D m_SumVec
 summ-vector for Movement More...
 
PointSet::Pointer m_PointSet
 
int m_MaxNumberOfPoints
 
float m_SelectionAccuracy
 
- Protected Attributes inherited from mitk::EventStateMachine
bool m_IsActive
 
UndoControllerm_UndoController
 
bool m_UndoEnabled
 

Detailed Description

Implementation of the single point interaction.

Class SinglePointDataInteractor Interactor operates on a single point set, when a data node is set, its containing point set is clear for initialization.

Definition at line 39 of file mitkSinglePointDataInteractor.h.

Member Typedef Documentation

Constructor & Destructor Documentation

mitk::SinglePointDataInteractor::SinglePointDataInteractor ( )
protected

Definition at line 31 of file mitkSinglePointDataInteractor.cpp.

References SetMaxPoints().

mitk::SinglePointDataInteractor::~SinglePointDataInteractor ( )
protectedvirtual

Definition at line 36 of file mitkSinglePointDataInteractor.cpp.

Member Function Documentation

void mitk::SinglePointDataInteractor::AddPoint ( StateMachineAction ,
InteractionEvent event 
)
overrideprotectedvirtual

Adds a point at the given coordinates. This function overwrites the behavior of PointSetDataInteractor such that instead of adding new points the first points position is updated. All other interaction (move,delete) is still handled by PointSetDataInteractor.

Reimplemented from mitk::PointSetDataInteractor.

Definition at line 40 of file mitkSinglePointDataInteractor.cpp.

References GetData(), mitk::InteractionPositionEvent::GetPositionInWorld(), mitk::BaseRenderer::GetRenderingManager(), mitk::InteractionEvent::GetSender(), mitk::BaseRenderer::GetTime(), mitk::BaseRenderer::GetTimeStep(), mitk::UndoStackItem::IncCurrObjectEventId(), mitk::OpINSERT, mitk::OpMOVE, mitk::OpREMOVE, and mitk::RenderingManager::RequestUpdateAll().

Pointer mitk::SinglePointDataInteractor::Clone ( ) const
void mitk::SinglePointDataInteractor::DataNodeChanged ( )
overrideprotectedvirtual

This function is called when a DataNode has been set/changed. It is used to initialize the DataNode, e.g. if no PointSet exists yet it is created and added to the DataNode.

Reimplemented from mitk::PointSetDataInteractor.

Definition at line 91 of file mitkSinglePointDataInteractor.cpp.

References mitk::BaseData::Clear(), and mitk::PointSet::New().

virtual std::vector<std::string> mitk::SinglePointDataInteractor::GetClassHierarchy ( ) const
inlineoverridevirtual

Reimplemented from mitk::PointSetDataInteractor.

Definition at line 42 of file mitkSinglePointDataInteractor.h.

virtual const char* mitk::SinglePointDataInteractor::GetClassName ( ) const
virtual

Reimplemented from mitk::PointSetDataInteractor.

static const char* mitk::SinglePointDataInteractor::GetStaticNameOfClass ( )
inlinestatic

Definition at line 42 of file mitkSinglePointDataInteractor.h.

static Pointer mitk::SinglePointDataInteractor::New ( )
static
virtual void mitk::SinglePointDataInteractor::SetMaxPoints ( unsigned int  = 0)
inlineprotectedvirtual

SetMaxPoints Sets the maximal number of points for the pointset Overwritten, per design this class will always have a maximal number of one.

Parameters
maxNumber

Definition at line 59 of file mitkSinglePointDataInteractor.h.

Referenced by SinglePointDataInteractor().


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