Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::ArbitraryTimeGeometry Class Reference

#include <mitkArbitraryTimeGeometry.h>

Inheritance diagram for mitk::ArbitraryTimeGeometry:
Collaboration diagram for mitk::ArbitraryTimeGeometry:

Public Types

typedef ArbitraryTimeGeometry Self
 
typedef TimeGeometry Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef ArbitraryTimeGeometry 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
 
 ArbitraryTimeGeometry ()
 
Pointer Clone () const
 
virtual TimeStepType CountTimeSteps () const
 Returns the number of time steps. More...
 
virtual TimePointType GetMinimumTimePoint () const
 Returns the first time point for which the time geometry instance is valid. More...
 
virtual TimePointType GetMaximumTimePoint () const
 Returns the last time point for which the time geometry instance is valid. More...
 
virtual TimePointType GetMinimumTimePoint (TimeStepType step) const
 Returns the first time point for which the time geometry instance is valid. More...
 
virtual TimePointType GetMaximumTimePoint (TimeStepType step) const
 Returns the last time point for which the time geometry instance is valid. More...
 
virtual TimeBounds GetTimeBounds () const
 Get the time bounds (in ms) it returns GetMinimumTimePoint() and GetMaximumTimePoint() results as bounds. More...
 
virtual TimeBounds GetTimeBounds (TimeStepType step) const
 Get the time bounds for the given TimeStep (in ms) More...
 
virtual bool IsValidTimePoint (TimePointType timePoint) const
 Tests if a given time point is covered by this time geometry instance. More...
 
virtual bool IsValidTimeStep (TimeStepType timeStep) const
 Test for the given time step if a geometry is availible. More...
 
virtual TimePointType TimeStepToTimePoint (TimeStepType timeStep) const
 Converts a time step to a time point. More...
 
virtual TimeStepType TimePointToTimeStep (TimePointType timePoint) const
 Converts a time point to the corresponding time step. More...
 
virtual BaseGeometry::Pointer GetGeometryCloneForTimeStep (TimeStepType timeStep) const
 Returns the geometry which corresponds to the given time step. More...
 
virtual BaseGeometry::Pointer GetGeometryForTimePoint (TimePointType timePoint) const
 Returns the geometry which corresponds to the given time point. More...
 
virtual BaseGeometry::Pointer GetGeometryForTimeStep (TimeStepType timeStep) const
 Returns the geometry which corresponds to the given time step. More...
 
virtual bool IsValid () const
 Tests if all necessary informations are set and the object is valid. More...
 
virtual void Initialize ()
 Initializes a new object with one time steps which contains an empty geometry. More...
 
virtual void Expand (TimeStepType size)
 Expands the time geometry to the given number of time steps. More...
 
virtual void ReplaceTimeStepGeometries (const BaseGeometry *geometry)
 Replaces the geometry instances with clones of the passed geometry. More...
 
virtual void SetTimeStepGeometry (BaseGeometry *geometry, TimeStepType timeStep)
 Sets the geometry for the given time step. More...
 
virtual itk::LightObject::Pointer InternalClone () const
 Makes a deep copy of the current object. More...
 
void ClearAllGeometries ()
 
void AppendTimeStep (BaseGeometry *geometry, TimePointType maximumTimePoint, TimePointType minimumTimePoint=0)
 
void AppendTimeStepClone (const BaseGeometry *geometry, TimePointType maximumTimePoint, TimePointType minimumTimePoint=0)
 
void ReserveSpaceForGeometries (TimeStepType numberOfGeometries)
 
virtual void PrintSelf (std::ostream &os, itk::Indent indent) const
 
- Public Member Functions inherited from mitk::TimeGeometry
Pointer Clone () const
 
 itkCreateAnotherMacro (Self) virtual TimeStepType CountTimeSteps() const =0
 Returns the number of time steps. 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...
 
void Update ()
 Updates the geometry. More...
 
virtual void UpdateWithoutBoundingBox ()
 Updates everything except the Bounding box. More...
 
virtual void ExecuteOperation (Operation *op) override
 Executes the given operation on all time steps. More...
 
- 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

virtual ~ArbitraryTimeGeometry ()
 
- Protected Member Functions inherited from mitk::TimeGeometry
 TimeGeometry ()
 
virtual ~TimeGeometry ()
 

Protected Attributes

std::vector< BaseGeometry::Pointerm_GeometryVector
 
std::vector< TimePointTypem_MaximumTimePoints
 
TimePointType m_MinimumTimePoint
 
