Medical Imaging Interaction Toolkit  2018.4.99-f51274ea
Medical Imaging Interaction Toolkit
mitk::TimeGeometry Class Referenceabstract

#include <mitkTimeGeometry.h>

Inheritance diagram for mitk::TimeGeometry:
Collaboration diagram for mitk::TimeGeometry:

Public Types

typedef TimeGeometry 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
 
Pointer Clone () const
 
 itkCreateAnotherMacro (Self)
 
virtual TimeStepType CountTimeSteps () const =0
 Returns the number of time steps. More...
 
virtual TimePointType GetMinimumTimePoint () const =0
 Returns the first time point for which the object is valid. More...
 
virtual TimePointType GetMaximumTimePoint () const =0
 Returns the last time point for which the object is valid. More...
 
virtual TimePointType GetMinimumTimePoint (TimeStepType step) const =0
 Returns the first time point for which the object is valid. More...
 
virtual TimePointType GetMaximumTimePoint (TimeStepType step) const =0
 Returns the last time point for which the object is valid. More...
 
virtual TimeBounds GetTimeBounds () const =0
 Get the time bounds (in ms) More...
 
virtual TimeBounds GetTimeBounds (TimeStepType step) const =0
 Get the time bounds for the given TimeStep (in ms) More...
 
virtual bool IsValidTimePoint (TimePointType timePoint) const =0
 Tests if a given time point is covered by this object. More...
 
virtual bool IsValidTimeStep (TimeStepType timeStep) const =0
 Test for the given time step if a geometry is availible. More...
 
virtual TimePointType TimeStepToTimePoint (TimeStepType timeStep) const =0
 Converts a time step to a time point. More...
 
virtual TimeStepType TimePointToTimeStep (TimePointType timePoint) const =0
 Converts a time point to the corresponding time step. More...
 
virtual BaseGeometry::Pointer GetGeometryForTimePoint (TimePointType timePoint) const =0
 Returns the geometry of a specific time point. More...
 
virtual BaseGeometry::Pointer GetGeometryForTimeStep (TimeStepType timeStep) const =0
 Returns the geometry which corresponds to the given time step. More...
 
virtual BaseGeometry::Pointer GetGeometryCloneForTimeStep (TimeStepType timeStep) const =0
 Returns a clone of the geometry of a specific time point. More...
 
virtual void SetTimeStepGeometry (BaseGeometry *geometry, TimeStepType timeStep)=0
 Sets the geometry for a given time step. More...
 
virtual void Expand (TimeStepType size)=0
 Expands to the given number of time steps. More...
 
virtual void ReplaceTimeStepGeometries (const BaseGeometry *geometry)=0
 Replaces the geometry instances with clones ot the passed geometry. More...
 
virtual bool IsValid () const =0
 Tests if all necessary informations are set and the object is valid. More...
 
Point3D GetCornerPointInWorld (int id) const
 Get the position of the corner number id (in world coordinates) More...
 
Point3D GetCornerPointInWorld (bool xFront=true, bool yFront=true, bool zFront=true) const
 Get the position of a corner (in world coordinates) More...
 
Point3D GetCenterInWorld () const
 Get the center of the bounding-box in mm. More...
 
double GetDiagonalLength2InWorld () const
 Get the squared length of the diagonal of the bounding-box in mm. More...
 
double GetDiagonalLengthInWorld () const
 Get the length of the diagonal of the bounding-box in mm. More...
 
bool IsWorldPointInside (const mitk::Point3D &p) const
 Test whether the point p (world coordinates in mm) is inside the bounding box. More...
 
void UpdateBoundingBox ()
 Updates the bounding box to cover the area used in all time steps. More...
 
BoundingBoxGetBoundingBoxInWorld () const
 Returns a bounding box that covers all time steps. More...
 
BoundingBox::BoundsArrayType GetBoundsInWorld () const
 Returns the world bounds of the object that cover all time steps. More...
 
ScalarType GetExtentInWorld (unsigned int direction) const
 Returns the Extend of the bounding in the given direction. More...
 
