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

Describes the geometry of a data object consisting of slices. More...

#include <mitkSlicedGeometry3D.h>

Inheritance diagram for mitk::SlicedGeometry3D:
Collaboration diagram for mitk::SlicedGeometry3D:

Public Member Functions

 mitkClassMacro (SlicedGeometry3D, BaseGeometry)
 
Pointer Clone () const
 
virtual mitk::PlaneGeometry * GetPlaneGeometry (int s) const
 Returns the PlaneGeometry of the slice (s). More...
 
void ChangeImageGeometryConsideringOriginOffset (const bool isAnImageGeometry) override
 Switch between image geometry and normal geometry with origin correction. More...
 
const mitk::BoundingBox * GetBoundingBox () const override
 Get the bounding box of this sliced geometry. More...
 
virtual unsigned int GetSlices () const
 Get the number of slices. More...
 
virtual bool SetPlaneGeometry (mitk::PlaneGeometry *geometry2D, int s)
 Set PlaneGeometry of slice s. More...
 
virtual bool IsValidSlice (int s=0) const
 Check whether a slice exists. More...
 
virtual const BaseGeometry * GetReferenceGeometry () const
 Get the reference geometry used for reslicing calculations. More...
 
virtual void SetReferenceGeometry (const BaseGeometry *referenceGeometry)
 Set the reference geometry for reslicing calculations. More...
 
bool HasReferenceGeometry () const
 Check whether a reference geometry has been set. More...
 
virtual void SetSliceNavigationController (mitk::SliceNavigationController *snc)
 Set the SliceNavigationController corresponding to this sliced geometry. More...
 
mitk::SliceNavigationController * GetSliceNavigationController ()
 Get the SliceNavigationController associated with this geometry. More...
 
virtual bool GetEvenlySpaced () const
 Set/Get whether the SlicedGeometry3D is evenly-spaced (m_EvenlySpaced) More...
 
virtual void SetEvenlySpaced (bool on=true)
 
virtual void SetDirectionVector (const mitk::Vector3D &directionVector)
 Set/Get the vector between slices for the evenly-spaced case (m_EvenlySpaced==true). More...
 
virtual const mitk::Vector3D & GetDirectionVector () const
 
virtual void InitializeSlicedGeometry (unsigned int slices)
 Tell this instance how many PlaneGeometries it shall manage. Bounding box and the PlaneGeometries must be set additionally by calling the respective methods! More...
 
virtual void InitializeEvenlySpaced (mitk::PlaneGeometry *geometry2D, unsigned int slices)
 Completely initialize this instance as evenly-spaced with slices parallel to the provided PlaneGeometry that is used as the first slice and for spacing calculation. More...
 
virtual void InitializeEvenlySpaced (mitk::PlaneGeometry *geometry2D, mitk::ScalarType zSpacing, unsigned int slices)
 Completely initialize this instance as evenly-spaced with slices parallel to the provided PlaneGeometry that is used as the first slice and for spacing calculation (except z-spacing). More...
 
virtual void InitializePlanes (const mitk::BaseGeometry *geometry3D, mitk::AnatomicalPlane orientation, bool top=true, bool frontside=true, bool rotated=false)
 Completely initialize this instance as evenly-spaced plane slices parallel to a side of the provided BaseGeometry and using its spacing information. More...
 
void SetImageGeometry (const bool isAnImageGeometry) override
 Override to propagate the ImageGeometry flag to all slice geometries. More...
 
void ExecuteOperation (Operation *operation) override
 Execute an operation on this sliced geometry. More...
 
- Public Member Functions inherited from mitk::BaseGeometry
 mitkClassMacroItkParent (BaseGeometry, itk::Object)
 
Pointer Clone () const
 
Point3D GetOrigin () const
 Get the origin of the geometry in world coordinates (mm). More...
 
void SetOrigin (const Point3D &origin)
 Set the origin of the geometry in world coordinates (mm). More...
 
