Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkDisplayActionEventHandlerStd.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 
15 // mitk core
17 
18 // itk
19 #include <itkEventObject.h>
20 
22 {
23  // synchronized action event function
25  ConnectDisplayActionEvent(DisplaySetCrosshairEvent(nullptr, Point3D()), actionFunction);
26 
27  // desynchronized action event function
29  ConnectDisplayActionEvent(DisplayMoveEvent(nullptr, Vector2D()), actionFunction);
30 
31  // desynchronized action event function
33  ConnectDisplayActionEvent(DisplayZoomEvent(nullptr, 0.0, Point2D()), actionFunction);
34 
35  // desynchronized action event function
37  ConnectDisplayActionEvent(DisplayScrollEvent(nullptr, 0), actionFunction);
38 
41 }
Point< ScalarType, 2 > Point2D
Definition: mitkPoint.h:94
MITKCORE_EXPORT StdFunctionCommand::ActionFunction SetLevelWindowAction()
Returns an &#39;std::function&#39; that can be used to react on the &#39;DisplaySetLevelWindowEvent&#39;. The function sets the &#39;levelwindow&#39; property of the topmost visible image that is display by the sending renderer. The level and window value for this property were previously determined by the mouse interaction event.
void InitActionsImpl() override
Initializes common standard display actions by using mixed synchronized and desynchronized display ac...
double ScalarType
std::function< void(const itk::EventObject &)> ActionFunction
Vector< ScalarType, 2 > Vector2D
Definition: mitkVector.h:129
Point< ScalarType, 3 > Point3D
Definition: mitkPoint.h:95
MITKCORE_EXPORT StdFunctionCommand::ActionFunction ZoomSenderCameraAction()
Returns an &#39;std::function&#39; that can be used to react on the &#39;DisplayZoomEvent&#39;. The function performs...
MITKCORE_EXPORT StdFunctionCommand::ActionFunction MoveSenderCameraAction()
Returns an &#39;std::function&#39; that can be used to react on the &#39;DisplayMoveEvent&#39;. The function performs...
OberserverTagType ConnectDisplayActionEvent(const DisplayActionEvent &displayActionEvent, const StdFunctionCommand::ActionFunction &actionFunction, const StdFunctionCommand::FilterFunction &filterFunction=[](const itk::EventObject &) { return true;})
Uses the given std::functions to customize a command: The display action event is used to define on w...
MITKCORE_EXPORT StdFunctionCommand::ActionFunction SetCrosshairSynchronizedAction()
Returns an &#39;std::function&#39; that can be used to react on the &#39;DisplaySetCrosshairEvent&#39;. The function performs a slice selection of the slice navigation controller and will set the cross hair for all 2D-render windows. The new position was previously determined by the mouse interaction event. #TODO: currently there is no need to distinguish between this and the non-synchronized version.
MITKCORE_EXPORT StdFunctionCommand::ActionFunction ScrollSliceStepperAction()
Returns an &#39;std::function&#39; that can be used to react on the &#39;DisplayScrollEvent&#39;. The function perfor...