virtual void Initialize ()
 Initializes the TimeGeometry. More...
 
void Update ()
 Updates the geometry. More...
 
virtual void UpdateWithoutBoundingBox ()
 Updates everything except the Bounding box. More...
 
void ExecuteOperation (Operation *op) override
 Executes the given operation on all time steps. More...
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
- Public Member Functions inherited from mitk::OperationActor
 itkTypeMacroNoParent (OperationActor) virtual ~OperationActor()
 

Static Public Member Functions

static const char * GetStaticNameOfClass ()
 

Protected Member Functions

 TimeGeometry ()
 
 ~TimeGeometry () override
 
LightObject::Pointer InternalClone () const override
 Makes a deep copy of the current object. More...
 

Protected Attributes

BoundingBox::Pointer m_BoundingBox
 Contains a bounding box which includes all time steps. More...
 

Detailed Description

Definition at line 43 of file mitkTimeGeometry.h.

Member Typedef Documentation

◆ ConstPointer

Definition at line 60 of file mitkTimeGeometry.h.

◆ Pointer

◆ Self

Definition at line 60 of file mitkTimeGeometry.h.

◆ Superclass

typedef itk::Object mitk::TimeGeometry::Superclass

Definition at line 60 of file mitkTimeGeometry.h.

Constructor & Destructor Documentation

◆ TimeGeometry()

mitk::TimeGeometry::TimeGeometry ( )
protected

Definition at line 17 of file mitkTimeGeometry.cpp.

References m_BoundingBox, and ~TimeGeometry().

◆ ~TimeGeometry()

mitk::TimeGeometry::~TimeGeometry ( )
overrideprotecteddefault

Referenced by TimeGeometry().

Member Function Documentation

◆ Clone()

◆ CountTimeSteps()

virtual TimeStepType mitk::TimeGeometry::CountTimeSteps ( ) const
pure virtual

Returns the number of time steps.

Returns the number of time steps for which geometries are saved. The number of time steps is also the upper bound of the time steps. The minimum time steps is always 0.

Implemented in mitk::ArbitraryTimeGeometry, and mitk::ProportionalTimeGeometry.

Referenced by mitk::Surface::CalculateBoundingBox(), mitk::UnstructuredGrid::CalculateBoundingBox(), mitk::DataStorage::ComputeBoundingGeometry3D(), mitk::ConvertTimePointListToMetaDataObject(), mitk::Equal(), ExecuteOperation(), mitk::ExtractDirectedPlaneImageFilter::GenerateData(), mitk::ExtractSliceFilter::GenerateData(), mitk::MaskImageFilter::GenerateInputRequestedRegion(), mitk::LabeledImageToSurfaceFilter::GenerateOutputInformation(), mitk::ExtractSliceFilter::GenerateOutputInformation(), mitk::VectorImageMapper2D::GetCurrentTimeStep(), mitk::Image::Initialize(), mitk::ContourModel::Initialize(), mitk::BaseData::IsEmpty(), mitk::MeshMapper2D::Paint(), PrintSelf(), mitk::Image::SetGeometry(), mitk::SlicedData::SetOrigin(), mitk::BaseData::SetOrigin(), mitk::SlicedData::SetSpacing(), mitk::ContourModelMapper2D::Update(), mitk::ContourModelMapper3D::Update(), mitk::LabelSetImageVtkMapper2D::Update(), mitk::RegEvaluationMapper2D::Update(), mitk::Mapper::Update(), mitk::DoseImageVtkMapper2D::Update(), mitk::ImageVtkMapper2D::Update(), mitk::SurfaceVtkMapper2D::Update(), UpdateBoundingBox(), mitk::PointSet::UpdateOutputInformation(), mitk::SurfaceStlIO::Write(), mitk::SurfaceVtkXmlIO::Write(), and mitk::SurfaceVtkLegacyIO::Write().

◆ ExecuteOperation()

void mitk::TimeGeometry::ExecuteOperation ( mitk::Operation op)
overridevirtual

◆ Expand()

virtual void mitk::TimeGeometry::Expand ( TimeStepType  size)
pure virtual

