35 if (
nullptr == sendingRenderer)
40 sendingRenderer->GetCameraController()->MoveBy(displayActionEvent->
GetMoveVector());
41 RenderingManager::GetInstance()->RequestUpdate(sendingRenderer->GetRenderWindow());
45 return actionFunction;
50 auto actionFunction = [](
const itk::EventObject& displayInteractorEvent)
56 if (
nullptr == sendingRenderer)
61 BaseRenderer::GetInstance(sendingRenderer->GetRenderWindow())->GetSliceNavigationController()->SelectSliceByPoint(displayActionEvent->
GetPosition());
65 return actionFunction;
70 auto actionFunction = [](
const itk::EventObject& displayInteractorEvent)
76 if (
nullptr == sendingRenderer)
84 RenderingManager::GetInstance()->RequestUpdate(sendingRenderer->GetRenderWindow());
89 return actionFunction;
94 auto actionFunction = [](
const itk::EventObject& displayInteractorEvent)
100 if (
nullptr == sendingRenderer)
106 if (
nullptr == sliceNavigationController)
115 if (
nullptr == sliceStepper)
123 sliceStepper = sliceNavigationController->
GetTime();
130 return actionFunction;
135 auto actionFunction = [](
const itk::EventObject& displayInteractorEvent)
141 if (
nullptr == sendingRenderer)
148 DataStorage::SetOfObjects::ConstPointer allImageNodes = storage->GetSubset(NodePredicateDataType::New(
"Image"));
151 sendingRenderer->DisplayToWorld(positionEvent->GetPointerPositionOnScreen(), worldposition);
152 auto globalCurrentTimePoint = sendingRenderer->GetTime();
160 node->GetLevelWindow(levelWindow);
164 level += displayActionEvent->
GetLevel();
165 window += displayActionEvent->
GetWindow();
168 auto* levelWindowProperty =
dynamic_cast<LevelWindowProperty*
>(node->GetProperty(
"levelwindow"));
169 if (
nullptr != levelWindowProperty)
172 RenderingManager::GetInstance()->RequestUpdateAll();
177 return actionFunction;
191 if (
nullptr == sendingRenderer)
196 auto renderingManager = RenderingManager::GetInstance();
197 auto allRenderWindows = renderingManager->GetAllRegisteredRenderWindows();
198 for (
auto renderWindow : allRenderWindows)
200 if (BaseRenderer::GetInstance(renderWindow)->GetMapperID() == BaseRenderer::Standard2D)
202 BaseRenderer* currentRenderer = BaseRenderer::GetInstance(renderWindow);
210 return actionFunction;
215 auto actionFunction = [](
const itk::EventObject& displayInteractorEvent)
221 if (
nullptr == sendingRenderer)
226 auto allRenderWindows = RenderingManager::GetInstance()->GetAllRegisteredRenderWindows();
227 for (
auto renderWindow : allRenderWindows)
229 if (BaseRenderer::GetInstance(renderWindow)->GetMapperID() == BaseRenderer::Standard2D)
237 return actionFunction;
242 auto actionFunction = [](
const itk::EventObject& displayInteractorEvent)
248 if (
nullptr == sendingRenderer)
255 auto renderingManager = RenderingManager::GetInstance();
256 auto allRenderWindows = renderingManager->GetAllRegisteredRenderWindows();
257 for (
auto renderWindow : allRenderWindows)
259 if (BaseRenderer::GetInstance(renderWindow)->GetMapperID() == BaseRenderer::Standard2D)
261 BaseRenderer* currentRenderer = BaseRenderer::GetInstance(renderWindow);
270 return actionFunction;
275 auto actionFunction = [](
const itk::EventObject& displayInteractorEvent)
281 if (
nullptr == sendingRenderer)
286 auto allRenderWindows = RenderingManager::GetInstance()->GetAllRegisteredRenderWindows();
287 for (
auto renderWindow : allRenderWindows)
289 if (BaseRenderer::GetInstance(renderWindow)->GetMapperID() == BaseRenderer::Standard2D)
292 if (
nullptr == sliceNavigationController)
301 if (
nullptr == sliceStepper)
309 sliceStepper = sliceNavigationController->
GetTime();
318 return actionFunction;
ScalarType GetWindow() const
mitk::Stepper * GetSlice()
Get the Stepper through the slices.
ScalarType GetLevel() const
method that returns the level value, i.e. the center of the current grey value interval ...
MITKCORE_EXPORT StdFunctionCommand::ActionFunction ZoomCameraSynchronizedAction()
Returns an 'std::function' that can be used to react on the 'DisplayZoomEvent'. The function performs...
Super class for all position events.
MITKCORE_EXPORT StdFunctionCommand::ActionFunction SetLevelWindowAction()
Returns an 'std::function' that can be used to react on the 'DisplaySetLevelWindowEvent'. The function sets the 'levelwindow' 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 SelectSliceByPoint(const mitk::Point3D &point)
Positions the SNC according to the specified point.
The LevelWindowProperty class Property for the mitk::LevelWindow.
bool CheckEvent(const itk::EventObject *e) const override
bool CheckEvent(const itk::EventObject *e) const override
bool CheckEvent(const itk::EventObject *e) const override
MITKCORE_EXPORT StdFunctionCommand::ActionFunction ScrollSliceStepperSynchronizedAction()
Returns an 'std::function' that can be used to react on the 'DisplayScrollEvent'. The function perfor...
void Zoom(ScalarType factor, const Point2D &zoomPointInMM)
Organizes the rendering process.
const Point2D & GetStartCoordinate() const
MITKCORE_EXPORT StdFunctionCommand::ActionFunction MoveCameraSynchronizedAction()
Returns an 'std::function' that can be used to react on the 'DisplayMoveEvent'. The function performs...
bool CheckEvent(const itk::EventObject *e) const override
void MoveBy(const Vector2D &moveVectorInMM)
Controls the selection of the slice the associated BaseRenderer will display.
The LevelWindow class Class to store level/window values.
MITKCORE_EXPORT StdFunctionCommand::ActionFunction SetCrosshairAction()
Returns an 'std::function' that can be used to react on the 'DisplaySetCrosshairEvent'. 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.
void SetLevelWindow(const LevelWindow &levWin)
float GetZoomFactor() const
ScalarType GetLevel() const
virtual bool GetSliceLocked()
std::function< void(const itk::EventObject &)> ActionFunction
virtual CameraController * GetCameraController()
virtual void MoveSlice(int sliceDelta)
BaseRenderer * GetSender() const
ScalarType GetWindow() const
returns the current window size, i.e the range size of the current grey value interval ...
MITKCORE_EXPORT StdFunctionCommand::ActionFunction ZoomSenderCameraAction()
Returns an 'std::function' that can be used to react on the 'DisplayZoomEvent'. The function performs...
MITKCORE_EXPORT StdFunctionCommand::ActionFunction MoveSenderCameraAction()
Returns an 'std::function' that can be used to react on the 'DisplayMoveEvent'. The function performs...
vtkRenderWindow * GetRenderWindow() const
Access the RenderWindow into which this renderer renders.
Helper class to step through a list.
InteractionEvent * GetInteractionEvent() const
virtual unsigned int GetSteps() const
const Vector2D & GetMoveVector() const
virtual SliceNavigationController * GetSliceNavigationController()
mitk::Stepper * GetTime()
Get the Stepper through the time.
MITKCORE_EXPORT StdFunctionCommand::ActionFunction SetCrosshairSynchronizedAction()
Returns an 'std::function' that can be used to react on the 'DisplaySetCrosshairEvent'. 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.
void SetLevelWindow(ScalarType level, ScalarType window, bool expandRangesIfNecessary=true)
MITKCORE_EXPORT DataNode::Pointer FindTopmostVisibleNode(const DataStorage::SetOfObjects::ConstPointer nodes, const Point3D worldPosition, const TimePointType timePoint, const BaseRenderer *baseRender)
returns the topmost visible node of a given list of nodes. The function returns a node that is visibl...
MITKCORE_EXPORT StdFunctionCommand::ActionFunction ScrollSliceStepperAction()
Returns an 'std::function' that can be used to react on the 'DisplayScrollEvent'. The function perfor...
const Point3D & GetPosition() const