mitk::Vector3D GetSpacing () const
 Get the spacing (voxel size) in mm per unit for each axis. More...
 
void SetSpacing (const mitk::Vector3D &aSpacing, bool enforceSetSpacing=false)
 Set the spacing (voxel size) for each axis. More...
 
VnlVector GetOriginVnl () const
 Get the origin as a VNL vector. More...
 
virtual unsigned int GetFrameOfReferenceID () const
 Get the DICOM FrameOfReferenceID referring to the world coordinate system. More...
 
virtual void SetFrameOfReferenceID (unsigned int _arg)
 Set the DICOM FrameOfReferenceID referring to the world coordinate system. More...
 
virtual unsigned long GetIndexToWorldTransformLastModified () const
 Get the last-modified timestamp of the IndexToWorldTransform. More...
 
void Modified () const override
 Overloaded Modified() to support the ModifiedLock mechanism. More...
 
virtual bool IsValid () const
 Check whether this geometry is in a valid state. More...
 
void Initialize ()
 Initialize the geometry to default values. More...
 
void InitializeGeometry (Self *newGeometry) const
 Copy the essential geometry properties into another instance. More...
 
mitk::AffineTransform3D * GetIndexToWorldTransform ()
 Get the affine transform that maps index coordinates to world coordinates. More...
 
const mitk::AffineTransform3D * GetIndexToWorldTransform () const
 Get the affine transform that maps index coordinates to world coordinates (const). More...
 
void SetIndexToWorldTransform (mitk::AffineTransform3D *transform)
 Set the affine transform for index-to-world coordinate mapping. More...
 
void SetIndexToWorldTransformByVtkMatrix (vtkMatrix4x4 *vtkmatrix)
 Set the IndexToWorldTransform via a vtkMatrix4x4. More...
 
void SetIndexToWorldTransformWithoutChangingSpacing (mitk::AffineTransform3D *transform)
 Set the IndexToWorldTransform while preserving the current spacing. More...
 
void SetIndexToWorldTransformByVtkMatrixWithoutChangingSpacing (vtkMatrix4x4 *vtkmatrix)
 Set the IndexToWorldTransform via a vtkMatrix4x4 while preserving spacing. More...
 
vtkMatrix4x4 * GetVtkMatrix ()
 Get the IndexToWorldTransform as a 4x4 VTK matrix. More...
 
const vtkMatrix4x4 * GetVtkMatrix () const
 Get the IndexToWorldTransform as a 4x4 VTK matrix (const). More...
 
vtkLinearTransform * GetVtkTransform () const
 Get the IndexToWorldTransform as a vtkLinearTransform. More...
 
void SetIdentity ()
 Reset the geometry to identity. More...
 
void Compose (const TransformType *other, bool pre=false)
 Compose the IndexToWorldTransform with another transform. More...
 
void Compose (const vtkMatrix4x4 *vtkmatrix, bool pre=false)
 Compose the IndexToWorldTransform with a vtkMatrix4x4. More...
 
void Translate (const Vector3D &vector)
 Translate the origin by a given vector. More...
 
void WorldToIndex (const mitk::Point3D &pt_mm, mitk::Point3D &pt_units) const
 Convert world coordinates (mm) of a point to continuous index coordinates. More...
 
void WorldToIndex (const mitk::Vector3D &vec_mm, mitk::Vector3D &vec_units) const
 Convert world coordinates (mm) of a vector to continuous index coordinates. More...
 
template<unsigned int VIndexDimension>
void WorldToIndex (const mitk::Point3D &pt_mm, itk::Index< VIndexDimension > &index) const
 Convert world coordinates (mm) of a point to discrete (integer) index coordinates. More...
 
void IndexToWorld (const mitk::Vector3D &vec_units, mitk::Vector3D &vec_mm) const
 Convert index coordinates of a vector to world coordinates (mm). More...
 
