Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkSurface.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 mitkSurface_h
14 #define mitkSurface_h
15 
16 #include "itkImageRegion.h"
17 #include "mitkBaseData.h"
18 #include <vtkSmartPointer.h>
19 
20 class vtkPolyData;
21 
22 namespace mitk
23 {
29  {
30  public:
31  typedef itk::ImageRegion<5> RegionType;
32 
34  itkFactorylessNewMacro(Self);
35  itkCloneMacro(Self);
36 
38  void CopyInformation(const itk::DataObject *data) override;
39  void ExecuteOperation(Operation *operation) override;
40  void Expand(unsigned int timeSteps = 1) override;
42  virtual const RegionType &GetRequestedRegion() const;
43  unsigned int GetSizeOfPolyDataSeries() const;
44  virtual vtkPolyData *GetVtkPolyData(unsigned int t = 0) const;
45  void Graft(const DataObject *data) override;
46  bool IsEmptyTimeStep(unsigned int t) const override;
47  void PrintSelf(std::ostream &os, itk::Indent indent) const override;
49  void SetRequestedRegion(const itk::DataObject *data) override;
50  virtual void SetRequestedRegion(Surface::RegionType *region);
52  virtual void SetVtkPolyData(vtkPolyData *polydata, unsigned int t = 0);
53  virtual void Swap(Surface &other);
54  void Update() override;
55  void UpdateOutputInformation() override;
56  bool VerifyRequestedRegion() override;
57 
58  protected:
60 
62  ~Surface() override;
63 
64  Surface(const Surface &other);
66 
67  void ClearData() override;
68  void InitializeEmpty() override;
69 
70  private:
71  std::vector<vtkSmartPointer<vtkPolyData>> m_PolyDatas;
72  mutable RegionType m_LargestPossibleRegion;
73  mutable RegionType m_RequestedRegion;
74  bool m_CalculateBoundingBox;
75  };
76 
89  mitk::Surface *leftHandSide, mitk::Surface *rightHandSide, mitk::ScalarType eps, bool verbose));
90 
100  MITKCORE_EXPORT bool Equal(mitk::Surface &leftHandSide,
101  mitk::Surface &rightHandSide,
103  bool verbose);
104 
121  vtkPolyData *leftHandSide, vtkPolyData *rightHandSide, mitk::ScalarType eps, bool verbose));
122 
136  MITKCORE_EXPORT bool Equal(vtkPolyData &leftHandSide, vtkPolyData &rightHandSide, mitk::ScalarType eps, bool verbose);
137 }
138 
139 #endif
#define MITKCORE_EXPORT
Base of all data objects.
Definition: mitkBaseData.h:44
Base class of all Operation-classes.
Definition: mitkOperation.h:30
Class for storing surfaces (vtkPolyData).
Definition: mitkSurface.h:29
virtual void SetVtkPolyData(vtkPolyData *polydata, unsigned int t=0)
bool IsEmptyTimeStep(unsigned int t) const override
Check whether object contains data (at a specified time), e.g., a set of points may be empty.
Surface(const Surface &other)
virtual const RegionType & GetRequestedRegion() const
virtual void SetRequestedRegion(Surface::RegionType *region)
void InitializeEmpty() override
Pure virtual; Must be used in subclasses to get a data object to a valid state. Should at least creat...
~Surface() override
void ClearData() override
reset to non-initialized state, release memory
bool VerifyRequestedRegion() override
Verify that the RequestedRegion is within the LargestPossibleRegion.
itk::ImageRegion< 5 > RegionType
Definition: mitkSurface.h:31
void Update() override
void CalculateBoundingBox()
void CopyInformation(const itk::DataObject *data) override
const RegionType & GetLargestPossibleRegion() const
virtual void Swap(Surface &other)
void Expand(unsigned int timeSteps=1) override
Expands the TimeGeometry to a number of TimeSteps.
unsigned int GetSizeOfPolyDataSeries() const
void Graft(const DataObject *data) override
void ExecuteOperation(Operation *operation) override
overwrite if the Data can be called by an Interactor (StateMachine).
Surface & operator=(Surface other)
void SetRequestedRegion(const itk::DataObject *data) override
Set the requested region from this data object to match the requested region of the data object passe...
mitkClassMacro(Surface, BaseData)
bool RequestedRegionIsOutsideOfTheBufferedRegion() override
Determine whether the RequestedRegion is outside of the BufferedRegion.
void PrintSelf(std::ostream &os, itk::Indent indent) const override
void SetRequestedRegionToLargestPossibleRegion() override
Set the RequestedRegion to the LargestPossibleRegion.
void UpdateOutputInformation() override
mitkCloneMacro(Self)
virtual vtkPolyData * GetVtkPolyData(unsigned int t=0) const
#define DEPRECATED(func)
Definition: mitkCommon.h:175
Find image slices visible on a given plane.
MITKCORE_EXPORT const ScalarType eps
double ScalarType
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.