Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
mitk::CrosshairManager Class Reference

The CrosshairManager takes care of the correct settings for the crosshair. More...

#include <mitkCrosshairManager.h>

Inheritance diagram for mitk::CrosshairManager:
Collaboration diagram for mitk::CrosshairManager:

Public Types

typedef CrosshairManager Self
 
typedef itk::Object Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 

Public Member Functions

virtual std::vector< std::string > GetClassHierarchy () const
 
virtual const char * GetClassName () const
 
void SetCrosshairPosition (const Point3D &selectedPoint)
 Set the position of the managed crosshair to the given 3D position. More...
 
void UpdateCrosshairPosition (const SliceNavigationController *sliceNavigationController)
 Update the position of the managed crosshair to the current slice position of the given slice navigation controller, depending on the view direction of the slice navigation controller. More...
 
Point3D GetCrosshairPosition () const
 Get the position of the managed crosshair. More...
 
void SetCrosshairVisibility (bool visible, const BaseRenderer *baseRenderer)
 Set the visibility of the managed crosshair to the given value. More...
 
bool GetCrosshairVisibility (const BaseRenderer *baseRenderer) const
 Get the visibility of the managed crosshair. More...
 
void SetCrosshairGap (unsigned int gapSize)
 Set the gap size of the managed crosshair to the given value. More...
 
void AddCrosshairNodeToDataStorage (DataStorage *dataStorage)
 Add the managed crosshair data node to the given data storage. More...
 
void RemoveCrosshairNodeFromDataStorage (DataStorage *dataStorage)
 Remove the managed crosshair data node from the given data storage. More...
 

Static Public Member Functions

static const char * GetStaticNameOfClass ()
 
static Pointer New (BaseRenderer *_arg)
 

Protected Member Functions

 CrosshairManager (BaseRenderer *baseRenderer)
 
 ~CrosshairManager ()
 

Protected Attributes

DataNode::Pointer m_CrosshairDataNode
 
CrosshairData::Pointer m_CrosshairData
 

Detailed Description

The CrosshairManager takes care of the correct settings for the crosshair.

The CrosshairManager keeps track of a crosshair data node, which is used to compute the lines of a crosshair. These crosshair data node can be added to / removed from the data storage using this CrosshairManager. Adding / removing the node to / from the data storage will change the rendering behavior for the crosshair - only data nodes inside the data storage will be rendered.

Definition at line 34 of file mitkCrosshairManager.h.

Member Typedef Documentation

◆ ConstPointer

◆ Pointer

◆ Self

◆ Superclass

Definition at line 38 of file mitkCrosshairManager.h.

Constructor & Destructor Documentation

◆ CrosshairManager()

mitk::CrosshairManager::CrosshairManager ( BaseRenderer baseRenderer)
protected

◆ ~CrosshairManager()

mitk::CrosshairManager::~CrosshairManager ( )
protected

Member Function Documentation

◆ AddCrosshairNodeToDataStorage()

void mitk::CrosshairManager::AddCrosshairNodeToDataStorage ( DataStorage dataStorage)

Add the managed crosshair data node to the given data storage.

Precondition
The crosshair data node of this manager needs to be not null in order to add the node to the data storage.
Exceptions
mitk::Exception,ifthe crosshair data node of this manager is null.
Precondition
The given data storage needs to be not null in order to add the node to the data storage.
Exceptions
mitk::Exception,ifthe given data storage is null.
Parameters
dataStorageThe data storage to which the crosshair data node should be added.

◆ GetClassHierarchy()

virtual std::vector<std::string> mitk::CrosshairManager::GetClassHierarchy ( ) const
inlinevirtual

Definition at line 38 of file mitkCrosshairManager.h.

◆ GetClassName()

virtual const char* mitk::CrosshairManager::GetClassName ( ) const
virtual

◆ GetCrosshairPosition()

Point3D mitk::CrosshairManager::GetCrosshairPosition ( ) const

Get the position of the managed crosshair.