void IndexToWorld (const mitk::Point3D &pt_units, mitk::Point3D &pt_mm) const
 Convert continuous or discrete index coordinates of a point to world coordinates (mm). More...
 
template<unsigned int VIndexDimension>
void IndexToWorld (const itk::Index< VIndexDimension > &index, mitk::Point3D &pt_mm) const
 Convert discrete (itk::Index) index coordinates of a point to world coordinates (mm). More...
 
template<class TCoordRep >
void ItkPhysicalPointToWorld (const itk::Point< TCoordRep, 3 > &itkPhysicalPoint, mitk::Point3D &pt_mm) const
 Convert an ITK physical point to MITK world coordinates. More...
 
template<class TCoordRep >
void WorldToItkPhysicalPoint (const mitk::Point3D &pt_mm, itk::Point< TCoordRep, 3 > &itkPhysicalPoint) const
 Convert MITK world coordinates to ITK physical coordinates. More...
 
virtual const BoundingBoxType * GetBoundingBox ()
 Get the bounding box in index/unit coordinates. More...
 
const BoundsArrayType GetBounds () const
 Get the bounding box bounds as a BoundsArrayType in index/unit coordinates. More...
 
void SetBounds (const BoundsArrayType &bounds)
 Set the bounding box in index/unit coordinates. More...
 
void SetFloatBounds (const float bounds[6])
 Set the bounding box via a float array. More...
 
void SetFloatBounds (const double bounds[6])
 Set the bounding box via a double array. More...
 
VnlVector GetMatrixColumn (unsigned int direction) const
 Get a column of the IndexToWorldTransform matrix as a VnlVector. More...
 
mitk::BoundingBox::Pointer CalculateBoundingBoxRelativeToTransform (const mitk::AffineTransform3D *transform) const
 Calculate a bounding box relative to a given transform. More...
 
ScalarType GetExtent (unsigned int direction) const
 Set the time bounds (in ms) More...
 
ScalarType GetExtentInMM (int direction) const
 Get the extent of the bounding box in mm along the specified direction. More...
 
Vector3D GetAxisVector (unsigned int direction) const
 Get a vector along the bounding box in the specified direction in mm. More...
 
virtual bool Is2DConvertable ()
 Check if this geometry can be converted to 2D without information loss. More...
 
Point3D GetCenter () const
 Get the center of the bounding box in world coordinates (mm). More...
 
double GetDiagonalLength2 () const
 Get the squared length of the bounding-box diagonal in mm. More...
 
double GetDiagonalLength () const
 Get the length of the bounding-box diagonal in mm. More...
 
Point3D GetCornerPoint (int id) const
 Get the position of corner number id in world coordinates. More...
 
Point3D GetCornerPoint (bool xFront=true, bool yFront=true, bool zFront=true) const
 Get the position of a corner in world coordinates. More...
 
void SetExtentInMM (int direction, ScalarType extentInMM)
 Set the extent of the bounding box in mm along the specified direction. More...
 
bool IsInside (const mitk::Point3D &p) const
 Test whether a point (world coordinates, mm) lies inside the bounding box. More...
 
bool IsIndexInside (const mitk::Point3D &index) const
 Test whether a point in continuous index coordinates lies inside the bounding box. More...
 
template<unsigned int VIndexDimension>
bool IsIndexInside (const itk::Index< VIndexDimension > &index) const
 Test whether a discrete ITK index lies inside the bounding box. More...
 
Point3D ClampPoint (const Point3D &point) const
 Clamp a point to lie within the geometry's world-coordinate bounds. More...
 
virtual bool GetImageGeometry () const
 Query whether this geometry refers to an image. More...
 
virtual void ImageGeometryOn ()
 Toggle macro for ImageGeometry (ImageGeometryOn/ImageGeometryOff). More...
 
virtual void ImageGeometryOff ()
 
