Medical Imaging Interaction Toolkit  2024.06.99-692c34ce
Medical Imaging Interaction Toolkit
mitkUnstructuredGrid.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 mitkUnstructuredGrid_h
14 #define mitkUnstructuredGrid_h
15 
17 #include "itkImageRegion.h"
18 #include "mitkBaseData.h"
19 
20 class vtkUnstructuredGrid;
21 
22 namespace mitk
23 {
24  //##Documentation
25  //## @brief Class for storing unstructured grids (vtkUnstructuredGrid)
26  //## @ingroup Data
28  {
29  public:
30  // not yet the best choice of a region-type for surfaces, but it works for the time being
31  typedef itk::ImageRegion<5> RegionType;
32 
34 
35  itkFactorylessNewMacro(Self);
36 
37  itkCloneMacro(Self);
38 
39  virtual void SetVtkUnstructuredGrid(vtkUnstructuredGrid *grid, unsigned int t = 0);
40 
41  virtual vtkUnstructuredGrid *GetVtkUnstructuredGrid(unsigned int t = 0);
42 
43  void UpdateOutputInformation() override;
44 
45  void SetRequestedRegionToLargestPossibleRegion() override;
46 
47  bool RequestedRegionIsOutsideOfTheBufferedRegion() override;
48 
49  bool VerifyRequestedRegion() override;
50 
51  void SetRequestedRegion(const itk::DataObject *data) override;
52 
53  virtual void SetRequestedRegion(UnstructuredGrid::RegionType *region);
54 
55  void Graft(const DataObject *data) override;
56 
57  void CopyInformation(const itk::DataObject *data) override;
58 
59  void Update() override;
60 
61  // Initialize should not be called manually;
62  // The polydata vector is initialized automatically when enlarged;
63  void Expand(unsigned int timeSteps = 1) override;
64 
66  {
67  m_LargestPossibleRegion.SetIndex(3, 0);
68  m_LargestPossibleRegion.SetSize(3, GetTimeGeometry()->CountTimeSteps());
69  return m_LargestPossibleRegion;
70  }
71 
72  //##Documentation
73  //## Get the region object that defines the size and starting index
74  //## for the region of the image requested (i.e., the region of the
75  //## image to be operated on by a filter).
76  virtual const RegionType &GetRequestedRegion() const { return m_RequestedRegion; }
77  void CalculateBoundingBox();
78 
79  protected:
80  mitkCloneMacro(Self);
81 
82  typedef std::vector<vtkUnstructuredGrid *> VTKUnstructuredGridSeries;
83 
85 
87 
88  ~UnstructuredGrid() override;
89 
90  void ClearData() override;
91 
92  void InitializeEmpty() override;
93 
95 
97 
99 
101  };
102 
103 } // namespace mitk
104 
105 #endif
mitk::UnstructuredGrid::m_LargestPossibleRegion
RegionType m_LargestPossibleRegion
Definition: mitkUnstructuredGrid.h:96
MitkDataTypesExtExports.h
MITKDATATYPESEXT_EXPORT
#define MITKDATATYPESEXT_EXPORT
Definition: MitkDataTypesExtExports.h:15
mitk::UnstructuredGrid
Class for storing unstructured grids (vtkUnstructuredGrid)
Definition: mitkUnstructuredGrid.h:27
mitk::UnstructuredGrid::m_GridSeries
VTKUnstructuredGridSeries m_GridSeries
Definition: mitkUnstructuredGrid.h:94
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::BaseData
Base of all data objects.
Definition: mitkBaseData.h:42
mitk::UnstructuredGrid::m_RequestedRegion
RegionType m_RequestedRegion
Definition: mitkUnstructuredGrid.h:98
mitk::UnstructuredGrid::RegionType
itk::ImageRegion< 5 > RegionType
Definition: mitkUnstructuredGrid.h:31
mitkCloneMacro
#define mitkCloneMacro(classname)
Definition: mitkCommon.h:154
mitkBaseData.h
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
mitk::UnstructuredGrid::m_CalculateBoundingBox
bool m_CalculateBoundingBox
Definition: mitkUnstructuredGrid.h:100
mitk::UnstructuredGrid::VTKUnstructuredGridSeries
std::vector< vtkUnstructuredGrid * > VTKUnstructuredGridSeries
Definition: mitkUnstructuredGrid.h:82
mitk::UnstructuredGrid::GetLargestPossibleRegion
const RegionType & GetLargestPossibleRegion() const
Definition: mitkUnstructuredGrid.h:65
mitk::UnstructuredGrid::GetRequestedRegion
virtual const RegionType & GetRequestedRegion() const
Definition: mitkUnstructuredGrid.h:76