Medical Imaging Interaction Toolkit  2018.4.99-1640525a
Medical Imaging Interaction Toolkit
mitk::ProportionalTimeGeometry Class Reference

#include <mitkProportionalTimeGeometry.h>

Inheritance diagram for mitk::ProportionalTimeGeometry:
Collaboration diagram for mitk::ProportionalTimeGeometry:

Public Types

typedef ProportionalTimeGeometry Self
 
typedef TimeGeometry Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef ProportionalTimeGeometry self
 
- Public Types inherited from mitk::TimeGeometry
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 override
 
virtual const char * GetClassName () const
 
 ProportionalTimeGeometry ()
 
Pointer Clone () const
 
TimeStepType CountTimeSteps () const override
 Returns the number of time steps. More...
 
TimePointType GetMinimumTimePoint () const override
 Returns the first time point for which the object is valid. More...
 
TimePointType GetMaximumTimePoint () const override
 Returns the last time point for which the object is valid. More...
 
TimePointType GetMinimumTimePoint (TimeStepType step) const override
 Returns the first time point for which the object is valid. More...
 
TimePointType GetMaximumTimePoint (TimeStepType step) const override
 Returns the last time point for which the object is valid. More...
 
TimeBounds GetTimeBounds () const override
 Get the time bounds (in ms) More...
 
TimeBounds GetTimeBounds (TimeStepType step) const override
 Get the time bounds for the given TimeStep (in ms) More...
 
bool IsValidTimePoint (TimePointType timePoint) const override
 Tests if a given time point is covered by this object. More...
 
bool IsValidTimeStep (TimeStepType timeStep) const override
 Test for the given time step if a geometry is availible. More...
 
TimePointType TimeStepToTimePoint (TimeStepType timeStep) const override
 Converts a time step to a time point. More...
 
TimeStepType TimePointToTimeStep (TimePointType timePoint) const override
 Converts a time point to the corresponding time step. More...
 
BaseGeometry::Pointer GetGeometryCloneForTimeStep (TimeStepType timeStep) const override
 Returns the geometry which corresponds to the given time step. More...
 
BaseGeometry::Pointer GetGeometryForTimePoint (TimePointType timePoint) const override
 Returns the geometry which corresponds to the given time point. More...
 
BaseGeometry::Pointer GetGeometryForTimeStep (TimeStepType timeStep) const override
 Returns the geometry which corresponds to the given time step. More...
 
bool IsValid () const override
 Tests if all necessary informations are set and the object is valid. More...
 
void Initialize () override
 Initilizes a new object with one time steps which contains an empty geometry. More...
 
void Expand (TimeStepType size) override
 Expands the time geometry to the given number of time steps. More...
 
void SetTimeStepGeometry (BaseGeometry *geometry, TimeStepType timeStep) override
 Sets the geometry for the given time step. More...
 
void ReplaceTimeStepGeometries (const BaseGeometry *geometry) override
 Replaces the geometry instances with clones of the passed geometry. More...
 
itk::LightObject::Pointer InternalClone () const override
 Makes a deep copy of the current object. More...
 
virtual TimePointType GetFirstTimePoint () const
 
virtual void SetFirstTimePoint (TimePointType _arg)
 
virtual TimePointType GetStepDuration () const
 
virtual void SetStepDuration (TimePointType _arg)
 
void ClearAllGeometries ()
 
void ReserveSpaceForGeometries (TimeStepType numberOfGeometries)
 
void Initialize (const BaseGeometry *geometry, TimeStepType timeSteps)
 Initializes the TimeGeometry with equally time Step geometries. More...
 
void Initialize (TimeStepType timeSteps)
 Initialize the TimeGeometry with empty BaseGeometry. More...
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
- Public Member Functions inherited from mitk::TimeGeometry
Pointer Clone () const
 
 itkCreateAnotherMacro (Self)
 
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...
 
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 ()
 
static Pointer New ()
 
- Static Public Member Functions inherited from mitk::TimeGeometry
static const char * GetStaticNameOfClass ()
 

Protected Member Functions

 ~ProportionalTimeGeometry () override
 
- Protected Member Functions inherited from mitk::TimeGeometry
 TimeGeometry ()
 
 ~TimeGeometry () override
 
LightObject::Pointer InternalClone () const override
 Makes a deep copy of the current object. More...
 

Protected Attributes