const GeometryTransformHolder * GetGeometryTransformHolder () const
 Get the internal GeometryTransformHolder. More...
 
void MapAxesToOrientations (int axes[]) const
 Map geometry axes to anatomical orientations (sagittal, coronal, axial). More...
 
- Public Member Functions inherited from mitk::OperationActor
 itkTypeMacroNoParent (OperationActor) virtual ~OperationActor()
 

Static Public Member Functions

static Pointer New ()
 
static double CalculateSpacing (const mitk::Vector3D &spacing, const mitk::Vector3D &d)
 Calculate directed spacing from regular spacing and a direction vector. More...
 

Static Public Attributes

static const std::string SLICES
 Property key for the number of slices. More...
 
static const std::string DIRECTION_VECTOR
 Property key for the direction vector between slices. More...
 
static const std::string EVENLY_SPACED
 Property key for the evenly-spaced flag. More...
 

Protected Member Functions

 SlicedGeometry3D ()
 
 SlicedGeometry3D (const SlicedGeometry3D &other)
 
 ~SlicedGeometry3D () override
 
virtual void ReinitializePlanes (const Point3D &center, const Point3D &referencePoint)
 
ScalarType GetLargestExtent (const BaseGeometry *geometry)
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
double CalculateSpacing (const mitk::Vector3D &direction) const
 
mitk::Vector3D AdjustNormal (const mitk::Vector3D &normal) const
 
void PreSetSpacing (const mitk::Vector3D &aSpacing) override
 PreSetSpacing. More...
 
 mitkCloneMacro (Self)
 
- Protected Member Functions inherited from mitk::BaseGeometry
 BaseGeometry ()
 
 BaseGeometry (const BaseGeometry &other)
 
 ~BaseGeometry () override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
virtual unsigned int GetNDimensions () const
 
bool IsBoundingBoxNull () const
 
bool IsIndexToWorldTransformNull () const
 
void SetVtkMatrixDeepCopy (vtkTransform *vtktransform)
 
void _SetSpacing (const mitk::Vector3D &aSpacing, bool enforceSetSpacing=false)
 
virtual void CheckBounds (const BoundsArrayType &)
 CheckBounds. More...
 
virtual void CheckIndexToWorldTransform (mitk::AffineTransform3D *)
 CheckIndexToWorldTransform. More...
 

Protected Attributes

std::vector< PlaneGeometry::Pointer > m_PlaneGeometries
 
bool m_EvenlySpaced
 
mitk::Vector3D m_DirectionVector
 
unsigned int m_Slices
 
const mitk::BaseGeometry * m_ReferenceGeometry
 
mitk::SliceNavigationController * m_SliceNavigationController
 

Additional Inherited Members

- Public Types inherited from mitk::BaseGeometry
typedef GeometryTransformHolder::TransformType TransformType
 Affine transform type used for index-to-world mapping. More...
 
typedef itk::BoundingBox< unsigned long, 3, ScalarType > BoundingBoxType
 3D bounding box type parameterized with ScalarType. More...
 
typedef BoundingBoxType::BoundsArrayType BoundsArrayType
 Fixed-size array of six ScalarType values representing axis-aligned bounds [xmin,xmax,ymin,ymax,zmin,zmax]. More...
 
typedef BoundingBoxType::Pointer BoundingBoxPointer
 Smart-pointer type for BoundingBoxType. More...
 
- Static Protected Member Functions inherited from mitk::BaseGeometry
static const std::string GetTransformAsString (TransformType *transformType)
 

Detailed Description

Describes the geometry of a data object consisting of slices.

A PlaneGeometry can be requested for each slice. In the case of evenly-spaced, plane geometries (m_EvenlySpaced==true), only the 2D-geometry of the first slice has to be set (to an instance of PlaneGeometry). The 2D geometries of the other slices are calculated by shifting the first slice in the direction m_DirectionVector by m_Spacing.z * sliceNumber. The m_Spacing member (which is only relevant in the case m_EvenlySpaced==true) describes the size of a voxel (in mm), i.e., m_Spacing.x is the voxel width in the x-direction of the plane. It is derived from the reference geometry of this SlicedGeometry3D, which usually would be the global geometry describing how datasets are to be resliced.

