Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitk::PlanePositionManagerService Class Reference

#include <mitkPlanePositionManager.h>

Public Member Functions

 PlanePositionManagerService ()
 
 ~PlanePositionManagerService ()
 
unsigned int AddNewPlanePosition (const mitk::PlaneGeometry *plane, unsigned int sliceIndex=0)
 Adds a new plane position to the list. If this geometry is identical to one of the list nothing will be added. More...
 
bool RemovePlanePosition (unsigned int ID)
 Removes the plane at the position ID from the list. More...
 
void RemoveAllPlanePositions ()
 Clears the complete positionlist. More...
 
mitk::RestorePlanePositionOperationGetPlanePosition (unsigned int ID)
 Getter for a specific plane position with a given ID. More...
 
unsigned int GetNumberOfPlanePositions ()
 Getting the number of all stored planes. More...
 

Detailed Description

The mitk::PlanePositionManagerService holds and manages a list of certain planepositions. To store a new position you need to specify the first slice of your slicestack and the slicenumber you want to restore in the mitk::PlanePositionManager::AddNewPlanePosition() function.

To restore a position call mitk::PlanePositionManagerService::GetPlanePosition(ID) where ID is the position in the plane positionlist (returned by AddNewPlanePostion). This will give a mitk::RestorePlanePositionOperation which can be executed by the SliceNavigationController of the slicestack.

See also
QmitkSegmentationView.cpp

Definition at line 38 of file mitkPlanePositionManager.h.

Constructor & Destructor Documentation

◆ PlanePositionManagerService()

mitk::PlanePositionManagerService::PlanePositionManagerService ( )

Definition at line 15 of file mitkPlanePositionManager.cpp.

◆ ~PlanePositionManagerService()

mitk::PlanePositionManagerService::~PlanePositionManagerService ( )

Definition at line 19 of file mitkPlanePositionManager.cpp.

Member Function Documentation

◆ AddNewPlanePosition()

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

Adds a new plane position to the list. If this geometry is identical to one of the list nothing will be added.

plane THE FIRST! slice of the slice stack sliceIndex the slice number of the selected slice

Returns
returns the ID i.e. the position in the positionlist. If the PlaneGeometry which is to be added already exists the existing ID will be returned.

Definition at line 25 of file mitkPlanePositionManager.cpp.

References mitk::Equal(), mitk::BaseGeometry::GetExtent(), mitk::BaseGeometry::GetIndexToWorldTransform(), GetNumberOfPlanePositions(), mitk::BaseGeometry::GetSpacing(), mitk::MatrixEqualElementWise(), and mitk::OpRESTOREPLANEPOSITION.

Referenced by testAddPlanePosition().

◆ GetNumberOfPlanePositions()

unsigned int mitk::PlanePositionManagerService::GetNumberOfPlanePositions ( )

Getting the number of all stored planes.

Definition at line 97 of file mitkPlanePositionManager.cpp.

Referenced by AddNewPlanePosition(), testAddPlanePosition(), testRemoveAll(), and testRemovePlanePosition().

◆ GetPlanePosition()

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

Getter for a specific plane position with a given ID.

ID the ID of the plane position

Returns
Returns a RestorePlanePositionOperation which can be executed by th SliceNavigationController or nullptr for an invalid ID

Definition at line 84 of file mitkPlanePositionManager.cpp.

References MITK_WARN.

Referenced by testGetPlanePosition(), and testRemoveAll().

◆ RemoveAllPlanePositions()

void mitk::PlanePositionManagerService::RemoveAllPlanePositions ( )

Clears the complete positionlist.

Definition at line 102 of file mitkPlanePositionManager.cpp.

Referenced by testRemoveAll().

◆ RemovePlanePosition()

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

Removes the plane at the position ID from the list.

ID the plane ID which should be removed, i.e. its position in the list

Returns
true if the plane was removed successfully and false if it is an invalid ID

Definition at line 70 of file mitkPlanePositionManager.cpp.

Referenced by testRemovePlanePosition().


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