std::vector< BaseGeometry::Pointerm_GeometryVector
 
TimePointType m_FirstTimePoint
 
TimePointType m_StepDuration
 
- Protected Attributes inherited from mitk::TimeGeometry
BoundingBox::Pointer m_BoundingBox
 Contains a bounding box which includes all time steps. More...
 

Detailed Description

Definition at line 38 of file mitkProportionalTimeGeometry.h.

Member Typedef Documentation

◆ ConstPointer

◆ Pointer

◆ Self

◆ self

◆ Superclass

Constructor & Destructor Documentation

◆ ProportionalTimeGeometry()

mitk::ProportionalTimeGeometry::ProportionalTimeGeometry ( )

Definition at line 15 of file mitkProportionalTimeGeometry.cpp.

◆ ~ProportionalTimeGeometry()

mitk::ProportionalTimeGeometry::~ProportionalTimeGeometry ( )
overrideprotected

Definition at line 19 of file mitkProportionalTimeGeometry.cpp.

Member Function Documentation

◆ ClearAllGeometries()

void mitk::ProportionalTimeGeometry::ClearAllGeometries ( )

Definition at line 159 of file mitkProportionalTimeGeometry.cpp.

References m_GeometryVector.

◆ Clone()

Pointer mitk::ProportionalTimeGeometry::Clone ( ) const

◆ CountTimeSteps()

mitk::TimeStepType mitk::ProportionalTimeGeometry::CountTimeSteps ( ) const
overridevirtual

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.

Implements mitk::TimeGeometry.

Definition at line 30 of file mitkProportionalTimeGeometry.cpp.

References m_GeometryVector.

Referenced by GetMaximumTimePoint(), InternalClone(), IsValidTimeStep(), PrintSelf(), ReplaceTimeStepGeometries(), and mitk::ProportionalTimeGeometryToXML::ToXML().

◆ Expand()

void mitk::ProportionalTimeGeometry::Expand ( mitk::TimeStepType  size)
overridevirtual

Expands the time geometry to the given number of time steps.

Initializes the new time steps with empty geometries if no timesteps in the geometry so far. Otherwise fills the new times steps with clones of the first time step. Shrinking is not supported.

Implements mitk::TimeGeometry.

Definition at line 169 of file mitkProportionalTimeGeometry.cpp.

References clone(), m_GeometryVector, and mitk::Geometry3D::New().

Referenced by Valid_ImageExpandedByTimestep_ReturnsTrue().

◆ GetClassHierarchy()

virtual std::vector<std::string> mitk::ProportionalTimeGeometry::GetClassHierarchy ( ) const
inlineoverridevirtual

Reimplemented from mitk::TimeGeometry.

Definition at line 41 of file mitkProportionalTimeGeometry.h.

◆ GetClassName()

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

Reimplemented from mitk::TimeGeometry.

◆ GetFirstTimePoint()

virtual TimePointType mitk::ProportionalTimeGeometry::GetFirstTimePoint ( ) const
virtual

◆ GetGeometryCloneForTimeStep()

mitk::BaseGeometry::Pointer mitk::ProportionalTimeGeometry::GetGeometryCloneForTimeStep ( TimeStepType  timeStep) const
overridevirtual

Returns the geometry which corresponds to the given time step.

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

Implements mitk::TimeGeometry.

Definition at line 144 of file mitkProportionalTimeGeometry.cpp.

References m_GeometryVector.

◆ GetGeometryForTimePoint()

mitk::BaseGeometry::Pointer mitk::ProportionalTimeGeometry::GetGeometryForTimePoint ( TimePointType  timePoint) const
overridevirtual

Returns the geometry which corresponds to the given time point.

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

If the returned geometry is changed this will affect the saved geometry.

Implements mitk::TimeGeometry.

Definition at line 131 of file mitkProportionalTimeGeometry.cpp.

References GetGeometryForTimeStep(), IsValidTimePoint(), and TimePointToTimeStep().

◆ GetGeometryForTimeStep()

mitk::BaseGeometry::Pointer mitk::ProportionalTimeGeometry::GetGeometryForTimeStep ( TimeStepType  timeStep) const
overridevirtual

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.

If the returned geometry is changed this will affect the saved geometry.

Implements mitk::TimeGeometry.

Definition at line 119 of file mitkProportionalTimeGeometry.cpp.

