25 for (
unsigned int i = 0; i < m_PositionList.size(); ++i)
26 delete m_PositionList[i];
31 for (
unsigned int i = 0; i < m_PositionList.size(); ++i)
33 if (m_PositionList[i] != 0)
35 bool isSameMatrix(
true);
36 bool isSameOffset(
true);
39 if (!isSameOffset || sliceIndex != m_PositionList[i]->GetPos())
53 transform->SetMatrix(matrix);
60 direction.Normalize();
70 m_PositionList.push_back(newOp);
71 return GetNumberOfPlanePositions() - 1;
76 if (m_PositionList.size() >
ID)
78 delete m_PositionList[
ID];
79 m_PositionList.erase(m_PositionList.begin() +
ID);
90 if (ID < m_PositionList.size())
92 return m_PositionList[
ID];
96 MITK_WARN <<
"GetPlanePosition returned NULL!";
103 return m_PositionList.size();
108 for (
unsigned int i = 0; i < m_PositionList.size(); ++i)
109 delete m_PositionList[i];
111 m_PositionList.clear();
ScalarType GetExtent(unsigned int direction) const
Set the time bounds (in ms)
itk::SmartPointer< Self > Pointer
~PlanePositionManagerService()
bool MatrixEqualElementWise(const vnl_matrix_fixed< TCoordRep, NRows, NCols > &matrix1, const vnl_matrix_fixed< TCoordRep, NRows, NCols > &matrix2, mitk::ScalarType epsilon=mitk::eps)
Check for element-wise matrix equality with a user defined accuracy.
PlanePositionManagerService()
const mitk::Vector3D GetSpacing() const
Get the spacing (size of a pixel).
Constants for most interaction classes, due to the generic StateMachines.
mitk::RestorePlanePositionOperation * GetPlanePosition(unsigned int ID)
Getter for a specific plane position with a given ID.
bool RemovePlanePosition(unsigned int ID)
Removes the plane at the position ID from the list.
MITKNEWMODULE_EXPORT bool Equal(mitk::ExampleDataStructure *leftHandSide, mitk::ExampleDataStructure *rightHandSide, mitk::ScalarType eps, bool verbose)
Returns true if the example data structures are considered equal.
unsigned int GetNumberOfPlanePositions()
Getting the number of all stored planes.
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 ...
Describes a two-dimensional, rectangular plane.
mitk::AffineTransform3D * GetIndexToWorldTransform()
Get the transformation used to convert from index to world coordinates.
void RemoveAllPlanePositions()
Clears the complete positionlist.
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.