Medical Imaging Interaction Toolkit  2025.12.02
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 
140 
141  DataNode::Pointer m_CrosshairDataNode;
142  CrosshairData::Pointer m_CrosshairData;
143 
144  };
145 }
146 
147 #endif
#define MITKCORE_EXPORT
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)
mitkClassMacroItkParent(CrosshairManager, itk::Object)
void SetCrosshairPosition(const Point3D &selectedPoint)
Set the position of the managed crosshair to the given 3D position.
Data management class that handles 'was created by' relations.
Controls the selection of the slice the associated BaseRenderer will display.
Find image slices visible on a given plane.