- 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 48 of file mitkArbitraryTimeGeometry.h.

Member Typedef Documentation

Constructor & Destructor Documentation

mitk::ArbitraryTimeGeometry::ArbitraryTimeGeometry ( )

Definition at line 23 of file mitkArbitraryTimeGeometry.cpp.

mitk::ArbitraryTimeGeometry::~ArbitraryTimeGeometry ( )
protectedvirtual

Definition at line 27 of file mitkArbitraryTimeGeometry.cpp.

Member Function Documentation

void mitk::ArbitraryTimeGeometry::AppendTimeStep ( BaseGeometry geometry,
TimePointType  maximumTimePoint,
TimePointType  minimumTimePoint = 0 
)

Append the passed geometry to the time geometry.

Remarks
if it is not the first time step the passed minimum time point is ignored, so the existing time "grid" stays untouched.
Precondition
The passed geometry pointer must be valid.
The maximumTimePoint must be larger then the maximum time point of the currently last time step.

Definition at line 244 of file mitkArbitraryTimeGeometry.cpp.

References mitkThrow.

void mitk::ArbitraryTimeGeometry::AppendTimeStepClone ( const BaseGeometry geometry,
TimePointType  maximumTimePoint,
TimePointType  minimumTimePoint = 0 
)

Same than AppendTimeStep. But clones geometry before adding it.

Definition at line 269 of file mitkArbitraryTimeGeometry.cpp.

References clone(), and mitk::BaseGeometry::Clone().

void mitk::ArbitraryTimeGeometry::ClearAllGeometries ( )

Definition at line 179 of file mitkArbitraryTimeGeometry.cpp.

Pointer mitk::ArbitraryTimeGeometry::Clone ( ) const
mitk::TimeStepType mitk::ArbitraryTimeGeometry::CountTimeSteps ( ) const
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.

Definition at line 38 of file mitkArbitraryTimeGeometry.cpp.

Referenced by mitk::ItkImageIO::Write().

void mitk::ArbitraryTimeGeometry::Expand ( mitk::TimeStepType  size)
virtual

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

Initializes the new time steps with empty geometries. This default geometries will behave like ProportionalTimeGeometry. Shrinking is not supported. The new steps will have the same duration like the last step before extension.

Implements mitk::TimeGeometry.

Definition at line 192 of file mitkArbitraryTimeGeometry.cpp.

References mitk::Geometry3D::New().

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

Reimplemented from mitk::TimeGeometry.

Definition at line 51 of file mitkArbitraryTimeGeometry.h.

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

Reimplemented from mitk::TimeGeometry.

mitk::BaseGeometry::Pointer mitk::ArbitraryTimeGeometry::GetGeometryCloneForTimeStep ( TimeStepType  timeStep) const
virtual

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 165 of file mitkArbitraryTimeGeometry.cpp.

mitk::BaseGeometry::Pointer mitk::ArbitraryTimeGeometry::GetGeometryForTimePoint ( TimePointType  timePoint) const
virtual

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 152 of file mitkArbitraryTimeGeometry.cpp.

mitk::BaseGeometry::Pointer mitk::ArbitraryTimeGeometry::GetGeometryForTimeStep ( TimeStepType  timeStep) const
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.

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

Implements mitk::TimeGeometry.

Definition at line 140 of file mitkArbitraryTimeGeometry.cpp.

mitk::TimePointType mitk::ArbitraryTimeGeometry::GetMaximumTimePoint ( ) const
virtual

Returns the last time point for which the time geometry instance is valid.

Gives the last time point for which a valid geometry is saved in this time geometry. It is the upper time bound of the last step. The time point is given in ms.

Implements mitk::TimeGeometry.

Definition at line 48 of file mitkArbitraryTimeGeometry.cpp.

mitk::TimePointType mitk::ArbitraryTimeGeometry::GetMaximumTimePoint ( TimeStepType  step) const
virtual

Returns the last time point for which the time geometry instance 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 68 of file mitkArbitraryTimeGeometry.cpp.

mitk::TimePointType mitk::ArbitraryTimeGeometry::GetMinimumTimePoint ( ) const
virtual

Returns the first time point for which the time geometry instance is valid.

Returns the first valid time point for this geometry. It is the lower time bound of the first step. The time point is given in ms.

Implements mitk::TimeGeometry.

Definition at line 43 of file mitkArbitraryTimeGeometry.cpp.

mitk::TimePointType mitk::ArbitraryTimeGeometry::GetMinimumTimePoint ( TimeStepType  step) const
virtual