Expands to the given number of time steps.

Expands to the given number of time steps. Each new created time step is filled with an empty geometry. Shrinking is not supported!

Implemented in mitk::ArbitraryTimeGeometry, and mitk::ProportionalTimeGeometry.

◆ GetBoundingBoxInWorld()

◆ GetBoundsInWorld()

BoundingBox::BoundsArrayType mitk::TimeGeometry::GetBoundsInWorld ( ) const
inline

Returns the world bounds of the object that cover all time steps.

Definition at line 267 of file mitkTimeGeometry.h.

References Update().

Referenced by mitk::Equal().

◆ GetCenterInWorld()

mitk::Point3D mitk::TimeGeometry::GetCenterInWorld ( ) const

Get the center of the bounding-box in mm.

Definition at line 93 of file mitkTimeGeometry.cpp.

References m_BoundingBox.

◆ GetClassHierarchy()

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

Reimplemented in mitk::ArbitraryTimeGeometry, and mitk::ProportionalTimeGeometry.

Definition at line 60 of file mitkTimeGeometry.h.

◆ GetClassName()

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

◆ GetCornerPointInWorld() [1/2]

mitk::Point3D mitk::TimeGeometry::GetCornerPointInWorld ( int  id) const

Get the position of the corner number id (in world coordinates)

See SetImageGeometry for how a corner is defined on images.

Definition at line 34 of file mitkTimeGeometry.cpp.

References mitk::FillVector3D(), and m_BoundingBox.

Referenced by mitk::DataStorage::ComputeBoundingBox(), mitk::DataStorage::ComputeBoundingGeometry3D(), GetDiagonalLength2InWorld(), mitk::BoundingObjectGroup::UpdateOutputInformation(), and mitk::ContourSet::UpdateOutputInformation().

◆ GetCornerPointInWorld() [2/2]

mitk::Point3D mitk::TimeGeometry::GetCornerPointInWorld ( bool  xFront = true,
bool  yFront = true,
bool  zFront = true 
) const

Get the position of a corner (in world coordinates)

See SetImageGeometry for how a corner is defined on images.

Definition at line 80 of file mitkTimeGeometry.cpp.

References m_BoundingBox.

◆ GetDiagonalLength2InWorld()

double mitk::TimeGeometry::GetDiagonalLength2InWorld ( ) const

Get the squared length of the diagonal of the bounding-box in mm.

Definition at line 99 of file mitkTimeGeometry.cpp.

References GetCornerPointInWorld().

Referenced by GetDiagonalLengthInWorld().

◆ GetDiagonalLengthInWorld()

double mitk::TimeGeometry::GetDiagonalLengthInWorld ( ) const

Get the length of the diagonal of the bounding-box in mm.

Definition at line 105 of file mitkTimeGeometry.cpp.

References GetDiagonalLength2InWorld().

◆ GetExtentInWorld()

mitk::ScalarType mitk::TimeGeometry::GetExtentInWorld ( unsigned int  direction) const

Returns the Extend of the bounding in the given direction.

Definition at line 145 of file mitkTimeGeometry.cpp.

References m_BoundingBox.

Referenced by mitk::Cone::GetVolume(), mitk::Cylinder::GetVolume(), and mitk::Cuboid::GetVolume().

◆ GetGeometryCloneForTimeStep()

virtual BaseGeometry::Pointer mitk::TimeGeometry::GetGeometryCloneForTimeStep ( TimeStepType  timeStep) const
pure virtual

Returns a clone of the geometry of a specific time point.

If an invalid time step is given (e.g. no geometry is defined for this time step) a null-pointer will be returned.

Implemented in mitk::ArbitraryTimeGeometry, and mitk::ProportionalTimeGeometry.

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

◆ GetGeometryForTimePoint()

virtual BaseGeometry::Pointer mitk::TimeGeometry::GetGeometryForTimePoint ( TimePointType  timePoint) const
pure virtual

Returns the geometry of a specific time point.

Returns the geometry which defines the given time point. If the given time point is invalid an null-pointer is returned.