By default, slices are oriented in the direction of one of the main axes (x, y, z). However, by means of rotation, it is possible to realign the slices in any possible direction. In case of an inclined plane, the spacing is derived as a product of the (regular) geometry spacing and the direction vector of the plane.

SlicedGeometry3D and the associated PlaneGeometries have to be initialized in the method GenerateOutputInformation() of BaseProcess (or CopyInformation / UpdateOutputInformation of BaseData, if possible, e.g., by analyzing pic tags in Image) subclasses. See also

See also
itk::ProcessObject::GenerateOutputInformation(),
itk::DataObject::CopyInformation() and itk::DataObject::UpdateOutputInformation().

Rule: everything is in mm (or ms for temporal information) if not stated otherwise.

Warning
The hull (i.e., transform, bounding-box and time-bounds) is only guaranteed to be up-to-date after calling UpdateInformation().

Definition at line 62 of file mitkSlicedGeometry3D.h.

Constructor & Destructor Documentation

◆ SlicedGeometry3D() [1/2]

mitk::SlicedGeometry3D::SlicedGeometry3D ( )
protected

◆ SlicedGeometry3D() [2/2]

mitk::SlicedGeometry3D::SlicedGeometry3D ( const SlicedGeometry3D &  other)
protected

◆ ~SlicedGeometry3D()

mitk::SlicedGeometry3D::~SlicedGeometry3D ( )
overrideprotected

Member Function Documentation

◆ AdjustNormal()

mitk::Vector3D mitk::SlicedGeometry3D::AdjustNormal ( const mitk::Vector3D &  normal) const
protected

The extent of the slice stack, i.e. the number of slices, depends on the plane normal. For rotated geometries, the geometry's transform needs to be accounted in this calculation.

◆ CalculateSpacing() [1/2]

double mitk::SlicedGeometry3D::CalculateSpacing ( const mitk::Vector3D &  direction) const
protected

Calculate "directed spacing", i.e. the spacing in directions non-orthogonal to the coordinate axes. This is done via the ellipsoid equation.

◆ CalculateSpacing() [2/2]

static double mitk::SlicedGeometry3D::CalculateSpacing ( const mitk::Vector3D &  spacing,
const mitk::Vector3D &  d 
)
static

Calculate directed spacing from regular spacing and a direction vector.

Computes the effective spacing along d given the isotropic spacing, using the ellipsoid equation.

Parameters
[in]spacingThe regular voxel spacing.
[in]dThe direction vector.
Returns
The calculated spacing along d.

◆ ChangeImageGeometryConsideringOriginOffset()

void mitk::SlicedGeometry3D::ChangeImageGeometryConsideringOriginOffset ( const bool  isAnImageGeometry)
overridevirtual

Switch between image geometry and normal geometry with origin correction.

Overrides BaseGeometry to also propagate the change to all contained PlaneGeometries.

Parameters
[in]isAnImageGeometrytrue to switch to image geometry, false to switch to normal geometry.

Reimplemented from mitk::BaseGeometry.

◆ Clone()

Pointer mitk::SlicedGeometry3D::Clone ( ) const

◆ ExecuteOperation()

void mitk::SlicedGeometry3D::ExecuteOperation ( Operation *  operation)
overridevirtual

Execute an operation on this sliced geometry.

Handles rotation operations by re-initializing the plane stack after the rotation is applied.

Parameters
[in]operationThe operation to execute.

Reimplemented from mitk::BaseGeometry.

◆ GetBoundingBox()

const mitk::BoundingBox* mitk::SlicedGeometry3D::GetBoundingBox ( ) const
override

