ITK  6.0.0
Insight Toolkit
itkVTKPolyDataReader.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * https://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkVTKPolyDataReader_h
19 #define itkVTKPolyDataReader_h
20 
21 #include "itkIntTypes.h"
22 #include "itkMesh.h"
23 #include "itkMeshSource.h"
24 #include "itkTriangleCell.h"
25 
26 namespace itk
27 {
44 template <typename TOutputMesh>
45 class ITK_TEMPLATE_EXPORT VTKPolyDataReader : public MeshSource<TOutputMesh>
46 {
47 public:
48  ITK_DISALLOW_COPY_AND_MOVE(VTKPolyDataReader);
49 
55 
57  itkNewMacro(Self);
58 
60  itkOverrideGetNameOfClassMacro(VTKPolyDataReader);
61 
63  using OutputMeshType = TOutputMesh;
64  using MeshTraits = typename OutputMeshType::MeshTraits;
66  using PixelType = typename MeshTraits::PixelType;
67 
70  using CellTraits = typename OutputMeshType::CellTraits;
71  using CellIdentifier = typename OutputMeshType::CellIdentifier;
72  using CellType = typename OutputMeshType::CellType;
73  using CellAutoPointer = typename OutputMeshType::CellAutoPointer;
74  using PointIdentifier = typename OutputMeshType::PointIdentifier;
75  using PointIdIterator = typename CellTraits::PointIdIterator;
76 
77  using PointsContainerPointer = typename OutputMeshType::PointsContainerPointer;
78  using PointsContainer = typename OutputMeshType::PointsContainer;
79 
82 
83  using TriangleCellAutoPointer = typename TriangleCellType::SelfAutoPointer;
84 
85  using IndexPairType = std::pair<IdentifierType, IdentifierType>;
88 
94  itkSetStringMacro(FileName);
95  itkGetStringMacro(FileName);
99  itkGetStringMacro(Version);
100 
102  itkGetStringMacro(Header);
103 
104 protected:
106  ~VTKPolyDataReader() override = default;
107  void
108  PrintSelf(std::ostream & os, Indent indent) const override;
109 
111  void
112  GenerateData() override;
113 
116 private:
117  std::string m_FileName{};
118  std::string m_Header{};
119  std::string m_Version{};
120 };
121 } // end namespace itk
122 
123 #ifndef ITK_MANUAL_INSTANTIATION
124 # include "itkVTKPolyDataReader.hxx"
125 #endif
126 
127 #endif //_itkVTKPolyDataReader_h
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
itk::VTKPolyDataReader::PointType
typename OutputMeshType::PointType PointType
Definition: itkVTKPolyDataReader.h:65
itk::VTKPolyDataReader::MeshTraits
typename OutputMeshType::MeshTraits MeshTraits
Definition: itkVTKPolyDataReader.h:64
itk::VTKPolyDataReader::PointsContainerPointer
typename OutputMeshType::PointsContainerPointer PointsContainerPointer
Definition: itkVTKPolyDataReader.h:77
itk::MeshSource::OutputMeshPointer
typename OutputMeshType::Pointer OutputMeshPointer
Definition: itkMeshSource.h:69
itk::VTKPolyDataReader::VectorType
typename PointType::VectorType VectorType
Definition: itkVTKPolyDataReader.h:87
itk::GTest::TypedefsAndConstructors::Dimension2::VectorType
ImageBaseType::SpacingType VectorType
Definition: itkGTestTypedefsAndConstructors.h:53
itk::GTest::TypedefsAndConstructors::Dimension2::PointType
ImageBaseType::PointType PointType
Definition: itkGTestTypedefsAndConstructors.h:51
itk::VTKPolyDataReader::PixelType
typename MeshTraits::PixelType PixelType
Definition: itkVTKPolyDataReader.h:66
itk::VTKPolyDataReader::CellAutoPointer
typename OutputMeshType::CellAutoPointer CellAutoPointer
Definition: itkVTKPolyDataReader.h:73
itk::VTKPolyDataReader::CellType
typename OutputMeshType::CellType CellType
Definition: itkVTKPolyDataReader.h:72
itk::Version
Track the current version of the software.
Definition: itkVersion.h:56
itk::VTKPolyDataReader::TriangleCellAutoPointer
typename TriangleCellType::SelfAutoPointer TriangleCellAutoPointer
Definition: itkVTKPolyDataReader.h:83
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::VTKPolyDataReader::CellTraits
typename OutputMeshType::CellTraits CellTraits
Definition: itkVTKPolyDataReader.h:70
itk::MapContainer
A wrapper of the STL "map" container.
Definition: itkMapContainer.h:45
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::VTKPolyDataReader::CellIdentifier
typename OutputMeshType::CellIdentifier CellIdentifier
Definition: itkVTKPolyDataReader.h:71
itk::MeshSource
Base class for all process objects that output mesh data.
Definition: itkMeshSource.h:49
itk::VTKPolyDataReader::PointsContainer
typename OutputMeshType::PointsContainer PointsContainer
Definition: itkVTKPolyDataReader.h:78
itkMeshSource.h
itkMesh.h
itk::TriangleCell
Definition: itkTriangleCell.h:46
itkIntTypes.h
itk::VTKPolyDataReader::PointIdentifier
typename OutputMeshType::PointIdentifier PointIdentifier
Definition: itkVTKPolyDataReader.h:74
itk::VTKPolyDataReader::IndexPairType
std::pair< IdentifierType, IdentifierType > IndexPairType
Definition: itkVTKPolyDataReader.h:85
itk::VTKPolyDataReader::PointIdIterator
typename CellTraits::PointIdIterator PointIdIterator
Definition: itkVTKPolyDataReader.h:75
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::VTKPolyDataReader
Reads a vtkPolyData file and create an itkMesh.
Definition: itkVTKPolyDataReader.h:45
itk::MeshSource::OutputMeshType
TOutputMesh OutputMeshType
Definition: itkMeshSource.h:68
itkTriangleCell.h