The pointer to the returned geometry may point to the saved geometry but this is not necessarily the case. So a change to the returned geometry may or may not afflict the geometry for the time point or all time points depending on the used implementation of TimeGeometry.

Implemented in mitk::ArbitraryTimeGeometry, and mitk::ProportionalTimeGeometry.

Referenced by mitk::NodePredicateGeometry::CheckNode(), QmitkSliceBasedInterpolatorWidget::TranslateAndInterpolateChangedSlice(), and QmitkSlicesInterpolator::TranslateAndInterpolateChangedSlice().

◆ GetGeometryForTimeStep()

virtual BaseGeometry::Pointer mitk::TimeGeometry::GetGeometryForTimeStep ( TimeStepType  timeStep) const
pure virtual

Returns the geometry which corresponds to the given time step.

Returns the geometry which defines the given time step. If the given time step is invalid an null-pointer is returned.

The pointer to the returned geometry may point to the saved geometry but this is not necessarily the case. So a change to the returned geometry may or may not afflict the geometry for the time step or all time steps depending on the used implementation of TimeGeometry.

Implemented in mitk::ArbitraryTimeGeometry, and mitk::ProportionalTimeGeometry.

Referenced by mitk::Surface::CalculateBoundingBox(), mitk::UnstructuredGrid::CalculateBoundingBox(), mitk::TestDICOMLoading::DumpImageInformation(), mitk::Equal(), ExecuteOperation(), mitk::ExtractDirectedPlaneImageFilter::GenerateData(), mitk::HeightFieldSurfaceClipImageFilter::GenerateData(), mitk::ExtractSliceFilter::GenerateData(), mitk::LabelSetImageVtkMapper2D::GenerateDataForRenderer(), mitk::DoseImageVtkMapper2D::GenerateDataForRenderer(), mitk::PlaneGeometryDataToSurfaceFilter::GenerateOutputInformation(), mitk::ExtractSliceFilter::GenerateOutputInformation(), mitk::SegTool2D::GetAffectedImageSliceAs2DImage(), mitk::SlicedData::GetSlicedGeometry(), mitk::AffineBaseDataInteractor3D::GetUpdatedTimeGeometry(), mitk::Image::Initialize(), QmitkSlicesInterpolator::OnAcceptInterpolationClicked(), PrintSelf(), mitk::ReadVoxel(), mitk::GeometryClipImageFilter::SetClippingGeometry(), mitk::Image::SetGeometry(), mitk::SurfaceToImageFilter::Stencil3DImage(), mitk::SurfaceStampImageFilter::SurfaceStamp(), mitk::AffineBaseDataInteractor3D::TranslateObject(), mitk::BoundingShapeInteractor::TranslateObject(), and UpdateBoundingBox().

◆ GetMaximumTimePoint() [1/2]

virtual TimePointType mitk::TimeGeometry::GetMaximumTimePoint ( ) const
pure virtual

Returns the last time point for which the object is valid.

Gives the last time point for which a valid geometrie is saved in this time geometry. The time point is given in ms.

Implemented in mitk::ArbitraryTimeGeometry, and mitk::ProportionalTimeGeometry.

Referenced by mitk::Equal().

◆ GetMaximumTimePoint() [2/2]

virtual TimePointType mitk::TimeGeometry::GetMaximumTimePoint ( TimeStepType  step) const
pure virtual

Returns the last time point for which the object is valid.

Gives the last time point for the Geometry specified by the given TimeStep. The time point is given in ms.

Implemented in mitk::ArbitraryTimeGeometry, and mitk::ProportionalTimeGeometry.

◆ GetMinimumTimePoint() [1/2]

virtual TimePointType mitk::TimeGeometry::GetMinimumTimePoint ( ) const
pure virtual

Returns the first time point for which the object is valid.

Returns the first valid time point for this geometry. If only one time steps available it usually goes from -max to +max. The time point is given in ms.

Implemented in mitk::ArbitraryTimeGeometry, and mitk::ProportionalTimeGeometry.

Referenced by mitk::Equal().

◆ GetMinimumTimePoint() [2/2]

