Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::PlanePositionManagerService Class Reference

Service that holds and manages a list of stored plane positions. More...

#include <mitkPlanePositionManager.h>

Public Member Functions

 PlanePositionManagerService ()
 
 ~PlanePositionManagerService ()
 
unsigned int AddNewPlanePosition (const mitk::PlaneGeometry *plane, unsigned int sliceIndex=0)
 Add a new plane position to the list. More...
 
bool RemovePlanePosition (unsigned int ID)
 Remove the plane position at the given ID from the list. More...
 
void RemoveAllPlanePositions ()
 Remove all plane positions from the list. More...
 
mitk::RestorePlanePositionOperation * GetPlanePosition (unsigned int ID)
 Get a specific plane position by its ID. More...
 
unsigned int GetNumberOfPlanePositions ()
 Get the number of stored plane positions. More...
 

Detailed Description

Service that holds and manages a list of stored plane positions.

To store a new position, specify the first slice of your slice stack and the slice number you want to restore via AddNewPlanePosition().

To restore a position, call GetPlanePosition(ID) where ID is the position in the plane position list (returned by AddNewPlanePosition()). This returns a mitk::RestorePlanePositionOperation which can be executed by the SliceNavigationController of the slice stack.

See also
RestorePlanePositionOperation
SliceNavigationController

Definition at line 41 of file mitkPlanePositionManager.h.

Constructor & Destructor Documentation

◆ PlanePositionManagerService()

mitk::PlanePositionManagerService::PlanePositionManagerService ( )

◆ ~PlanePositionManagerService()

mitk::PlanePositionManagerService::~PlanePositionManagerService ( )

Member Function Documentation

◆ AddNewPlanePosition()

unsigned int mitk::PlanePositionManagerService::AddNewPlanePosition ( const mitk::PlaneGeometry *  plane,
unsigned int  sliceIndex = 0 
)

Add a new plane position to the list.

If a geometrically identical plane position already exists in the list, nothing is added and the existing ID is returned.

Parameters
planeThe first slice of the slice stack (its PlaneGeometry).
sliceIndexThe slice number of the selected slice.
Returns
The ID (position in the list) of the added or existing entry.

◆ GetNumberOfPlanePositions()

unsigned int mitk::PlanePositionManagerService::GetNumberOfPlanePositions ( )

Get the number of stored plane positions.

Returns
The total count of plane positions in the list.

◆ GetPlanePosition()

mitk::RestorePlanePositionOperation* mitk::PlanePositionManagerService::GetPlanePosition ( unsigned int  ID)

Get a specific plane position by its ID.

Parameters
IDThe ID of the plane position to retrieve.
Returns
A RestorePlanePositionOperation that can be executed by the SliceNavigationController, or nullptr if the ID is invalid.

◆ RemoveAllPlanePositions()

void mitk::PlanePositionManagerService::RemoveAllPlanePositions ( )

Remove all plane positions from the list.

◆ RemovePlanePosition()

bool mitk::PlanePositionManagerService::RemovePlanePosition ( unsigned int  ID)

Remove the plane position at the given ID from the list.

Parameters
IDThe plane ID to remove (its position in the list).
Returns
true if the plane was removed successfully, false if ID is invalid.

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