Get the bounding box of this sliced geometry.

Returns
Const pointer to the bounding box.
Precondition
The bounding box must not be null.

◆ GetDirectionVector()

virtual const mitk::Vector3D& mitk::SlicedGeometry3D::GetDirectionVector ( ) const
virtual

◆ GetEvenlySpaced()

virtual bool mitk::SlicedGeometry3D::GetEvenlySpaced ( ) const
virtual

Set/Get whether the SlicedGeometry3D is evenly-spaced (m_EvenlySpaced)

If (a) m_EvenlySpaced==true, (b) we don't have a PlaneGeometry stored for the requested slice, and (c) the first slice (s=0) is a PlaneGeometry instance, then we calculate the geometry of the requested as the plane of the first slice shifted by m_Spacing.z * s in the direction of m_DirectionVector.

See also
GetPlaneGeometry

◆ GetLargestExtent()

ScalarType mitk::SlicedGeometry3D::GetLargestExtent ( const BaseGeometry *  geometry)
protected

◆ GetPlaneGeometry()

virtual mitk::PlaneGeometry* mitk::SlicedGeometry3D::GetPlaneGeometry ( int  s) const
virtual

Returns the PlaneGeometry of the slice (s).

If (a) m_EvenlySpaced==true, (b) we don't have a PlaneGeometry stored for the requested slice, and (c) the first slice (s=0) is a PlaneGeometry instance, then we calculate the geometry of the requested as the plane of the first slice shifted by m_Spacing[3]*s in the direction of m_DirectionVector.

Warning
The PlaneGeometries are not necessarily up-to-date and not even initialized.

The PlaneGeometries have to be initialized in the method GenerateOutputInformation() of BaseProcess (or CopyInformation / UpdateOutputInformation of BaseData, if possible, e.g., by analyzing pic tags in Image) subclasses. See also

See also
itk::ProcessObject::GenerateOutputInformation(),
itk::DataObject::CopyInformation() and
itk::DataObject::UpdateOutputInformation().

◆ GetReferenceGeometry()

virtual const BaseGeometry* mitk::SlicedGeometry3D::GetReferenceGeometry ( ) const
virtual

Get the reference geometry used for reslicing calculations.

Returns
Const pointer to the reference geometry, or nullptr if not set.

◆ GetSliceNavigationController()

mitk::SliceNavigationController* mitk::SlicedGeometry3D::GetSliceNavigationController ( )

Get the SliceNavigationController associated with this geometry.

Returns
Pointer to the SliceNavigationController, or nullptr if none is set.

◆ GetSlices()

virtual unsigned int mitk::SlicedGeometry3D::GetSlices ( ) const
virtual

Get the number of slices.

◆ HasReferenceGeometry()

bool mitk::SlicedGeometry3D::HasReferenceGeometry ( ) const

Check whether a reference geometry has been set.

Returns
true if a non-null reference geometry is available.

◆ InitializeEvenlySpaced() [1/2]

virtual void mitk::SlicedGeometry3D::InitializeEvenlySpaced ( mitk::PlaneGeometry *  geometry2D,
mitk::ScalarType  zSpacing,
unsigned int  slices 
)
virtual

Completely initialize this instance as evenly-spaced with slices parallel to the provided PlaneGeometry that is used as the first slice and for spacing calculation (except z-spacing).

Initializes the bounding box according to the width/height of the PlaneGeometry and slices. The x-/y-spacing is calculated from the PlaneGeometry.

◆ InitializeEvenlySpaced() [2/2]

virtual void mitk::SlicedGeometry3D::InitializeEvenlySpaced ( mitk::PlaneGeometry *  geometry2D,
unsigned int  slices 
)
virtual

Completely initialize this instance as evenly-spaced with slices parallel to the provided PlaneGeometry that is used as the first slice and for spacing calculation.

Initializes the bounding box according to the width/height of the PlaneGeometry and slices. The spacing is calculated from the PlaneGeometry.