virtual TimePointType mitk::TimeGeometry::GetMinimumTimePoint ( TimeStepType  step) const
pure virtual

Returns the first time point for which the object is valid.

Returns the first valid time point for the given TimeStep. The time point is given in ms.

Implemented in mitk::ArbitraryTimeGeometry, and mitk::ProportionalTimeGeometry.

◆ GetStaticNameOfClass()

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

Definition at line 60 of file mitkTimeGeometry.h.

◆ GetTimeBounds() [1/2]

◆ GetTimeBounds() [2/2]

virtual TimeBounds mitk::TimeGeometry::GetTimeBounds ( TimeStepType  step) const
pure virtual

Get the time bounds for the given TimeStep (in ms)

Implemented in mitk::ArbitraryTimeGeometry, and mitk::ProportionalTimeGeometry.

◆ Initialize()

void mitk::TimeGeometry::Initialize ( )
virtual

Initializes the TimeGeometry.

Reimplemented in mitk::ArbitraryTimeGeometry, and mitk::ProportionalTimeGeometry.

Definition at line 26 of file mitkTimeGeometry.cpp.

◆ InternalClone()

itk::LightObject::Pointer mitk::TimeGeometry::InternalClone ( ) const
overrideprotected

Makes a deep copy of the current object.

Definition at line 180 of file mitkTimeGeometry.cpp.

References m_BoundingBox, and mitkThrow.

Referenced by mitk::ProportionalTimeGeometry::InternalClone(), and mitk::ArbitraryTimeGeometry::InternalClone().

◆ IsValid()

virtual bool mitk::TimeGeometry::IsValid ( ) const
pure virtual

Tests if all necessary informations are set and the object is valid.

Implemented in mitk::ArbitraryTimeGeometry, and mitk::ProportionalTimeGeometry.

◆ IsValidTimePoint()

◆ IsValidTimeStep()

◆ IsWorldPointInside()

bool mitk::TimeGeometry::IsWorldPointInside ( const mitk::Point3D p) const

Test whether the point p (world coordinates in mm) is inside the bounding box.

Definition at line 110 of file mitkTimeGeometry.cpp.

References m_BoundingBox.

◆ itkCreateAnotherMacro()

mitk::TimeGeometry::itkCreateAnotherMacro ( Self  )

◆ PrintSelf()

void mitk::TimeGeometry::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
override

◆ ReplaceTimeStepGeometries()

virtual void mitk::TimeGeometry::ReplaceTimeStepGeometries ( const BaseGeometry geometry)
pure virtual

Replaces the geometry instances with clones ot the passed geometry.

Replaces the geometries of all time steps with clones of the passed geometry. Replacment strategy depends on the implementation of TimeGeometry sub class.

Remarks
The time points itself stays untouched. Use this method if you want to change the spatial properties of a TimeGeometry and preserve the time "grid".

Implemented in mitk::ArbitraryTimeGeometry, and mitk::ProportionalTimeGeometry.

◆ SetTimeStepGeometry()

virtual void mitk::TimeGeometry::SetTimeStepGeometry ( BaseGeometry geometry,
TimeStepType  timeStep 
)
pure virtual

Sets the geometry for a given time step.

Sets the geometry for the given time steps. This may also afflects other time steps, depending on the implementation of TimeGeometry.

Implemented in mitk::ArbitraryTimeGeometry, and mitk::ProportionalTimeGeometry.

◆ TimePointToTimeStep()

virtual TimeStepType mitk::TimeGeometry::TimePointToTimeStep ( TimePointType  timePoint) const
pure virtual

Converts a time point to the corresponding time step.

Converts a time point to a time step in a way that the new time step indicates the same geometry as the time point. If a negativ invalid time point is given always time step 0 is returned. If an positiv invalid time step is given an invalid time step will be returned.

Implemented in mitk::ArbitraryTimeGeometry, and mitk::ProportionalTimeGeometry.

