Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkAffineBaseDataInteractor3D.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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
18 
19 #include <mitkInteractionConst.h>
21 #include <mitkRotationOperation.h>
22 #include <mitkScaleOperation.h>
23 #include <mitkSurface.h>
24 
26 #include <vtkCamera.h>
27 #include <vtkInteractorObserver.h>
28 #include <vtkInteractorStyle.h>
29 #include <vtkPointData.h>
30 #include <vtkPolyData.h>
31 #include <vtkRenderWindowInteractor.h>
32 
33 // Properties to allow the user to interact with the base data
34 const char *translationStepSizePropertyName = "AffineBaseDataInteractor3D.Translation Step Size";
35 const char *selectedColorPropertyName = "AffineBaseDataInteractor3D.Selected Color";
36 const char *deselectedColorPropertyName = "AffineBaseDataInteractor3D.Deselected Color";
37 const char *priorPropertyName = "AffineBaseDataInteractor3D.Prior Color";
38 const char *rotationStepSizePropertyName = "AffineBaseDataInteractor3D.Rotation Step Size";
39 const char *scaleStepSizePropertyName = "AffineBaseDataInteractor3D.Scale Step Size";
40 const char *anchorPointX = "AffineBaseDataInteractor3D.Anchor Point X";
41 const char *anchorPointY = "AffineBaseDataInteractor3D.Anchor Point Y";
42 const char *anchorPointZ = "AffineBaseDataInteractor3D.Anchor Point Z";
43 
45 {
46  m_OriginalGeometry = mitk::Geometry3D::New();
47 }
48 
50 {
51  this->RestoreNodeProperties();
52 }
53 
55 {
56  // **Conditions** that can be used in the state machine, to ensure that certain conditions are met, before actually
57  // executing an action
58  CONNECT_CONDITION("isOverObject", CheckOverObject);
59 
60  // **Function** in the statmachine patterns also referred to as **Actions**
61  CONNECT_FUNCTION("selectObject", SelectObject);
62  CONNECT_FUNCTION("deselectObject", DeselectObject);
63  CONNECT_FUNCTION("initTranslate", InitTranslate);
64  CONNECT_FUNCTION("initRotate", InitRotate);
65  CONNECT_FUNCTION("translateObject", TranslateObject);
66  CONNECT_FUNCTION("rotateObject", RotateObject);
67  CONNECT_FUNCTION("scaleObject", ScaleObject);
68 
69  CONNECT_FUNCTION("translateUpKey", TranslateUpKey);
70  CONNECT_FUNCTION("translateDownKey", TranslateDownKey);
71  CONNECT_FUNCTION("translateLeftKey", TranslateLeftKey);
72  CONNECT_FUNCTION("translateRightKey", TranslateRightKey);
73  CONNECT_FUNCTION("translateUpModifierKey", TranslateUpModifierKey);
74  CONNECT_FUNCTION("translateDownModifierKey", TranslateDownModifierKey);
75 
76  CONNECT_FUNCTION("scaleDownKey", ScaleDownKey);
77  CONNECT_FUNCTION("scaleUpKey", ScaleUpKey);
78 
79  CONNECT_FUNCTION("rotateUpKey", RotateUpKey);
80  CONNECT_FUNCTION("rotateDownKey", RotateDownKey);
81  CONNECT_FUNCTION("rotateLeftKey", RotateLeftKey);
82  CONNECT_FUNCTION("rotateRightKey", RotateRightKey);
83  CONNECT_FUNCTION("rotateUpModifierKey", RotateUpModifierKey);
84  CONNECT_FUNCTION("rotateDownModifierKey", RotateDownModifierKey);
85 }
86 
88 {
89  float stepSize = 1.0f;
90  this->GetDataNode()->GetFloatProperty(translationStepSizePropertyName, stepSize);
91  mitk::Vector3D movementVector;
92  movementVector.Fill(0.0);
93  movementVector.SetElement(2, stepSize);
94  this->TranslateGeometry(movementVector, this->GetUpdatedTimeGeometry(interactionEvent));
95 }
96 
98  mitk::InteractionEvent *interactionEvent)
99 {
100  float stepSize = 1.0f;
101  this->GetDataNode()->GetFloatProperty(translationStepSizePropertyName, stepSize);
102  mitk::Vector3D movementVector;
103  movementVector.Fill(0.0);
104  movementVector.SetElement(2, -stepSize);
105  this->TranslateGeometry(movementVector, this->GetUpdatedTimeGeometry(interactionEvent));
106 }
107 
109  mitk::InteractionEvent *interactionEvent)
110 {
111  float stepSize = 1.0f;
112  this->GetDataNode()->GetFloatProperty(translationStepSizePropertyName, stepSize);
113  mitk::Vector3D movementVector;
114  movementVector.Fill(0.0);
115  movementVector.SetElement(0, -stepSize);
116  this->TranslateGeometry(movementVector, this->GetUpdatedTimeGeometry(interactionEvent));
117 }
118 
120  mitk::InteractionEvent *interactionEvent)
121 {
122  float stepSize = 1.0f;
123  this->GetDataNode()->GetFloatProperty(translationStepSizePropertyName, stepSize);
124  mitk::Vector3D movementVector;
125  movementVector.Fill(0.0);
126  movementVector.SetElement(0, stepSize);
127  this->TranslateGeometry(movementVector, this->GetUpdatedTimeGeometry(interactionEvent));
128 }
129 
131  mitk::InteractionEvent *interactionEvent)
132 {
133  float stepSize = 1.0f;
134  this->GetDataNode()->GetFloatProperty(translationStepSizePropertyName, stepSize);
135  mitk::Vector3D movementVector;
136  movementVector.Fill(0.0);
137  movementVector.SetElement(1, stepSize);
138  this->TranslateGeometry(movementVector, this->GetUpdatedTimeGeometry(interactionEvent));
139 }
140 
142  mitk::InteractionEvent *interactionEvent)
143 {
144  float stepSize = 1.0f;
145  this->GetDataNode()->GetFloatProperty(translationStepSizePropertyName, stepSize);
146  mitk::Vector3D movementVector;
147  movementVector.Fill(0.0);
148  movementVector.SetElement(1, -stepSize);
149  this->TranslateGeometry(movementVector, this->GetUpdatedTimeGeometry(interactionEvent));
150 }
151 
153 {
154  float stepSize = 1.0f;
155  this->GetDataNode()->GetFloatProperty(rotationStepSizePropertyName, stepSize);
156  this->RotateGeometry(-stepSize, 0, this->GetUpdatedTimeGeometry(interactionEvent));
157 }
158 
160  mitk::InteractionEvent *interactionEvent)
161 {
162  float stepSize = 1.0f;
163  this->GetDataNode()->GetFloatProperty(rotationStepSizePropertyName, stepSize);
164  this->RotateGeometry(stepSize, 0, this->GetUpdatedTimeGeometry(interactionEvent));
165  return;
166 }
167 
169  mitk::InteractionEvent *interactionEvent)
170 {
171  float stepSize = 1.0f;
172  this->GetDataNode()->GetFloatProperty(rotationStepSizePropertyName, stepSize);
173  this->RotateGeometry(-stepSize, 2, this->GetUpdatedTimeGeometry(interactionEvent));
174 }
175 
177  mitk::InteractionEvent *interactionEvent)
178 {
179  float stepSize = 1.0f;
180  this->GetDataNode()->GetFloatProperty(rotationStepSizePropertyName, stepSize);
181  this->RotateGeometry(stepSize, 2, this->GetUpdatedTimeGeometry(interactionEvent));
182 }
183 
185  mitk::InteractionEvent *interactionEvent)
186 {
187  float stepSize = 1.0f;
188  this->GetDataNode()->GetFloatProperty(rotationStepSizePropertyName, stepSize);
189  this->RotateGeometry(stepSize, 1, this->GetUpdatedTimeGeometry(interactionEvent));
190 }
191 
193  mitk::InteractionEvent *interactionEvent)
194 {
195  float stepSize = 1.0f;
196  this->GetDataNode()->GetFloatProperty(rotationStepSizePropertyName, stepSize);
197  this->RotateGeometry(-stepSize, 1, this->GetUpdatedTimeGeometry(interactionEvent));
198 }
199 
201 {
202  float stepSize = 0.1f;
203  this->GetDataNode()->GetFloatProperty(scaleStepSizePropertyName, stepSize);
204  mitk::Point3D newScale;
205  newScale.Fill(stepSize);
206  this->ScaleGeometry(newScale, this->GetUpdatedTimeGeometry(interactionEvent));
207 }
208 
210  mitk::InteractionEvent *interactionEvent)
211 {
212  float stepSize = 0.1f;
213  this->GetDataNode()->GetFloatProperty(scaleStepSizePropertyName, stepSize);
214  mitk::Point3D newScale;
215  newScale.Fill(-stepSize);
216  this->ScaleGeometry(newScale, this->GetUpdatedTimeGeometry(interactionEvent));
217 }
218 
220 {
221  mitk::Point3D anchorPoint;
222  float pointX = 0.0f;
223  float pointY = 0.0f;
224  float pointZ = 0.0f;
225  anchorPoint.Fill(0.0);
226  this->GetDataNode()->GetFloatProperty(anchorPointX, pointX);
227  this->GetDataNode()->GetFloatProperty(anchorPointY, pointY);
228  this->GetDataNode()->GetFloatProperty(anchorPointZ, pointZ);
229  anchorPoint[0] = pointX;
230  anchorPoint[1] = pointY;
231  anchorPoint[2] = pointZ;
232 
233  ScaleOperation *doOp = new mitk::ScaleOperation(OpSCALE, newScale, anchorPoint);
234  geometry->ExecuteOperation(doOp);
235 
237 }
238 
240  int rotationaxis,
241  mitk::BaseGeometry *geometry)
242 {
243  mitk::Vector3D rotationAxis = geometry->GetAxisVector(rotationaxis);
244  float pointX = 0.0f;
245  float pointY = 0.0f;
246  float pointZ = 0.0f;
247  mitk::Point3D pointOfRotation;
248  pointOfRotation.Fill(0.0);
249  this->GetDataNode()->GetFloatProperty(anchorPointX, pointX);
250  this->GetDataNode()->GetFloatProperty(anchorPointY, pointY);
251  this->GetDataNode()->GetFloatProperty(anchorPointZ, pointZ);
252  pointOfRotation[0] = pointX;
253  pointOfRotation[1] = pointY;
254  pointOfRotation[2] = pointZ;
255 
256  mitk::RotationOperation *doOp = new mitk::RotationOperation(OpROTATE, pointOfRotation, rotationAxis, angle);
257 
258  geometry->ExecuteOperation(doOp);
259  delete doOp;
261 }
262 
264 {
265  geometry->Translate(translate);
266  this->GetDataNode()->Modified();
268 }
269 
271 {
272  // Get the correct time geometry to support 3D + t
273  int timeStep = interactionEvent->GetSender()->GetTimeStep(this->GetDataNode()->GetData());
274  BaseGeometry *geometry = this->GetDataNode()->GetData()->GetUpdatedTimeGeometry()->GetGeometryForTimeStep(timeStep);
275  if (geometry == NULL)
276  MITK_ERROR << "Geometry is NULL. Cannot modify it.";
277  return geometry;
278 }
279 
281 {
282  mitk::DataNode::Pointer newInputNode = this->GetDataNode();
283  if (newInputNode.IsNotNull())
284  {
285  // add default properties
286  newInputNode->AddProperty(selectedColorPropertyName, mitk::ColorProperty::New(0.0, 1.0, 0.0));
287  newInputNode->AddProperty(deselectedColorPropertyName, mitk::ColorProperty::New(0.0, 0.0, 1.0));
288  newInputNode->AddProperty(translationStepSizePropertyName, mitk::FloatProperty::New(1.0f));
289  newInputNode->AddProperty(rotationStepSizePropertyName, mitk::FloatProperty::New(1.0f));
290  newInputNode->AddProperty(scaleStepSizePropertyName, mitk::FloatProperty::New(0.1f));
291 
292  // save the previous color of the node, in order to restore it after the interactor is destroyed
293  mitk::ColorProperty::Pointer priorColor = dynamic_cast<mitk::ColorProperty *>(newInputNode->GetProperty("color"));
294  if (priorColor.IsNotNull())
295  {
297  tmpCopyOfPriorColor->SetColor(priorColor->GetColor());
298  newInputNode->AddProperty(priorPropertyName, tmpCopyOfPriorColor);
299  }
300  newInputNode->SetColor(0.0, 0.0, 1.0);
301  }
303 }
304 
306 {
307  this->RestoreNodeProperties(); // if there was another node set, restore it's color
309 }
310 
312 {
313  const InteractionPositionEvent *positionEvent = dynamic_cast<const InteractionPositionEvent *>(interactionEvent);
314  if (positionEvent == NULL)
315  return false;
316 
317  Point3D currentWorldPoint;
318  if (interactionEvent->GetSender()->PickObject(positionEvent->GetPointerPositionOnScreen(), currentWorldPoint) ==
319  this->GetDataNode())
320  return true;
321 
322  return false;
323 }
324 
326 {
327  DataNode::Pointer node = this->GetDataNode();
328 
329  if (node.IsNull())
330  return;
331 
333  dynamic_cast<mitk::ColorProperty *>(node->GetProperty(selectedColorPropertyName));
334  if (selectedColor.IsNotNull())
335  {
336  node->GetPropertyList()->SetProperty("color", selectedColor);
337  }
338  interactionEvent->GetSender()->GetRenderingManager()->RequestUpdateAll();
339 
340  return;
341 }
342 
344 {
345  DataNode::Pointer node = this->GetDataNode();
346 
347  if (node.IsNull())
348  return;
349 
351  dynamic_cast<mitk::ColorProperty *>(node->GetProperty(deselectedColorPropertyName));
352  if (selectedColor.IsNotNull())
353  {
354  node->GetPropertyList()->SetProperty("color", selectedColor);
355  }
356 
357  interactionEvent->GetSender()->GetRenderingManager()->RequestUpdateAll();
358 
359  return;
360 }
361 
363 {
364  InitMembers(interactionEvent);
365 }
366 
368 {
369  InitMembers(interactionEvent);
370 }
371 
373 {
374  InteractionPositionEvent *positionEvent = dynamic_cast<InteractionPositionEvent *>(interactionEvent);
375  if (positionEvent == NULL)
376  return false;
377 
378  m_InitialPickedDisplayPoint = positionEvent->GetPointerPositionOnScreen();
379  m_InitialPickedWorldPoint = positionEvent->GetPositionInWorld();
380 
381  // Get the timestep to also support 3D+t
382  int timeStep = 0;
383  if ((interactionEvent->GetSender()) != NULL)
384  timeStep = interactionEvent->GetSender()->GetTimeStep(this->GetDataNode()->GetData());
385 
386  // Make deep copy of current Geometry3D of the plane
387  this->GetDataNode()->GetData()->UpdateOutputInformation(); // make sure that the Geometry is up-to-date
388  m_OriginalGeometry =
389  static_cast<Geometry3D *>(this->GetDataNode()->GetData()->GetGeometry(timeStep)->Clone().GetPointer());
390  return true;
391 }
392 
394 {
395  InteractionPositionEvent *positionEvent = dynamic_cast<InteractionPositionEvent *>(interactionEvent);
396  if (positionEvent == NULL)
397  return;
398 
399  Point3D currentPickedPoint = positionEvent->GetPositionInWorld();
400 
401  Vector3D interactionMove;
402  interactionMove[0] = currentPickedPoint[0] - m_InitialPickedWorldPoint[0];
403  interactionMove[1] = currentPickedPoint[1] - m_InitialPickedWorldPoint[1];
404  interactionMove[2] = currentPickedPoint[2] - m_InitialPickedWorldPoint[2];
405 
406  int timeStep = interactionEvent->GetSender()->GetTimeStep(this->GetDataNode()->GetData());
407 
408  mitk::BaseGeometry::Pointer geometry =
409  this->GetDataNode()->GetData()->GetUpdatedTimeGeometry()->GetGeometryForTimeStep(timeStep);
410  geometry->SetOrigin(m_OriginalGeometry->GetOrigin());
411 
412  this->TranslateGeometry(interactionMove, this->GetUpdatedTimeGeometry(interactionEvent));
413 
414  return;
415 }
416 
418 {
419  InteractionPositionEvent *positionEvent = dynamic_cast<InteractionPositionEvent *>(interactionEvent);
420  if (positionEvent == NULL)
421  return;
422 
423  Point2D currentPickedDisplayPoint = positionEvent->GetPointerPositionOnScreen();
424  Point3D currentWorldPoint = positionEvent->GetPositionInWorld();
425 
426  vtkCamera *camera = NULL;
427  vtkRenderer *currentVtkRenderer = NULL;
428 
429  if ((interactionEvent->GetSender()) != NULL)
430  {
431  camera = interactionEvent->GetSender()->GetVtkRenderer()->GetActiveCamera();
432  currentVtkRenderer = interactionEvent->GetSender()->GetVtkRenderer();
433  }
434  if (camera && currentVtkRenderer)
435  {
436  double vpn[3];
437  camera->GetViewPlaneNormal(vpn);
438 
439  Vector3D viewPlaneNormal;
440  viewPlaneNormal[0] = vpn[0];
441  viewPlaneNormal[1] = vpn[1];
442  viewPlaneNormal[2] = vpn[2];
443 
444  Vector3D interactionMove;
445  interactionMove[0] = currentWorldPoint[0] - m_InitialPickedWorldPoint[0];
446  interactionMove[1] = currentWorldPoint[1] - m_InitialPickedWorldPoint[1];
447  interactionMove[2] = currentWorldPoint[2] - m_InitialPickedWorldPoint[2];
448 
449  if (interactionMove[0] == 0 && interactionMove[1] == 0 && interactionMove[2] == 0)
450  return;
451 
452  Vector3D rotationAxis = itk::CrossProduct(viewPlaneNormal, interactionMove);
453  rotationAxis.Normalize();
454 
455  int *size = currentVtkRenderer->GetSize();
456  double l2 = (currentPickedDisplayPoint[0] - m_InitialPickedDisplayPoint[0]) *
457  (currentPickedDisplayPoint[0] - m_InitialPickedDisplayPoint[0]) +
458  (currentPickedDisplayPoint[1] - m_InitialPickedDisplayPoint[1]) *
459  (currentPickedDisplayPoint[1] - m_InitialPickedDisplayPoint[1]);
460 
461  double rotationAngle = 360.0 * sqrt(l2 / (size[0] * size[0] + size[1] * size[1]));
462 
463  // Use center of data bounding box as center of rotation
464  Point3D rotationCenter = m_OriginalGeometry->GetCenter();
465 
466  int timeStep = 0;
467  if ((interactionEvent->GetSender()) != NULL)
468  timeStep = interactionEvent->GetSender()->GetTimeStep(this->GetDataNode()->GetData());
469 
470  // Reset current Geometry3D to original state (pre-interaction) and
471  // apply rotation
472  RotationOperation op(OpROTATE, rotationCenter, rotationAxis, rotationAngle);
473  Geometry3D::Pointer newGeometry = static_cast<Geometry3D *>(m_OriginalGeometry->Clone().GetPointer());
474  newGeometry->ExecuteOperation(&op);
475  mitk::TimeGeometry::Pointer timeGeometry = this->GetDataNode()->GetData()->GetTimeGeometry();
476  if (timeGeometry.IsNotNull())
477  timeGeometry->SetTimeStepGeometry(newGeometry, timeStep);
478 
479  interactionEvent->GetSender()->GetRenderingManager()->RequestUpdateAll();
480  }
481 }
482 
484 {
485  return;
486 }
487 
489 {
490  mitk::DataNode::Pointer inputNode = this->GetDataNode();
491  if (inputNode.IsNull())
492  return;
493  mitk::ColorProperty::Pointer color = dynamic_cast<mitk::ColorProperty *>(inputNode->GetProperty(priorPropertyName));
494  if (color.IsNotNull())
495  {
496  inputNode->GetPropertyList()->SetProperty("color", color);
497  }
498 
499  inputNode->GetPropertyList()->DeleteProperty(selectedColorPropertyName);
500  inputNode->GetPropertyList()->DeleteProperty(deselectedColorPropertyName);
501  inputNode->GetPropertyList()->DeleteProperty(priorPropertyName);
502  inputNode->GetPropertyList()->DeleteProperty(translationStepSizePropertyName);
503  inputNode->GetPropertyList()->DeleteProperty(rotationStepSizePropertyName);
504  inputNode->GetPropertyList()->DeleteProperty(scaleStepSizePropertyName);
505 
506  // update rendering
508 }
virtual void ScaleDownKey(mitk::StateMachineAction *, mitk::InteractionEvent *interactionEvent)
bool InitMembers(InteractionEvent *interactionEvent)
Initializes member variables.
Super class for all position events.
Standard implementation of BaseGeometry.
virtual bool CheckOverObject(const InteractionEvent *)
Checks if the mouse pointer is over the object.
void ScaleGeometry(mitk::Point3D newScale, mitk::BaseGeometry *geometry)
const char * priorPropertyName
BaseRenderer * GetSender() const
virtual void SelectObject(StateMachineAction *, InteractionEvent *)
#define MITK_ERROR
Definition: mitkLogMacros.h:24
double ScalarType
virtual DataNode * PickObject(const Point2D &, Point3D &) const
Determines the object (mitk::DataNode) closest to the current position by means of picking...
static Pointer New()
void TranslateGeometry(mitk::Vector3D translate, mitk::BaseGeometry *geometry)
const char * selectedColorPropertyName
void RotateGeometry(mitk::ScalarType angle, int rotationaxis, mitk::BaseGeometry *geometry)
static Pointer New()
const char * rotationStepSizePropertyName
Constants for most interaction classes, due to the generic StateMachines.
virtual void TranslateDownModifierKey(StateMachineAction *, InteractionEvent *interactionEvent)
virtual void RotateRightKey(StateMachineAction *, InteractionEvent *interactionEvent)
virtual void RotateUpKey(StateMachineAction *, InteractionEvent *interactionEvent)
const char * scaleStepSizePropertyName
void Translate(const Vector3D &vector)
Translate the origin by a vector.
virtual void DeselectObject(StateMachineAction *, InteractionEvent *)
Called if the mouse pointer leaves the area of the object.
const char * anchorPointX
virtual void SelectObject(StateMachineAction *, InteractionEvent *)
Called if the mouse pointer is over the object indicated by a color change.
const char * anchorPointZ
T::Pointer GetData(const std::string &name)
virtual void RotateObject(StateMachineAction *, InteractionEvent *)
virtual void TranslateLeftKey(StateMachineAction *, InteractionEvent *interactionEvent)
The ColorProperty class RGB color property.
virtual void RestoreNodeProperties()
Restore default properties of bounding box and handles.
virtual void RotateLeftKey(StateMachineAction *, InteractionEvent *interactionEvent)
Vector3D GetAxisVector(unsigned int direction) const
Get vector along bounding-box in the specified direction in mm.
virtual mitk::RenderingManager * GetRenderingManager() const
Setter for the RenderingManager that handles this instance of BaseRenderer.
virtual void TranslateObject(StateMachineAction *, InteractionEvent *)
Performs a translation of the object relative to the mouse movement.
static RenderingManager * GetInstance()
Represents an action, that is executed after a certain event (in statemachine-mechanism) TODO: implem...
virtual void DeselectObject(StateMachineAction *, InteractionEvent *)
virtual void InitRotate(StateMachineAction *, InteractionEvent *)
virtual void TranslateRightKey(StateMachineAction *, InteractionEvent *interactionEvent)
virtual bool CheckOverObject(const InteractionEvent *)
const char * translationStepSizePropertyName
const char * anchorPointY
virtual void TranslateObject(StateMachineAction *, InteractionEvent *)
virtual void TranslateUpKey(StateMachineAction *, InteractionEvent *interactionEvent)
mitk::BaseGeometry * GetUpdatedTimeGeometry(mitk::InteractionEvent *interactionEvent)
virtual void InitTranslate(StateMachineAction *, InteractionEvent *)
virtual unsigned int GetTimeStep() const
static Pointer New()
bool InitMembers(InteractionEvent *interactionEvent)
InitMembers convinience method to avoid code duplication between InitRotate() and InitTranslate()...
virtual void TranslateUpModifierKey(StateMachineAction *, InteractionEvent *interactionEvent)
virtual void RotateDownModifierKey(StateMachineAction *, InteractionEvent *interactionEvent)
virtual void SetDataNode(DataNode *dataNode)
#define CONNECT_CONDITION(a, f)
virtual void ScaleObject(StateMachineAction *, InteractionEvent *)
The ScaleOperation is an operation to scale any mitk::BaseGeometry.
const float selectedColor[]
const char * deselectedColorPropertyName
#define CONNECT_FUNCTION(a, f)
virtual void ScaleUpKey(mitk::StateMachineAction *, mitk::InteractionEvent *interactionEvent)
vtkRenderer * GetVtkRenderer() const
virtual void ScaleObject(StateMachineAction *, InteractionEvent *)
Performs a object shape change by influencing the scaling of the initial bounding box...
Operation, that holds everything necessary for an rotation operation on mitk::BaseData.
virtual void TranslateDownKey(StateMachineAction *, InteractionEvent *interactionEvent)
void RequestUpdateAll(RequestType type=REQUEST_UPDATE_ALL)
BaseGeometry Describes the geometry of a data object.
virtual void ExecuteOperation(Operation *operation) override
executes affine operations (translate, rotate, scale)
Class for nodes of the DataTree.
Definition: mitkDataNode.h:66
virtual void RotateDownKey(StateMachineAction *, InteractionEvent *interactionEvent)
virtual void RotateUpModifierKey(StateMachineAction *, InteractionEvent *interactionEvent)