Referenced by mitk::Image::InitializeByItk().

◆ InitializePlanes()

virtual void mitk::SlicedGeometry3D::InitializePlanes ( const mitk::BaseGeometry *  geometry3D,
mitk::AnatomicalPlane  orientation,
bool  top = true,
bool  frontside = true,
bool  rotated = false 
)
virtual

Completely initialize this instance as evenly-spaced plane slices parallel to a side of the provided BaseGeometry and using its spacing information.

Initializes the bounding box according to the width/height of the BaseGeometry and the number of slices according to BaseGeometry::GetExtent(2).

Parameters
geometry3D
orientationside parallel to which the slices will be oriented
topif true, create plane at top, otherwise at bottom (for AnatomicalPlane Axial, for other plane locations respectively)
frontsidedefines the side of the plane (the definition of front/back is somewhat arbitrary)
rotatedrotates the plane by 180 degree around its normal (the definition of rotated vs not rotated is somewhat arbitrary)

◆ InitializeSlicedGeometry()

virtual void mitk::SlicedGeometry3D::InitializeSlicedGeometry ( unsigned int  slices)
virtual

Tell this instance how many PlaneGeometries it shall manage. Bounding box and the PlaneGeometries must be set additionally by calling the respective methods!

Warning
Bounding box and the 2D-geometries must be set additionally: use SetBounds(), SetGeometry().

◆ IsValidSlice()

virtual bool mitk::SlicedGeometry3D::IsValidSlice ( int  s = 0) const
virtual

Check whether a slice exists.

◆ mitkClassMacro()

mitk::SlicedGeometry3D::mitkClassMacro ( SlicedGeometry3D  ,
BaseGeometry   
)

◆ mitkCloneMacro()

mitk::SlicedGeometry3D::mitkCloneMacro ( Self  )
protected

◆ New()

static Pointer mitk::SlicedGeometry3D::New ( )
static

Method for creation through the object factory.

◆ PreSetSpacing()

void mitk::SlicedGeometry3D::PreSetSpacing ( const mitk::Vector3D &  aSpacing)
overrideprotectedvirtual

PreSetSpacing.

These virtual function allows a different beahiour in subclasses. Do implement them in every subclass of BaseGeometry. If not needed, use {Superclass::PreSetSpacing();};

Reimplemented from mitk::BaseGeometry.

◆ PrintSelf()

void mitk::SlicedGeometry3D::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotected

◆ ReinitializePlanes()

virtual void mitk::SlicedGeometry3D::ReinitializePlanes ( const Point3D &  center,
const Point3D &  referencePoint 
)
protectedvirtual

Reinitialize plane stack after rotation. More precisely, the first plane of the stack needs to spatially aligned, in two respects:

  1. Re-alignment with respect to the dataset center; this is necessary since the distance from the first plane to the center could otherwise continuously decrease or increase.
  2. Re-alignment with respect to a given reference point; the reference point is a location which the user wants to be exactly touched by one plane of the plane stack. The first plane is minimally shifted to ensure this touching. Usually, the reference point would be the point around which the geometry is rotated.

◆ SetDirectionVector()

virtual void mitk::SlicedGeometry3D::SetDirectionVector ( const mitk::Vector3D &  directionVector)
virtual

Set/Get the vector between slices for the evenly-spaced case (m_EvenlySpaced==true).

If the direction-vector is (0,0,0) (the default) and the first 2D geometry is a PlaneGeometry, then the direction-vector will be calculated from the plane normal.

See also
m_DirectionVector

◆ SetEvenlySpaced()

virtual void mitk::SlicedGeometry3D::SetEvenlySpaced ( bool  on = true)
virtual

◆ SetImageGeometry()

void mitk::SlicedGeometry3D::SetImageGeometry ( const bool  isAnImageGeometry)
overridevirtual

