13 #ifndef mitkTimeGeometry_h
14 #define mitkTimeGeometry_h
17 #include <itkObject.h>
279 BoundingBox::BoundsArrayType
GetBoundsInWorld()
const {
return m_BoundingBox->GetBounds(); }
323 void PrintSelf(std::ostream &os, itk::Indent indent)
const override;
Abstract base class describing the geometry of a data object.
abstract class, that can be used by Undo to undo an operation.
Base class for all operations in the undo/redo framework.
TimeGeometry(const TimeGeometry &other)
virtual TimeStepType TimePointToTimeStep(TimePointType timePoint) const =0
Converts a time point to the corresponding time step.
virtual BaseGeometry::Pointer GetGeometryForTimeStep(TimeStepType timeStep) const =0
Returns the geometry which corresponds to the given time step.
virtual bool IsValidTimePoint(TimePointType timePoint) const =0
Tests if a given time point is covered by this object.
virtual TimeBounds GetTimeBounds() const =0
Get the time bounds (in ms)
Point3D GetCornerPointInWorld(bool xFront=true, bool yFront=true, bool zFront=true) const
Get the position of a corner (in world coordinates)
itkCreateAnotherMacro(Self)
virtual bool IsValid() const =0
Tests if all necessary information are set and the object is valid.
virtual TimePointType GetMinimumTimePoint(TimeStepType step) const =0
Returns the first time point for which the object is valid.
virtual TimeBounds GetTimeBounds(TimeStepType step) const =0
Get the time bounds for the given TimeStep (in ms)
virtual TimePointType GetMaximumTimePoint(TimeStepType step) const =0
Returns the last time point for which the object is valid.
void ExecuteOperation(Operation *op) override
Execute the given operation on all time steps.
virtual void UpdateWithoutBoundingBox()
Hook for subclass-specific updates that do not involve the bounding box.
bool IsWorldPointInside(const mitk::Point3D &p) const
Test whether the point p (world coordinates in mm) is inside the bounding box.
virtual TimePointType GetMinimumTimePoint() const =0
Returns the first time point for which the object is valid.
double GetDiagonalLength2InWorld() const
Get the squared length of the diagonal of the bounding-box in mm.
mitkClassMacroItkParent(TimeGeometry, itk::Object)
BoundingBox * GetBoundingBoxInWorld() const
Get the bounding box that covers all time steps.
virtual void Initialize()
Initialize the TimeGeometry to its default state.
virtual TimeStepType CountTimeSteps() const =0
Returns the number of time steps.
void PrintSelf(std::ostream &os, itk::Indent indent) const override
Point3D GetCornerPointInWorld(int id) const
Get the position of the corner number id (in world coordinates)
Point3D GetCenterInWorld() const
Get the center of the bounding-box in mm.
void Update()
Update the geometry (bounding box and subclass-specific data).
void UpdateBoundingBox()
Recompute the bounding box to cover all time steps.
virtual TimePointType GetMaximumTimePoint() const =0
Returns the last time point for which the object is valid.
double GetDiagonalLengthInWorld() const
Get the length of the diagonal of the bounding-box in mm.
BoundingBox::Pointer m_BoundingBox
Contains a bounding box which includes all time steps.
virtual TimePointType TimeStepToTimePoint(TimeStepType timeStep) const =0
Converts a time step to a time point.
ScalarType GetExtentInWorld(unsigned int direction) const
Get the extent of the aggregate bounding box in the given direction.
virtual void SetTimeStepGeometry(BaseGeometry *geometry, TimeStepType timeStep)=0
Sets the geometry for a given time step.
virtual BaseGeometry::Pointer GetGeometryCloneForTimeStep(TimeStepType timeStep) const =0
Returns a clone of the geometry of a specific time point.
virtual bool IsValidTimeStep(TimeStepType timeStep) const =0
Test for the given time step if a geometry is available.
virtual void ReplaceTimeStepGeometries(const BaseGeometry *geometry)=0
Replaces the geometry instances with clones ot the passed geometry.
virtual BaseGeometry::Pointer GetGeometryForTimePoint(TimePointType timePoint) const =0
Returns the geometry of a specific time point.
virtual void Expand(TimeStepType size)=0
Expands to the given number of time steps.
BoundingBox::BoundsArrayType GetBoundsInWorld() const
Get the bounds array of the aggregate bounding box.
Find image slices visible on a given plane.
MITKCORE_EXPORT const ScalarType eps
Epsilon value for floating point comparison (vnl_math::eps * 100).
static const TimeStepType TIMESTEP_INVALID
Sentinel value representing an invalid time step.
itk::BoundingBox< unsigned long, 3, ScalarType > BoundingBox
Standard 3D bounding box type.
std::size_t TimeStepType
Type for time step indices (non-negative integers starting from 0).
itk::FixedArray< ScalarType, 2 > TimeBounds
Fixed-size array holding a pair of time bound values [min, max] in milliseconds.
mitk::ScalarType TimePointType
Type for time point values in milliseconds (ms).
double ScalarType
Scalar type used throughout MITK for geometric computations.
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.