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
26namespace itk
27{
44template <typename TOutputMesh>
45class ITK_TEMPLATE_EXPORT VTKPolyDataReader : public MeshSource<TOutputMesh>
46{
47public:
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
104protected:
106 ~VTKPolyDataReader() override = default;
107 void
108 PrintSelf(std::ostream & os, Indent indent) const override;
109
111 void
112 GenerateData() override;
113
116private:
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
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
A wrapper of the STL "map" container.
Base class for all process objects that output mesh data.
Definition: itkMeshSource.h:50
typename OutputMeshType::Pointer OutputMeshPointer
Definition: itkMeshSource.h:69
TOutputMesh OutputMeshType
Definition: itkMeshSource.h:68
Reads a vtkPolyData file and create an itkMesh.
typename CellTraits::PointIdIterator PointIdIterator
typename OutputMeshType::MeshTraits MeshTraits
typename TriangleCellType::SelfAutoPointer TriangleCellAutoPointer
typename OutputMeshType::CellIdentifier CellIdentifier
typename OutputMeshType::PointsContainer PointsContainer
void PrintSelf(std::ostream &os, Indent indent) const override
typename OutputMeshType::CellAutoPointer CellAutoPointer
typename OutputMeshType::CellTraits CellTraits
typename PointType::VectorType VectorType
~VTKPolyDataReader() override=default
typename OutputMeshType::PointsContainerPointer PointsContainerPointer
typename OutputMeshType::PointIdentifier PointIdentifier
typename OutputMeshType::PointType PointType
typename MeshTraits::PixelType PixelType
std::pair< IdentifierType, IdentifierType > IndexPairType
void GenerateData() override
typename OutputMeshType::CellType CellType
Track the current version of the software.
Definition: itkVersion.h:57
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....