Medical Imaging Interaction Toolkit  2018.4.99-4c24e3cb
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 ProportionalTimeGeometry_h
14 #define ProportionalTimeGeometry_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) itkCloneMacro(Self)
46 
47 
55  TimeStepType CountTimeSteps() const override;
63  TimePointType GetMinimumTimePoint() const override;
70  TimePointType GetMaximumTimePoint() const override;
71 
78  TimePointType GetMinimumTimePoint(TimeStepType step) const override;
84  TimePointType GetMaximumTimePoint(TimeStepType step) const override;
85 
89  TimeBounds GetTimeBounds() const override;
90 
94  TimeBounds GetTimeBounds(TimeStepType step) const override;
95 
102  bool IsValidTimePoint(TimePointType timePoint) const override;
110  bool IsValidTimeStep(TimeStepType timeStep) const override;
120  TimePointType TimeStepToTimePoint(TimeStepType timeStep) const override;
130  TimeStepType TimePointToTimeStep(TimePointType timePoint) const override;
137  BaseGeometry::Pointer GetGeometryCloneForTimeStep(TimeStepType timeStep) const override;
138 
148  BaseGeometry::Pointer GetGeometryForTimePoint(TimePointType timePoint) const override;
158  BaseGeometry::Pointer GetGeometryForTimeStep(TimeStepType timeStep) const override;
159 
163  bool IsValid() const override;
164 
168  void Initialize() override;
169 
178  void Expand(TimeStepType size) override;
185  void SetTimeStepGeometry(BaseGeometry *geometry, TimeStepType timeStep) override;
186 
197  void ReplaceTimeStepGeometries(const BaseGeometry *geometry) override;
198 
202  itk::LightObject::Pointer InternalClone() const override;
203 
204  itkGetConstMacro(FirstTimePoint, TimePointType);
205  itkSetMacro(FirstTimePoint, TimePointType);
206  itkGetConstMacro(StepDuration, TimePointType);
207  itkSetMacro(StepDuration, TimePointType);
208 
209  // void SetGeometryForTimeStep(TimeStepType timeStep, BaseGeometry& geometry);
210  void ClearAllGeometries();
211  // void AddGeometry(BaseGeometry geometry);
212  void ReserveSpaceForGeometries(TimeStepType numberOfGeometries);
213 
219  void Initialize(const BaseGeometry *geometry, TimeStepType timeSteps);
223  void Initialize(TimeStepType timeSteps);
224 
225  void PrintSelf(std::ostream &os, itk::Indent indent) const override;
226 
227  protected:
228  ~ProportionalTimeGeometry() override;
229 
230  std::vector<BaseGeometry::Pointer> m_GeometryVector;
233  }; // end class ProportialTimeGeometry
234 
253  MITKCORE_EXPORT bool Equal(const mitk::ProportionalTimeGeometry &leftHandSide,
254  const mitk::ProportionalTimeGeometry &rightHandSide,
255  ScalarType eps,
256  bool verbose);
257 
258 } // end namespace MITK
259 #endif // ProportionalTimeGeometry_h
#define MITKCORE_EXPORT
itk::FixedArray< ScalarType, 2 > TimeBounds
Standard typedef for time-bounds.
double ScalarType
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
bool verbose(false)
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.
std::vector< BaseGeometry::Pointer > m_GeometryVector