Override to propagate the ImageGeometry flag to all slice geometries.

Parameters
[in]isAnImageGeometrytrue for image geometry, false otherwise.

Reimplemented from mitk::BaseGeometry.

◆ SetPlaneGeometry()

virtual bool mitk::SlicedGeometry3D::SetPlaneGeometry ( mitk::PlaneGeometry *  geometry2D,
int  s 
)
virtual

Set PlaneGeometry of slice s.

◆ SetReferenceGeometry()

virtual void mitk::SlicedGeometry3D::SetReferenceGeometry ( const BaseGeometry *  referenceGeometry)
virtual

Set the reference geometry for reslicing calculations.

The reference geometry is typically the global geometry describing how datasets are to be resliced. It is propagated to each PlaneGeometry managed by this SlicedGeometry3D.

Parameters
[in]referenceGeometryThe reference geometry (may be nullptr).

◆ SetSliceNavigationController()

virtual void mitk::SlicedGeometry3D::SetSliceNavigationController ( mitk::SliceNavigationController *  snc)
virtual

Set the SliceNavigationController corresponding to this sliced geometry.

The SNC needs to be informed when the number of slices in the geometry changes, which can occur whenthe slices are re-oriented by rotation.

Member Data Documentation

◆ DIRECTION_VECTOR

const std::string mitk::SlicedGeometry3D::DIRECTION_VECTOR
static

Property key for the direction vector between slices.

Definition at line 199 of file mitkSlicedGeometry3D.h.

◆ EVENLY_SPACED

const std::string mitk::SlicedGeometry3D::EVENLY_SPACED
static

Property key for the evenly-spaced flag.

Definition at line 201 of file mitkSlicedGeometry3D.h.

◆ m_DirectionVector

mitk::Vector3D mitk::SlicedGeometry3D::m_DirectionVector
mutableprotected

Vector between slices for the evenly-spaced case (m_EvenlySpaced==true). If the direction-vector is (0,0,0) (the default) and the first 2D geometry is a PlaneGeometry, then the direction-vector will be calculated from the plane normal.

Definition at line 350 of file mitkSlicedGeometry3D.h.

◆ m_EvenlySpaced

bool mitk::SlicedGeometry3D::m_EvenlySpaced
protected

If (a) m_EvenlySpaced==true, (b) we don't have a PlaneGeometry stored for the requested slice, and (c) the first slice (s=0) is a PlaneGeometry instance, then we calculate the geometry of the requested as the plane of the first slice shifted by m_Spacing.z*s in the direction of m_DirectionVector.

See also
GetPlaneGeometry

Definition at line 342 of file mitkSlicedGeometry3D.h.

◆ m_PlaneGeometries

std::vector<PlaneGeometry::Pointer> mitk::SlicedGeometry3D::m_PlaneGeometries
mutableprotected

Container for the 2D-geometries contained within this SliceGeometry3D.

Definition at line 331 of file mitkSlicedGeometry3D.h.

◆ m_ReferenceGeometry

const mitk::BaseGeometry* mitk::SlicedGeometry3D::m_ReferenceGeometry
protected

Underlying BaseGeometry for this SlicedGeometry

Definition at line 356 of file mitkSlicedGeometry3D.h.

◆ m_SliceNavigationController

mitk::SliceNavigationController* mitk::SlicedGeometry3D::m_SliceNavigationController
protected

SNC correcsponding to this geometry; used to reflect changes in the number of slices due to rotation.

Definition at line 361 of file mitkSlicedGeometry3D.h.

◆ m_Slices

unsigned int mitk::SlicedGeometry3D::m_Slices
protected

Number of slices this SliceGeometry3D is describing.

Definition at line 353 of file mitkSlicedGeometry3D.h.

◆ SLICES

const std::string mitk::SlicedGeometry3D::SLICES
static

Property key for the number of slices.

Definition at line 197 of file mitkSlicedGeometry3D.h.


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