Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MITKPOINTSETINTERACTOR_H_HEADER_INCLUDED_C11202FF
00020 #define MITKPOINTSETINTERACTOR_H_HEADER_INCLUDED_C11202FF
00021
00022 #include "mitkCommon.h"
00023 #include "mitkVector.h"
00024 #include <mitkInteractor.h>
00025
00026 namespace mitk
00027 {
00028 class DataNode;
00029
00044 class MITK_CORE_EXPORT PointSetInteractor : public Interactor
00045 {
00046 public:
00047 mitkClassMacro(PointSetInteractor, Interactor);
00048 mitkNewMacro3Param(Self, const char*, DataNode*, int);
00049 mitkNewMacro2Param(Self, const char*, DataNode*);
00050
00055 void Clear( unsigned int timeStep = 0, ScalarType timeInMS = 0.0 );
00056
00058 void SetPrecision( unsigned int precision );
00059
00066 virtual float CanHandleEvent(StateEvent const* stateEvent) const;
00067
00071 virtual void DataChanged();
00072
00073 protected:
00080 PointSetInteractor(const char * type, DataNode* dataNode, int n = -1);
00081
00085 virtual ~PointSetInteractor();
00086
00090 virtual bool ExecuteAction( Action* action, mitk::StateEvent const* stateEvent );
00091
00095 void UnselectAll( unsigned int timeStep = 0, ScalarType timeInMS = 0.0 );
00096
00102 void SelectPoint( int position, unsigned int timeStep = 0, ScalarType timeInMS = 0.0 );
00103
00107 Point3D m_LastPoint;
00108
00110 Vector3D m_SumVec;
00111
00112 private:
00113
00119 int m_N;
00120
00122 unsigned int m_Precision;
00123
00127 void InitAccordingToNumberOfPoints();
00128 };
00129 }
00130 #endif