Precondition
The crosshair data of this manager needs to be not null in order to get the current crosshair position.
Exceptions
mitk::Exception,ifthe crosshair data of this manager is null.
Returns
The 3D point that represents the position of the crosshair data.

◆ GetCrosshairVisibility()

bool mitk::CrosshairManager::GetCrosshairVisibility ( const BaseRenderer baseRenderer) const

Get the visibility of the managed crosshair.

Precondition
The crosshair data of this manager needs to be not null in order to get the visibility.
Exceptions
mitk::Exception,ifthe crosshair data of this manager is null.
Parameters
baseRendererA base renderer for which the renderer-specific visibility property should be get.
Returns
The boolean value that represents the visibility of the crosshair.

◆ GetStaticNameOfClass()

static const char* mitk::CrosshairManager::GetStaticNameOfClass ( )
inlinestatic

Definition at line 38 of file mitkCrosshairManager.h.

◆ New()

static Pointer mitk::CrosshairManager::New ( BaseRenderer _arg)
inlinestatic

Definition at line 39 of file mitkCrosshairManager.h.

◆ RemoveCrosshairNodeFromDataStorage()

void mitk::CrosshairManager::RemoveCrosshairNodeFromDataStorage ( DataStorage dataStorage)

Remove the managed crosshair data node from the given data storage.

Precondition
The crosshair data node of this manager needs to be not null in order to remove the node from the data storage.
Exceptions
mitk::Exception,ifthe crosshair data node of this manager is null.
Precondition
The given data storage needs to be not null in order to remove the node from the data storage.
Exceptions
mitk::Exception,ifthe given data storage is null.
Parameters
dataStorageThe data storage from which the crosshair data node should be removed.

◆ SetCrosshairGap()

void mitk::CrosshairManager::SetCrosshairGap ( unsigned int  gapSize)

Set the gap size of the managed crosshair to the given value.

Precondition
The crosshair data of this manager needs to be not null in order to set the gap size.
Exceptions
mitk::Exception,ifthe crosshair data of this manager is null.
Parameters
gapSizeThe size of the gap in the center of the crosshair.

◆ SetCrosshairPosition()

void mitk::CrosshairManager::SetCrosshairPosition ( const Point3D selectedPoint)

Set the position of the managed crosshair to the given 3D position.

Precondition
The crosshair data of this manager needs to be not null in order to set a new position.
Exceptions
mitk::Exception,ifthe crosshair data of this manager is null.
Parameters
selectedPointThe 3D point that will be newly set for the crosshair data.

◆ SetCrosshairVisibility()

void mitk::CrosshairManager::SetCrosshairVisibility ( bool  visible,
const BaseRenderer baseRenderer 
)

Set the visibility of the managed crosshair to the given value.

Precondition
The crosshair data of this manager needs to be not null in order to set the visibility.
Exceptions
mitk::Exception,ifthe crosshair data of this manager is null.
Parameters
visibleA boolean value that will define the visibility of the crosshair.
baseRendererA base renderer for which the renderer-specific visibility property should be set.

◆ UpdateCrosshairPosition()

void mitk::CrosshairManager::UpdateCrosshairPosition ( const SliceNavigationController sliceNavigationController)

Update the position of the managed crosshair to the current slice position of the given slice navigation controller, depending on the view direction of the slice navigation controller.

Precondition
The crosshair data of this manager needs to be not null in order to update the crosshair position.
Exceptions
mitk::Exception,ifthe crosshair data of this manager is null.
Parameters
sliceNavigationControllerThe slice navigation controller whose current position will be used for updating the corresponding 3D coordinate of the crosshair data's position.

Member Data Documentation

◆ m_CrosshairData

CrosshairData::Pointer mitk::CrosshairManager::m_CrosshairData
protected

Definition at line 142 of file mitkCrosshairManager.h.

◆ m_CrosshairDataNode

DataNode::Pointer mitk::CrosshairManager::m_CrosshairDataNode
protected

Definition at line 141 of file mitkCrosshairManager.h.


The documentation for this class was generated from the following file: