Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef ProportionalTimeGeometry_h
18 #define ProportionalTimeGeometry_h
19 
20 // MITK
21 #include <MitkCoreExports.h>
22 #include <mitkCommon.h>
23 #include <mitkGeometry3D.h>
24 #include <mitkTimeGeometry.h>
25 
26 namespace mitk
27 {
43  {
44  public:
46 
49  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
50 
59  virtual TimeStepType CountTimeSteps() const override;
67  virtual TimePointType GetMinimumTimePoint() const override;
74  virtual TimePointType GetMaximumTimePoint() const override;
75 
82  virtual TimePointType GetMinimumTimePoint(TimeStepType step) const override;
88  virtual TimePointType GetMaximumTimePoint(TimeStepType step) const override;
89 
93  virtual TimeBounds GetTimeBounds() const override;
94 
98  virtual TimeBounds GetTimeBounds(TimeStepType step) const override;
99 
106  virtual bool IsValidTimePoint(TimePointType timePoint) const override;
114  virtual bool IsValidTimeStep(TimeStepType timeStep) const override;
124  virtual TimePointType TimeStepToTimePoint(TimeStepType timeStep) const override;
134  virtual TimeStepType TimePointToTimeStep(TimePointType timePoint) const override;
141  virtual BaseGeometry::Pointer GetGeometryCloneForTimeStep(TimeStepType timeStep) const override;
142 
152  virtual BaseGeometry::Pointer GetGeometryForTimePoint(TimePointType timePoint) const override;
162  virtual BaseGeometry::Pointer GetGeometryForTimeStep(TimeStepType timeStep) const override;
163 
167  virtual bool IsValid() const override;
168 
172  virtual void Initialize() override;
173 
182  virtual void Expand(TimeStepType size) override;
189  virtual void SetTimeStepGeometry(BaseGeometry *geometry, TimeStepType timeStep) override;
190 
201  virtual void ReplaceTimeStepGeometries(const BaseGeometry *geometry) override;
202 
206  virtual itk::LightObject::Pointer InternalClone() const override;
207 
208  itkGetConstMacro(FirstTimePoint, TimePointType);
209  itkSetMacro(FirstTimePoint, TimePointType);
210  itkGetConstMacro(StepDuration, TimePointType);
211  itkSetMacro(StepDuration, TimePointType);
212 
213  // void SetGeometryForTimeStep(TimeStepType timeStep, BaseGeometry& geometry);
214  void ClearAllGeometries();
215  // void AddGeometry(BaseGeometry geometry);
216  void ReserveSpaceForGeometries(TimeStepType numberOfGeometries);
217 
223  void Initialize(const BaseGeometry *geometry, TimeStepType timeSteps);
227  void Initialize(TimeStepType timeSteps);
228 
229  virtual void PrintSelf(std::ostream &os, itk::Indent indent) const override;
230 
231  protected:
232  virtual ~ProportionalTimeGeometry();
233 
234  std::vector<BaseGeometry::Pointer> m_GeometryVector;
235  TimePointType m_FirstTimePoint;
236  TimePointType m_StepDuration;
237  }; // end class ProportialTimeGeometry
238 
257  MITKCORE_EXPORT bool Equal(const mitk::ProportionalTimeGeometry &leftHandSide,
258  const mitk::ProportionalTimeGeometry &rightHandSide,
259  ScalarType eps,
260  bool verbose);
261 
262 } // end namespace MITK
263 #endif // ProportionalTimeGeometry_h
#define MITKCORE_EXPORT
itk::FixedArray< ScalarType, 2 > TimeBounds
Standard typedef for time-bounds.
double ScalarType
STL namespace.
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
mitk::ScalarType TimePointType
std::vcl_size_t TimeStepType
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.
MITKCORE_EXPORT const ScalarType eps
BaseGeometry Describes the geometry of a data object.