Medical Imaging Interaction Toolkit  2018.4.99-4c24e3cb
Medical Imaging Interaction Toolkit
mitkPointSetDataInteractor.cpp
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
14 #include "mitkMouseMoveEvent.h"
15 
16 #include "mitkInteractionConst.h" // TODO: refactor file
17 #include "mitkInternalEvent.h"
18 #include "mitkOperationEvent.h"
19 #include "mitkRenderingManager.h"
20 #include <mitkPointOperation.h>
21 //
22 #include "mitkBaseRenderer.h"
23 #include "mitkDispatcher.h"
24 
25 #include "mitkUndoController.h"
26 
28 {
29  // Condition which is evaluated before transition is taken
30  // following actions in the statemachine are only executed if it returns TRUE
31  CONNECT_CONDITION("isoverpoint", CheckSelection);
32  CONNECT_FUNCTION("addpoint", AddPoint);
33  CONNECT_FUNCTION("selectpoint", SelectPoint);
35  CONNECT_FUNCTION("unselectAll", UnSelectAll);
36  CONNECT_FUNCTION("initMove", InitMove);
37  CONNECT_FUNCTION("movePoint", MovePoint);
38  CONNECT_FUNCTION("finishMovement", FinishMove);
39  CONNECT_FUNCTION("removePoint", RemovePoint);
40 }
41 
43 {
44  unsigned int timeStep = interactionEvent->GetSender()->GetTimeStep(GetDataNode()->GetData());
45  ScalarType timeInMs = interactionEvent->GetSender()->GetTime();
46 
47  // disallow adding of new points if maximum number of points is reached
48  if (m_MaxNumberOfPoints > 1 && m_PointSet->GetSize(timeStep) >= m_MaxNumberOfPoints)
49  {
50  return;
51  }
52  // To add a point the minimal information is the position, this method accepts all InteractionsPositionEvents
53  auto *positionEvent = dynamic_cast<InteractionPositionEvent *>(interactionEvent);
54  if (positionEvent != nullptr)
55  {
56  mitk::Point3D itkPoint = positionEvent->GetPositionInWorld();
57 
58  this->UnselectAll(timeStep, timeInMs);
59 
60  int lastPosition = 0;
62  it = m_PointSet->Begin(timeStep);
63  end = m_PointSet->End(timeStep);
64  while (it != end)
65  {
66  if (!m_PointSet->IndexExists(lastPosition, timeStep))
67  break;
68  ++it;
69  ++lastPosition;
70  }
71 
72  // Insert a Point to the PointSet
73  // 2) Create the Operation inserting the point
74  if (m_PointSet->IsEmpty()) { lastPosition = 0; }
75  auto *doOp = new mitk::PointOperation(OpINSERT, timeInMs, itkPoint, lastPosition);
76 
77  // 3) If Undo is enabled, also create the inverse Operation
78  if (m_UndoEnabled)
79  {
80  auto *undoOp = new mitk::PointOperation(OpREMOVE, timeInMs, itkPoint, lastPosition);
81  // 4) Do and Undo Operations are combined in an Operation event which also contains the target of the operations
82  // (here m_PointSet)
83  OperationEvent *operationEvent = new OperationEvent(m_PointSet, doOp, undoOp, "Add point");
84  // 5) Store the Operation in the UndoController
86  m_UndoController->SetOperationEvent(operationEvent);
87  }
88 
89  // 6) Execute the Operation performs the actual insertion of the point into the PointSet
90  m_PointSet->ExecuteOperation(doOp);
91 
92  // 7) If Undo is not enabled the Do-Operation is to be dropped to prevent memory leaks.
93  if (!m_UndoEnabled)
94  delete doOp;
95 
97 
98  // Check if points form a closed contour now, if so fire an InternalEvent
99  IsClosedContour(stateMachineAction, interactionEvent);
100 
101  if (m_MaxNumberOfPoints > 0 && m_PointSet->GetSize(timeStep) >= m_MaxNumberOfPoints)
102  {
103  // Signal that DataNode is fully filled
104  this->NotifyResultReady();
105  // Send internal event that can be used by StateMachines to switch in a different state
106  InternalEvent::Pointer event = InternalEvent::New(nullptr, this, "MaximalNumberOfPoints");
107  positionEvent->GetSender()->GetDispatcher()->QueueEvent(event.GetPointer());
108  }
109  }
110 }
111 
113 {
114  unsigned int timeStep = interactionEvent->GetSender()->GetTimeStep(GetDataNode()->GetData());
115  ScalarType timeInMs = interactionEvent->GetSender()->GetTime();
116 
117  auto *positionEvent = dynamic_cast<InteractionPositionEvent *>(interactionEvent);
118  if (positionEvent != nullptr)
119  {
120  Point3D point = positionEvent->GetPositionInWorld();
121  // iterate over point set and check if it contains a point close enough to the pointer to be selected
122  int index = GetPointIndexByPosition(point, timeStep);
123  if (index != -1)
124  {
125  // first deselect the other points
126  // undoable deselect of all points in the DataList
127  this->UnselectAll(timeStep, timeInMs);
128 
129  auto *doOp = new mitk::PointOperation(OpSELECTPOINT, timeInMs, point, index);
130 
131  /*if (m_UndoEnabled)
132  {
133  PointOperation* undoOp = new mitk::PointOperation(OpDESELECTPOINT,timeInMs,point, index);
134  OperationEvent *operationEvent = new OperationEvent(m_PointSet, doOp, undoOp, "Select Point");
135  OperationEvent::IncCurrObjectEventId();
136  m_UndoController->SetOperationEvent(operationEvent);
137  }*/
138 
139  // execute the Operation
140  m_PointSet->ExecuteOperation(doOp);
141 
142  if (!m_UndoEnabled)
143  delete doOp;
144 
146  }
147  }
148 }
149 
151 {
152 }
153 
155 {
156 }
157 
159 {
160  unsigned int timeStep = interactionEvent->GetSender()->GetTimeStep(GetDataNode()->GetData());
161  ScalarType timeInMs = interactionEvent->GetSender()->GetTime();
162 
163  auto *positionEvent = dynamic_cast<InteractionPositionEvent *>(interactionEvent);
164  if (positionEvent != nullptr)
165  {
166  mitk::Point3D itkPoint = positionEvent->GetPositionInWorld();
167 
168  // search the point in the list
169  int position = m_PointSet->SearchPoint(itkPoint, m_SelectionAccuracy, timeStep);
170  if (position >= 0) // found a point
171  {
172  PointSet::PointType pt = m_PointSet->GetPoint(position, timeStep);
173  itkPoint[0] = pt[0];
174  itkPoint[1] = pt[1];
175  itkPoint[2] = pt[2];
176 
177  auto *doOp = new mitk::PointOperation(OpREMOVE, timeInMs, itkPoint, position);
178  if (m_UndoEnabled) // write to UndoMechanism
179  {
180  auto *undoOp = new mitk::PointOperation(OpINSERT, timeInMs, itkPoint, position);
181  OperationEvent *operationEvent = new OperationEvent(m_PointSet, doOp, undoOp, "Remove point");
183  m_UndoController->SetOperationEvent(operationEvent);
184  }
185  // execute the Operation
186  m_PointSet->ExecuteOperation(doOp);
187 
188  if (!m_UndoEnabled)
189  delete doOp;
190 
191  /*now select the point "position-1",
192  and if it is the first in list,
193  then continue at the last in list*/
194  // only then a select of a point is possible!
195  if (m_PointSet->GetSize(timeStep) > 0)
196  {
197  this->SelectPoint(m_PointSet->Begin(timeStep)->Index(), timeStep, timeInMs);
198  }
199  }
201  }
202 }
203 
205 {
206  unsigned int timeStep = interactionEvent->GetSender()->GetTimeStep(GetDataNode()->GetData());
207 
208  auto *positionEvent = dynamic_cast<InteractionPositionEvent *>(interactionEvent);
209  if (positionEvent != nullptr)
210  {
211  Point3D point = positionEvent->GetPositionInWorld();
212  // iterate over point set and check if it contains a point close enough to the pointer to be selected
213  if (GetPointIndexByPosition(point, timeStep) != -1 && m_PointSet->GetSize(timeStep) >= 3)
214  {
215  InternalEvent::Pointer event = InternalEvent::New(nullptr, this, "ClosedContour");
216  positionEvent->GetSender()->GetDispatcher()->QueueEvent(event.GetPointer());
217  }
218  }
219 }
220 
222 {
223  unsigned int timeStep = interactionEvent->GetSender()->GetTimeStep(GetDataNode()->GetData());
224  ScalarType timeInMs = interactionEvent->GetSender()->GetTime();
225  auto *positionEvent = dynamic_cast<InteractionPositionEvent *>(interactionEvent);
226  if (positionEvent != nullptr)
227  {
228  IsClosedContour(stateMachineAction, interactionEvent);
229  mitk::Point3D newPoint, resultPoint;
230  newPoint = positionEvent->GetPositionInWorld();
231 
232  // search the elements in the list that are selected then calculate the
233  // vector, because only with the vector we can move several elements in
234  // the same direction
235  // newPoint - lastPoint = vector
236  // then move all selected and set the lastPoint = newPoint.
237  // then add all vectors to a summeryVector (to be able to calculate the
238  // startpoint for undoOperation)
239  mitk::Vector3D dirVector = newPoint - m_LastPoint;
240 
241  // sum up all Movement for Undo in FinishMovement
242  m_SumVec = m_SumVec + dirVector;
243 
245  it = m_PointSet->Begin(timeStep);
246  end = m_PointSet->End(timeStep);
247  while (it != end)
248  {
249  int position = it->Index();
250  if (m_PointSet->GetSelectInfo(position, timeStep)) // if selected
251  {
252  PointSet::PointType pt = m_PointSet->GetPoint(position, timeStep);
253  mitk::Point3D sumVec;
254  sumVec[0] = pt[0];
255  sumVec[1] = pt[1];
256  sumVec[2] = pt[2];
257  resultPoint = sumVec + dirVector;
258  auto *doOp = new mitk::PointOperation(OpMOVE, timeInMs, resultPoint, position);
259  // execute the Operation
260  // here no undo is stored, because the movement-steps aren't interesting.
261  // only the start and the end is interisting to store for undo.
262  m_PointSet->ExecuteOperation(doOp);
263  delete doOp;
264  }
265  ++it;
266  }
267  m_LastPoint = newPoint; // for calculation of the direction vector
268  // Update the display
270  IsClosedContour(stateMachineAction, interactionEvent);
271  }
272 }
273 
275 {
276  unsigned int timeStep = interactionEvent->GetSender()->GetTimeStep(GetDataNode()->GetData());
277  ScalarType timeInMs = interactionEvent->GetSender()->GetTime();
278 
279  auto *positionEvent = dynamic_cast<InteractionPositionEvent *>(interactionEvent);
280  if (positionEvent != nullptr)
281  {
282  Point3D point = positionEvent->GetPositionInWorld();
283  // iterate over point set and check if it contains a point close enough to the pointer to be selected
284  int index = GetPointIndexByPosition(point, timeStep);
285  // here it is ensured that we don't switch from one point being selected to another one being selected,
286  // without accepting the unselect of the current point
287  if (index != -1)
288  {
289  auto *doOp = new mitk::PointOperation(OpDESELECTPOINT, timeInMs, point, index);
290 
291  /*if (m_UndoEnabled)
292  {
293  PointOperation* undoOp = new mitk::PointOperation(OpSELECTPOINT,timeInMs, point, index);
294  OperationEvent *operationEvent = new OperationEvent(m_PointSet, doOp, undoOp, "Unselect Point");
295  OperationEvent::IncCurrObjectEventId();
296  m_UndoController->SetOperationEvent(operationEvent);
297  }*/
298 
299  m_PointSet->ExecuteOperation(doOp);
300 
301  if (!m_UndoEnabled)
302  delete doOp;
303 
305  }
306  }
307 }
308 
310 {
311  unsigned int timeStep = interactionEvent->GetSender()->GetTimeStep(GetDataNode()->GetData());
312  ScalarType timeInMs = interactionEvent->GetSender()->GetTime();
313 
314  auto *positionEvent = dynamic_cast<InteractionPositionEvent *>(interactionEvent);
315  if (positionEvent != nullptr)
316  {
317  Point3D positioninWorld = positionEvent->GetPositionInWorld();
318  PointSet::PointsContainer::Iterator it, end;
319 
320  PointSet::DataType *itkPointSet = m_PointSet->GetPointSet(timeStep);
321 
322  end = itkPointSet->GetPoints()->End();
323 
324  for (it = itkPointSet->GetPoints()->Begin(); it != end; it++)
325  {
326  int position = it->Index();
327  // then declare an operation which unselects this point;
328  // UndoOperation as well!
329  if (m_PointSet->GetSelectInfo(position, timeStep))
330  {
331  float distance = sqrt(positioninWorld.SquaredEuclideanDistanceTo(m_PointSet->GetPoint(position, timeStep)));
332  if (distance > m_SelectionAccuracy)
333  {
334  mitk::Point3D noPoint;
335  noPoint.Fill(0);
336  auto *doOp = new mitk::PointOperation(OpDESELECTPOINT, timeInMs, noPoint, position);
337 
338  /*if ( m_UndoEnabled )
339  {
340  mitk::PointOperation* undoOp = new mitk::PointOperation(OpSELECTPOINT, timeInMs, noPoint, position);
341  OperationEvent *operationEvent = new OperationEvent( m_PointSet, doOp, undoOp, "Unselect Point" );
342  OperationEvent::IncCurrObjectEventId();
343  m_UndoController->SetOperationEvent( operationEvent );
344  }*/
345 
346  m_PointSet->ExecuteOperation(doOp);
347 
348  if (!m_UndoEnabled)
349  delete doOp;
350  }
351  }
352  }
353  }
354  else
355  {
356  this->UnselectAll(timeStep, timeInMs);
357  }
358 
360 }
361 
363 {
364  auto *pointSet = dynamic_cast<mitk::PointSet *>(this->GetDataNode()->GetData());
365  if (pointSet == nullptr)
366  {
367  MITK_ERROR << "PointSetDataInteractor:: No valid point set .";
368  return;
369  }
370 
371  m_PointSet = pointSet;
372 }
373 
375 {
377  interactionEvent->GetSender()->GetDispatcher()->QueueEvent(event.GetPointer());
378 }
379 
380 /*
381  * Check whether the DataNode contains a pointset, if not create one and add it.
382  */
384 {
385  if (GetDataNode() != nullptr)
386  {
387  auto *points = dynamic_cast<PointSet *>(GetDataNode()->GetData());
388  if (points == nullptr)
389  {
392  }
393  else
394  {
395  m_PointSet = points;
396  }
397  // load config file parameter: maximal number of points
399  std::string strNumber;
400  if (properties->GetStringProperty("MaxPoints", strNumber))
401  {
402  m_MaxNumberOfPoints = atoi(strNumber.c_str());
403  }
404  }
405 }
406 
408 {
409  auto *positionEvent = dynamic_cast<InteractionPositionEvent *>(interactionEvent);
410 
411  if (positionEvent == nullptr)
412  return;
413 
414  // start of the Movement is stored to calculate the undoKoordinate
415  // in FinishMovement
416  m_LastPoint = positionEvent->GetPositionInWorld();
417 
418  // initialize a value to calculate the movement through all
419  // MouseMoveEvents from MouseClick to MouseRelease
420  m_SumVec.Fill(0);
421 
422  GetDataNode()->SetProperty("contourcolor", ColorProperty::New(1.0, 1.0, 1.0));
423 }
424 
426 {
427  unsigned int timeStep = interactionEvent->GetSender()->GetTimeStep(GetDataNode()->GetData());
428  ScalarType timeInMs = interactionEvent->GetSender()->GetTime();
429 
430  auto *positionEvent = dynamic_cast<InteractionPositionEvent *>(interactionEvent);
431 
432  if (positionEvent != nullptr)
433  {
434  // finish the movement:
435  // the final point is m_LastPoint
436  // m_SumVec stores the movement in a vector
437  // the operation would not be necessary, but we need it for the undo Operation.
438  // m_LastPoint is for the Operation
439  // the point for undoOperation calculates from all selected
440  // elements (point) - m_SumVec
441 
442  // search all selected elements and move them with undo-functionality.
443 
445  it = m_PointSet->Begin(timeStep);
446  end = m_PointSet->End(timeStep);
447  while (it != end)
448  {
449  int position = it->Index();
450  if (m_PointSet->GetSelectInfo(position, timeStep)) // if selected
451  {
452  PointSet::PointType pt = m_PointSet->GetPoint(position, timeStep);
453  Point3D itkPoint;
454  itkPoint[0] = pt[0];
455  itkPoint[1] = pt[1];
456  itkPoint[2] = pt[2];
457  auto *doOp = new mitk::PointOperation(OpMOVE, timeInMs, itkPoint, position);
458 
459  if (m_UndoEnabled) //&& (posEvent->GetType() == mitk::Type_MouseButtonRelease)
460  {
461  // set the undo-operation, so the final position is undo-able
462  // calculate the old Position from the already moved position - m_SumVec
463  mitk::Point3D undoPoint = (itkPoint - m_SumVec);
464  auto *undoOp = new mitk::PointOperation(OpMOVE, timeInMs, undoPoint, position);
465  OperationEvent *operationEvent = new OperationEvent(m_PointSet, doOp, undoOp, "Move point");
467  m_UndoController->SetOperationEvent(operationEvent);
468  }
469  // execute the Operation
470  m_PointSet->ExecuteOperation(doOp);
471 
472  if (!m_UndoEnabled)
473  delete doOp;
474  }
475  ++it;
476  }
477 
478  // Update the display
480  }
481  else
482  {
483  return;
484  }
485  this->NotifyResultReady();
486 }
487 
489 {
490  m_SelectionAccuracy = accuracy;
491 }
492 
493 void mitk::PointSetDataInteractor::SetMaxPoints(unsigned int maxNumber)
494 {
495  m_MaxNumberOfPoints = maxNumber;
496 }
497 
498 int mitk::PointSetDataInteractor::GetPointIndexByPosition(Point3D position, unsigned int time, float accuracy)
499 {
500  // iterate over point set and check if it contains a point close enough to the pointer to be selected
501  auto *points = dynamic_cast<PointSet *>(GetDataNode()->GetData());
502  int index = -1;
503  if (points == nullptr)
504  {
505  return index;
506  }
507 
508  if (points->GetPointSet(time) == nullptr)
509  return -1;
510 
511  PointSet::PointsContainer *pointsContainer = points->GetPointSet(time)->GetPoints();
512 
513  float minDistance = m_SelectionAccuracy;
514  if (accuracy != -1)
515  minDistance = accuracy;
516 
517  for (PointSet::PointsIterator it = pointsContainer->Begin(); it != pointsContainer->End(); it++)
518  {
519  float distance = sqrt(position.SquaredEuclideanDistanceTo(points->GetPoint(it->Index(), time)));
520  if (distance <
521  minDistance) // if several points fall within the margin, choose the one with minimal distance to position
522  {
523  index = it->Index();
524  }
525  }
526  return index;
527 }
528 
530 {
531  const auto *positionEvent = dynamic_cast<const InteractionPositionEvent *>(interactionEvent);
532  if (positionEvent != nullptr)
533  {
534  int timeStep = positionEvent->GetSender()->GetTimeStep();
535  Point3D point = positionEvent->GetPositionInWorld();
536  // iterate over point set and check if it contains a point close enough to the pointer to be selected
537  int index = GetPointIndexByPosition(point, timeStep);
538  if (index != -1)
539  return true;
540  }
541  return false;
542 }
543 
544 void mitk::PointSetDataInteractor::UnselectAll(unsigned int timeStep, ScalarType timeInMs)
545 {
546  auto *pointSet = dynamic_cast<mitk::PointSet *>(GetDataNode()->GetData());
547  if (pointSet == nullptr)
548  {
549  return;
550  }
551 
552  mitk::PointSet::DataType *itkPointSet = pointSet->GetPointSet(timeStep);
553  if (itkPointSet == nullptr)
554  {
555  return;
556  }
557 
558  mitk::PointSet::PointsContainer::Iterator it, end;
559  end = itkPointSet->GetPoints()->End();
560 
561  for (it = itkPointSet->GetPoints()->Begin(); it != end; it++)
562  {
563  int position = it->Index();
564  PointSet::PointDataType pointData = {0, false, PTUNDEFINED};
565  itkPointSet->GetPointData(position, &pointData);
566 
567  // then declare an operation which unselects this point;
568  // UndoOperation as well!
569  if (pointData.selected)
570  {
571  mitk::Point3D noPoint;
572  noPoint.Fill(0);
573  auto *doOp = new mitk::PointOperation(OpDESELECTPOINT, timeInMs, noPoint, position);
574 
575  /*if ( m_UndoEnabled )
576  {
577  mitk::PointOperation *undoOp =
578  new mitk::PointOperation(OpSELECTPOINT, timeInMs, noPoint, position);
579  OperationEvent *operationEvent = new OperationEvent( pointSet, doOp, undoOp, "Unselect Point" );
580  OperationEvent::IncCurrObjectEventId();
581  m_UndoController->SetOperationEvent( operationEvent );
582  }*/
583 
584  pointSet->ExecuteOperation(doOp);
585 
586  if (!m_UndoEnabled)
587  delete doOp;
588  }
589  }
590 }
591 
592 void mitk::PointSetDataInteractor::SelectPoint(int position, unsigned int timeStep, ScalarType timeInMS)
593 {
594  auto *pointSet = dynamic_cast<mitk::PointSet *>(this->GetDataNode()->GetData());
595 
596  // if List is empty, then no selection of a point can be done!
597  if ((pointSet == nullptr) || (pointSet->GetSize(timeStep) <= 0))
598  {
599  return;
600  }
601 
602  // dummyPoint... not needed anyway
603  mitk::Point3D noPoint;
604  noPoint.Fill(0);
605 
606  auto *doOp = new mitk::PointOperation(OpSELECTPOINT, timeInMS, noPoint, position);
607 
608  /*if ( m_UndoEnabled )
609  {
610  mitk::PointOperation* undoOp = new mitk::PointOperation(OpDESELECTPOINT,timeInMS, noPoint, position);
611 
612  OperationEvent *operationEvent = new OperationEvent(pointSet, doOp, undoOp, "Select Point");
613  OperationEvent::IncCurrObjectEventId();
614  m_UndoController->SetOperationEvent(operationEvent);
615  }*/
616 
617  pointSet->ExecuteOperation(doOp);
618 
619  if (!m_UndoEnabled)
620  delete doOp;
621 }
void UnselectAll(unsigned int timeStep, ScalarType timeInMs)
MeshType DataType
Definition: mitkPointSet.h:129
ScalarType GetTime() const
Get the time in ms of the currently displayed content.
DataType::PointsContainerIterator PointsIterator
Definition: mitkPointSet.h:133
Super class for all position events.
virtual void InitMove(StateMachineAction *, InteractionEvent *interactionEvent)
#define MITK_ERROR
Definition: mitkLogMacros.h:20
double ScalarType
virtual void RemovePoint(StateMachineAction *, InteractionEvent *interactionEvent)
static Pointer New()
static Pointer New()
virtual void SetData(mitk::BaseData *baseData)
Set the data object (instance of BaseData, e.g., an Image) managed by this DataNode.
virtual void MovePoint(StateMachineAction *, InteractionEvent *)
virtual void UpdatePointSet(StateMachineAction *stateMachineAction, InteractionEvent *)
UpdatePointSet Updates the member variable that holds the point set, evaluating the time step of the ...
struct for data of a point
Definition: mitkPointSet.h:91
void SetMaxPoints(unsigned int maxNumber=0)
SetMaxPoints Sets the maximal number of points for the pointset Default ist zero, which result in inf...
virtual void AddPoint(StateMachineAction *, InteractionEvent *event)
Constants for most interaction classes, due to the generic StateMachines.
bool SetOperationEvent(UndoStackItem *operationEvent)
Point3D m_LastPoint
to calculate a direction vector from last point and actual point
virtual bool CheckSelection(const InteractionEvent *interactionEvent)
DataNode * GetDataNode() const
Vector3D m_SumVec
summ-vector for Movement
virtual void Abort(StateMachineAction *, InteractionEvent *)
BaseRenderer * GetSender() const
void SetProperty(const std::string &propertyKey, BaseProperty *property, const std::string &contextName="", bool fallBackOnDefaultContext=false) override
Add new or change existent property.
BaseData * GetData() const
Get the data object (instance of BaseData, e.g., an Image) managed by this DataNode.
Data structure which stores a set of points. Superclass of mitk::Mesh.
Definition: mitkPointSet.h:75
static RenderingManager * GetInstance()
Represents an action, that is executed after a certain event (in statemachine-mechanism) TODO: implem...
virtual unsigned int GetTimeStep() const
virtual DataType::Pointer GetPointSet(int t=0) const
returns the pointset
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...
virtual void UnSelectAll(StateMachineAction *, InteractionEvent *)
virtual void SelectPoint(StateMachineAction *, InteractionEvent *)
Operation that handles all actions on one Point.
static const std::string IntDeactivateMe
virtual void IsClosedContour(StateMachineAction *, InteractionEvent *)
DataType::PointsContainer PointsContainer
Definition: mitkPointSet.h:132
#define CONNECT_CONDITION(a, f)
virtual void NotifyResultReady()
NotifyResultReady Sends ResultReady event via the mitk::DataNode.
virtual void UnSelectPointAtPosition(StateMachineAction *, InteractionEvent *)
Dispatcher::Pointer GetDispatcher() const
Returns the Dispatcher which handles Events for this BaseRenderer.
virtual void FinishMove(StateMachineAction *, InteractionEvent *)
PropertyList::Pointer GetAttributes() const
static Pointer New(BaseRenderer *_arga, DataInteractor *_argb, const std::string &_argc)
static void IncCurrObjectEventId()
Increases the current ObjectEventId For example if a button click generates operations the ObjectEven...
#define CONNECT_FUNCTION(a, f)
void RequestUpdateAll(RequestType type=REQUEST_UPDATE_ALL)
Represents a pair of operations: undo and the according redo.