Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkCrosshairManager.h
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 
13 #ifndef mitkCrosshairManager_h
14 #define mitkCrosshairManager_h
15 
16 #include <MitkCoreExports.h>
17 
18 #include <mitkBaseRenderer.h>
19 #include <mitkCrosshairData.h>
20 #include <mitkDataStorage.h>
21 
22 namespace mitk
23 {
34  class MITKCORE_EXPORT CrosshairManager : public itk::Object
35  {
36  public:
37 
40 
50  void SetCrosshairPosition(const Point3D& selectedPoint);
64  void UpdateCrosshairPosition(const SliceNavigationController* sliceNavigationController);
86  void SetCrosshairVisibility(bool visible, const BaseRenderer* baseRenderer);
98  bool GetCrosshairVisibility(const BaseRenderer* baseRenderer) const;
108  void SetCrosshairGap(unsigned int gapSize);
135 
136  protected:
137 
147 
150 
151  DataNode::Pointer m_CrosshairDataNode;
152  CrosshairData::Pointer m_CrosshairData;
153 
154  };
155 }
156 
157 #endif
#define MITKCORE_EXPORT
Organizes the rendering process.
The CrosshairManager takes care of the correct settings for the crosshair.
bool GetCrosshairVisibility(const BaseRenderer *baseRenderer) const
Get the visibility of the managed crosshair.
DataNode::Pointer m_CrosshairDataNode
CrosshairData::Pointer m_CrosshairData
mitkNewMacro1Param(Self, BaseRenderer *)
void SetCrosshairGap(unsigned int gapSize)
Set the gap size of the managed crosshair to the given value.
void RemoveCrosshairNodeFromDataStorage(DataStorage *dataStorage)
Remove the managed crosshair data node from the given data storage.
void AddCrosshairNodeToDataStorage(DataStorage *dataStorage)
Add the managed crosshair data node to the given data storage.
void SetCrosshairVisibility(bool visible, const BaseRenderer *baseRenderer)
Set the visibility of the managed crosshair to the given value.
void UpdateCrosshairPosition(const SliceNavigationController *sliceNavigationController)
Update the position of the managed crosshair to the current slice position of the given slice navigat...
Point3D GetCrosshairPosition() const
Get the position of the managed crosshair.
CrosshairManager(BaseRenderer *baseRenderer)
Construct a CrosshairManager for the given base renderer.
~CrosshairManager()
Destructor.
mitkClassMacroItkParent(CrosshairManager, itk::Object)
void SetCrosshairPosition(const Point3D &selectedPoint)
Set the position of the managed crosshair to the given 3D position.
Abstract data management class that organizes DataNode objects in a directed acyclic graph.
Controls the selection of the slice the associated BaseRenderer will display.
Find image slices visible on a given plane.