Referenced by QmitkSlicesInterpolator::AcceptAllInterpolations(), mitk::SurfaceInterpolationController::AddNewContours(), mitk::PointSet::ExecuteOperation(), mitk::RGBToRGBACastImageFilter::GenerateData(), mitk::BoundingObjectCutter::GenerateData(), mitk::MaskImageFilter::GenerateData(), mitk::HeightFieldSurfaceClipImageFilter::GenerateData(), mitk::GeometryClipImageFilter::GenerateData(), mitk::SurfaceVtkMapper2D::GenerateDataForRenderer(), mitk::GenerateTimeInInputRegion(), mitk::AutoSegmentationTool::Get3DImageByTimePoint(), QmitkAdaptiveRegionGrowingToolGUI::Get3DImageByTimePoint(), mitk::SurfaceInterpolationController::GetContour(), mitk::VectorImageMapper2D::GetCurrentTimeStep(), mitk::SurfaceInterpolationController::GetNumberOfContours(), mitk::BaseRenderer::GetTimeStep(), mitk::SurfaceInterpolationController::Interpolate(), QmitkSlicesInterpolator::Interpolate(), QmitkSlicesInterpolator::OnAccept3DInterpolationClicked(), QmitkSlicesInterpolator::OnAcceptInterpolationClicked(), QmitkAdaptiveRegionGrowingToolGUI::OnPointAdded(), mitk::MeshMapper2D::Paint(), mitk::SurfaceInterpolationController::ReinitializeInterpolation(), mitk::SurfaceInterpolationController::RemoveContour(), mitk::SurfaceInterpolationController::ReplaceInterpolationSession(), QmitkSlicesInterpolator::SetCurrentContourListID(), and mitk::SurfaceStampImageFilter::SurfaceStamp().

◆ TimeStepToTimePoint()

virtual TimePointType mitk::TimeGeometry::TimeStepToTimePoint ( TimeStepType  timeStep) const
pure virtual

Converts a time step to a time point.

Converts a time step to a time point in a way that the new time point indicates the same geometry as the time step. If the original time steps does not point to a valid geometry, a time point is calculated that also does not point to a valid geometry, but no exception is raised.

Implemented in mitk::ArbitraryTimeGeometry, and mitk::ProportionalTimeGeometry.

Referenced by mitk::Equal(), mitk::ExtractTimeGrid(), mitk::RGBToRGBACastImageFilter::GenerateData(), mitk::BoundingObjectCutter::GenerateData(), mitk::MaskImageFilter::GenerateData(), mitk::HeightFieldSurfaceClipImageFilter::GenerateData(), mitk::GeometryClipImageFilter::GenerateData(), mitk::GenerateTimeInInputRegion(), mitk::SliceNavigationController::SetGeometryTime(), mitk::PointSet::SetSelectInfo(), mitk::SurfaceToImageFilter::Stencil3DImage(), and mitk::SurfaceStampImageFilter::SurfaceStamp().

◆ Update()

◆ UpdateBoundingBox()

void mitk::TimeGeometry::UpdateBoundingBox ( )

Updates the bounding box to cover the area used in all time steps.

The bounding box is updated by this method. The new bounding box covers an area which includes all bounding boxes during all times steps.

Definition at line 115 of file mitkTimeGeometry.cpp.

References CountTimeSteps(), GetGeometryForTimeStep(), and m_BoundingBox.

Referenced by Update().

◆ UpdateWithoutBoundingBox()

virtual void mitk::TimeGeometry::UpdateWithoutBoundingBox ( )
inlinevirtual

Updates everything except the Bounding box.

This class should be overwritten by child classes. The method is called when Update() is required.

Definition at line 289 of file mitkTimeGeometry.h.

References mitk::eps, mitk::Equal(), MITKCORE_EXPORT, and verbose().

Referenced by Update().

Member Data Documentation

◆ m_BoundingBox

BoundingBox::Pointer mitk::TimeGeometry::m_BoundingBox
protected

Contains a bounding box which includes all time steps.

Definition at line 52 of file mitkTimeGeometry.h.

Referenced by GetCenterInWorld(), GetCornerPointInWorld(), GetExtentInWorld(), InternalClone(), IsWorldPointInside(), TimeGeometry(), and UpdateBoundingBox().


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