References IsValidTimeStep(), and m_GeometryVector.

Referenced by GetGeometryForTimePoint(), InternalClone(), PrintSelf(), and mitk::ProportionalTimeGeometryToXML::ToXML().

◆ GetMaximumTimePoint() [1/2]

mitk::TimePointType mitk::ProportionalTimeGeometry::GetMaximumTimePoint ( ) const
overridevirtual

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.

Implements mitk::TimeGeometry.

Definition at line 40 of file mitkProportionalTimeGeometry.cpp.

References CountTimeSteps(), m_FirstTimePoint, m_StepDuration, and max().

Referenced by GetTimeBounds(), and IsValidTimePoint().

◆ GetMaximumTimePoint() [2/2]

mitk::TimePointType mitk::ProportionalTimeGeometry::GetMaximumTimePoint ( TimeStepType  step) const
overridevirtual

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.

Implements mitk::TimeGeometry.

Definition at line 72 of file mitkProportionalTimeGeometry.cpp.

References m_FirstTimePoint, and m_StepDuration.

◆ GetMinimumTimePoint() [1/2]

mitk::TimePointType mitk::ProportionalTimeGeometry::GetMinimumTimePoint ( ) const
overridevirtual

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.

Implements mitk::TimeGeometry.

Definition at line 35 of file mitkProportionalTimeGeometry.cpp.

References m_FirstTimePoint.

Referenced by GetTimeBounds(), and IsValidTimePoint().

◆ GetMinimumTimePoint() [2/2]

mitk::TimePointType mitk::ProportionalTimeGeometry::GetMinimumTimePoint ( TimeStepType  step) const
overridevirtual

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.

Implements mitk::TimeGeometry.

Definition at line 56 of file mitkProportionalTimeGeometry.cpp.

References m_FirstTimePoint, m_StepDuration, and max().

◆ GetStaticNameOfClass()

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

◆ GetStepDuration()

virtual TimePointType mitk::ProportionalTimeGeometry::GetStepDuration ( ) const
virtual

◆ GetTimeBounds() [1/2]

mitk::TimeBounds mitk::ProportionalTimeGeometry::GetTimeBounds ( ) const
overridevirtual

Get the time bounds (in ms)

Implements mitk::TimeGeometry.

Definition at line 48 of file mitkProportionalTimeGeometry.cpp.

References GetMaximumTimePoint(), and GetMinimumTimePoint().

Referenced by PrintSelf().

◆ GetTimeBounds() [2/2]

mitk::TimeBounds mitk::ProportionalTimeGeometry::GetTimeBounds ( TimeStepType  step) const
overridevirtual

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

Implements mitk::TimeGeometry.

Definition at line 80 of file mitkProportionalTimeGeometry.cpp.

References GetMaximumTimePoint(), and GetMinimumTimePoint().

◆ Initialize() [1/3]

void mitk::ProportionalTimeGeometry::Initialize ( )
overridevirtual

Initilizes a new object with one time steps which contains an empty geometry.

Reimplemented from mitk::TimeGeometry.

Definition at line 23 of file mitkProportionalTimeGeometry.cpp.

References m_FirstTimePoint, m_GeometryVector, and m_StepDuration.

Referenced by mitk::AutoCropImageFilter::GenerateOutputInformation(), and Initialize().

◆ Initialize() [2/3]

void mitk::ProportionalTimeGeometry::Initialize ( const BaseGeometry geometry,
TimeStepType  timeSteps 
)

Initializes the TimeGeometry with equally time Step geometries.

Saves a copy for each time step.

Definition at line 226 of file mitkProportionalTimeGeometry.cpp.

References mitk::BaseGeometry::Clone(), m_FirstTimePoint, m_StepDuration, max(), MITK_INFO, ReserveSpaceForGeometries(), SetTimeStepGeometry(), and mitk::TimeGeometry::Update().

◆ Initialize() [3/3]

void mitk::ProportionalTimeGeometry::Initialize ( TimeStepType  timeSteps)

Initialize the TimeGeometry with empty BaseGeometry.

Definition at line 253 of file mitkProportionalTimeGeometry.cpp.

References Initialize(), and mitk::Geometry3D::New().

◆ InternalClone()

itk::LightObject::Pointer mitk::ProportionalTimeGeometry::InternalClone ( ) const
override

Makes a deep copy of the current object.

