Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkProportionalTimeGeometry.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkProportionalTimeGeometry_h
14 #define mitkProportionalTimeGeometry_h
15 
16 // MITK
17 #include <MitkCoreExports.h>
18 #include <mitkCommon.h>
19 #include <mitkGeometry3D.h>
20 #include <mitkTimeGeometry.h>
21 
22 namespace mitk
23 {
39  {
40  public:
42 
45  itkFactorylessNewMacro(Self);
46  itkCloneMacro(Self);
47 
56  TimeStepType CountTimeSteps() const override;
72 
86 
90  TimeBounds GetTimeBounds() const override;
91 
95  TimeBounds GetTimeBounds(TimeStepType step) const override;
96 
103  bool IsValidTimePoint(TimePointType timePoint) const override;
111  bool IsValidTimeStep(TimeStepType timeStep) const override;
131  TimeStepType TimePointToTimeStep(TimePointType timePoint) const override;
138  BaseGeometry::Pointer GetGeometryCloneForTimeStep(TimeStepType timeStep) const override;
139 
149  BaseGeometry::Pointer GetGeometryForTimePoint(TimePointType timePoint) const override;
159  BaseGeometry::Pointer GetGeometryForTimeStep(TimeStepType timeStep) const override;
160 
164  bool IsValid() const override;
165 
169  void Initialize() override;
170 
179  void Expand(TimeStepType size) override;
186  void SetTimeStepGeometry(BaseGeometry *geometry, TimeStepType timeStep) override;
187 
198  void ReplaceTimeStepGeometries(const BaseGeometry *geometry) override;
199 
204  itkGetConstMacro(FirstTimePoint, TimePointType);
205 
210  itkSetMacro(FirstTimePoint, TimePointType);
211 
216  itkGetConstMacro(StepDuration, TimePointType);
217 
222  itkSetMacro(StepDuration, TimePointType);
223 
228 
236  void ReserveSpaceForGeometries(TimeStepType numberOfGeometries);
237 
249  void Initialize(const BaseGeometry *geometry, TimeStepType timeSteps);
250 
259  void Initialize(TimeStepType timeSteps);
260 
261  void PrintSelf(std::ostream &os, itk::Indent indent) const override;
262 
263  protected:
266 
267  std::vector<BaseGeometry::Pointer> m_GeometryVector;
270 
272  }; // end class ProportialTimeGeometry
273 
293  const mitk::ProportionalTimeGeometry &rightHandSide,
294  ScalarType eps,
295  bool verbose);
296 
297 } // end namespace MITK
298 #endif
#define MITKCORE_EXPORT
Abstract base class describing the geometry of a data object.
BaseGeometry::Pointer GetGeometryCloneForTimeStep(TimeStepType timeStep) const override
Returns the geometry which corresponds to the given time step.
TimePointType TimeStepToTimePoint(TimeStepType timeStep) const override
Converts a time step to a time point.
void Initialize(TimeStepType timeSteps)
Initialize with empty Geometry3D instances for each time step.
mitkClassMacro(ProportionalTimeGeometry, TimeGeometry)
bool IsValidTimeStep(TimeStepType timeStep) const override
Test for the given time step if a geometry is available.
TimePointType GetMinimumTimePoint() const override
Returns the first time point for which the object is valid.
TimeBounds GetTimeBounds(TimeStepType step) const override
Get the time bounds for the given TimeStep (in ms)
bool IsValidTimePoint(TimePointType timePoint) const override
Tests if a given time point is covered by this object.
void ReplaceTimeStepGeometries(const BaseGeometry *geometry) override
Replaces the geometry instances with clones of the passed geometry.
void Initialize() override
Initializes a new object with one time steps which contains an empty geometry.
void ClearAllGeometries()
Remove all stored geometries, leaving the container empty.
TimeBounds GetTimeBounds() const override
Get the time bounds (in ms)
TimePointType GetMinimumTimePoint(TimeStepType step) const override
Returns the first time point for which the object is valid.
void PrintSelf(std::ostream &os, itk::Indent indent) const override
TimePointType GetMaximumTimePoint() const override
Returns the last time point for which the object is valid.
void Expand(TimeStepType size) override
Expands the time geometry to the given number of time steps.
TimeStepType CountTimeSteps() const override
Returns the number of time steps.
BaseGeometry::Pointer GetGeometryForTimeStep(TimeStepType timeStep) const override
Returns the geometry which corresponds to the given time step.
void Initialize(const BaseGeometry *geometry, TimeStepType timeSteps)
Initialize with copies of a given geometry for each time step.
BaseGeometry::Pointer GetGeometryForTimePoint(TimePointType timePoint) const override
Returns the geometry which corresponds to the given time point.
void ReserveSpaceForGeometries(TimeStepType numberOfGeometries)
Pre-allocate space for a given number of geometries.
bool IsValid() const override
Tests if all necessary information are set and the object is valid.
std::vector< BaseGeometry::Pointer > m_GeometryVector
TimePointType GetMaximumTimePoint(TimeStepType step) const override
Returns the last time point for which the object is valid.
ProportionalTimeGeometry(const ProportionalTimeGeometry &other)
TimeStepType TimePointToTimeStep(TimePointType timePoint) const override
Converts a time point to the corresponding time step.
void SetTimeStepGeometry(BaseGeometry *geometry, TimeStepType timeStep) override
Sets the geometry for the given time step.
Find image slices visible on a given plane.
MITKCORE_EXPORT const ScalarType eps
Epsilon value for floating point comparison (vnl_math::eps * 100).
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.