Returns the first time point for which the time geometry instance 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 58 of file mitkArbitraryTimeGeometry.cpp.

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

Definition at line 51 of file mitkArbitraryTimeGeometry.h.

Referenced by mitk::ItkImageIO::Read(), and mitk::ItkImageIO::Write().

mitk::TimeBounds mitk::ArbitraryTimeGeometry::GetTimeBounds ( ) const
virtual

Get the time bounds (in ms) it returns GetMinimumTimePoint() and GetMaximumTimePoint() results as bounds.

Implements mitk::TimeGeometry.

Definition at line 78 of file mitkArbitraryTimeGeometry.cpp.

Referenced by mitk::ItkImageIO::Write().

mitk::TimeBounds mitk::ArbitraryTimeGeometry::GetTimeBounds ( TimeStepType  step) const
virtual

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

Implements mitk::TimeGeometry.

Definition at line 86 of file mitkArbitraryTimeGeometry.cpp.

void mitk::ArbitraryTimeGeometry::Initialize ( )
virtual

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

Reimplemented from mitk::TimeGeometry.

Definition at line 31 of file mitkArbitraryTimeGeometry.cpp.

References mitk::Geometry3D::New().

itk::LightObject::Pointer mitk::ArbitraryTimeGeometry::InternalClone ( ) const
virtual

Makes a deep copy of the current object.

Reimplemented from mitk::TimeGeometry.

Definition at line 230 of file mitkArbitraryTimeGeometry.cpp.

References mitk::Clone().

bool mitk::ArbitraryTimeGeometry::IsValid ( ) const
virtual

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

Implements mitk::TimeGeometry.

Definition at line 172 of file mitkArbitraryTimeGeometry.cpp.

bool mitk::ArbitraryTimeGeometry::IsValidTimePoint ( TimePointType  timePoint) const
virtual

Tests if a given time point is covered by this time geometry instance.

Returns true if a geometry can be returned for the given time point (so it is within GetTimeBounds() and fails if not. The time point must be given in ms.

Implements mitk::TimeGeometry.

Definition at line 94 of file mitkArbitraryTimeGeometry.cpp.

bool mitk::ArbitraryTimeGeometry::IsValidTimeStep ( TimeStepType  timeStep) const
virtual

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 99 of file mitkArbitraryTimeGeometry.cpp.

static Pointer mitk::ArbitraryTimeGeometry::New ( )
static

Referenced by mitk::ItkImageIO::Read().

void mitk::ArbitraryTimeGeometry::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
virtual

Reimplemented from mitk::TimeGeometry.

Definition at line 278 of file mitkArbitraryTimeGeometry.cpp.

void mitk::ArbitraryTimeGeometry::ReplaceTimeStepGeometries ( const BaseGeometry geometry)
virtual

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 209 of file mitkArbitraryTimeGeometry.cpp.

References mitk::BaseGeometry::Clone().

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

Definition at line 186 of file mitkArbitraryTimeGeometry.cpp.

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

Sets the geometry for the given time step.

If passed time step is not valid. Nothing will be changed.

Precondition
geometry must point to a valid instance.

Implements mitk::TimeGeometry.

Definition at line 218 of file mitkArbitraryTimeGeometry.cpp.

mitk::TimeStepType mitk::ArbitraryTimeGeometry::TimePointToTimeStep ( TimePointType  timePoint) const
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. The associated time step is the last step which lower time bound is smaller or equal then the time point. If a negative invalid time point is given always time step 0 is returned. If an positive invalid time step is given an invalid time step will be returned.

Implements mitk::TimeGeometry.

Definition at line 120 of file mitkArbitraryTimeGeometry.cpp.

mitk::TimePointType mitk::ArbitraryTimeGeometry::TimeStepToTimePoint ( TimeStepType  timeStep) const
virtual

Converts a time step to a time point.

Converts a time step to a time point by using the time steps lower time bound. 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 104 of file mitkArbitraryTimeGeometry.cpp.

Member Data Documentation

std::vector<BaseGeometry::Pointer> mitk::ArbitraryTimeGeometry::m_GeometryVector
protected

Definition at line 239 of file mitkArbitraryTimeGeometry.h.

std::vector<TimePointType> mitk::ArbitraryTimeGeometry::m_MaximumTimePoints
protected

Definition at line 240 of file mitkArbitraryTimeGeometry.h.

TimePointType mitk::ArbitraryTimeGeometry::m_MinimumTimePoint
protected

Definition at line 241 of file mitkArbitraryTimeGeometry.h.


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