Definition at line 200 of file mitkProportionalTimeGeometry.cpp.

References CountTimeSteps(), GetGeometryForTimeStep(), mitk::TimeGeometry::InternalClone(), m_FirstTimePoint, and m_StepDuration.

◆ IsValid()

bool mitk::ProportionalTimeGeometry::IsValid ( ) const
overridevirtual

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

Implements mitk::TimeGeometry.

Definition at line 151 of file mitkProportionalTimeGeometry.cpp.

References m_GeometryVector, and m_StepDuration.

◆ IsValidTimePoint()

bool mitk::ProportionalTimeGeometry::IsValidTimePoint ( TimePointType  timePoint) const
overridevirtual

Tests if a given time point is covered by this object.

Returns true if a geometry can be returned for the given time point and falls if not. The time point must be given in ms.

Implements mitk::TimeGeometry.

Definition at line 88 of file mitkProportionalTimeGeometry.cpp.

References GetMaximumTimePoint(), and GetMinimumTimePoint().

Referenced by GetGeometryForTimePoint().

◆ IsValidTimeStep()

bool mitk::ProportionalTimeGeometry::IsValidTimeStep ( TimeStepType  timeStep) const
overridevirtual

Test for the given time step if a geometry is availible.

Returns true if a geometry is defined for the given time step. Otherwise false is returned. The time step is defined as positiv number.

Implements mitk::TimeGeometry.

Definition at line 93 of file mitkProportionalTimeGeometry.cpp.

References CountTimeSteps().

Referenced by GetGeometryForTimeStep().

◆ New()

◆ PrintSelf()

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

◆ ReplaceTimeStepGeometries()

void mitk::ProportionalTimeGeometry::ReplaceTimeStepGeometries ( const BaseGeometry geometry)
overridevirtual

Replaces the geometry instances with clones of the passed geometry.

Replaces the geometries of all time steps with clones of the passed geometry. Replacement 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".

Implements mitk::TimeGeometry.

Definition at line 217 of file mitkProportionalTimeGeometry.cpp.

References mitk::BaseGeometry::Clone(), CountTimeSteps(), and SetTimeStepGeometry().

◆ ReserveSpaceForGeometries()

void mitk::ProportionalTimeGeometry::ReserveSpaceForGeometries ( TimeStepType  numberOfGeometries)

Definition at line 164 of file mitkProportionalTimeGeometry.cpp.

References m_GeometryVector.

Referenced by Initialize().

◆ SetFirstTimePoint()

virtual void mitk::ProportionalTimeGeometry::SetFirstTimePoint ( TimePointType  _arg)
virtual

◆ SetStepDuration()

virtual void mitk::ProportionalTimeGeometry::SetStepDuration ( TimePointType  _arg)
virtual

◆ SetTimeStepGeometry()

void mitk::ProportionalTimeGeometry::SetTimeStepGeometry ( BaseGeometry geometry,
TimeStepType  timeStep 
)
overridevirtual

Sets the geometry for the given time step.

This method does not afflict other time steps, since the geometry for each time step is saved individually.

Implements mitk::TimeGeometry.

Definition at line 190 of file mitkProportionalTimeGeometry.cpp.

References m_GeometryVector.

Referenced by Initialize(), and ReplaceTimeStepGeometries().

◆ TimePointToTimeStep()

mitk::TimeStepType mitk::ProportionalTimeGeometry::TimePointToTimeStep ( TimePointType  timePoint) const
overridevirtual

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.

Implements mitk::TimeGeometry.

Definition at line 111 of file mitkProportionalTimeGeometry.cpp.

References m_FirstTimePoint, and m_StepDuration.

Referenced by GetGeometryForTimePoint().

◆ TimeStepToTimePoint()

mitk::TimePointType mitk::ProportionalTimeGeometry::TimeStepToTimePoint ( TimeStepType  timeStep) const
overridevirtual

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.

Implements mitk::TimeGeometry.

Definition at line 98 of file mitkProportionalTimeGeometry.cpp.

References m_FirstTimePoint, m_StepDuration, max(), and min().

Member Data Documentation

◆ m_FirstTimePoint

TimePointType mitk::ProportionalTimeGeometry::m_FirstTimePoint
protected

◆ m_GeometryVector

◆ m_StepDuration

TimePointType mitk::ProportionalTimeGeometry::m_StepDuration
protected

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