ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkVTKPolyDataReader.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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  * http://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_ASSIGN(VTKPolyDataReader);
49 
55 
57  itkNewMacro(Self);
58 
60  itkTypeMacro(VTKPolyDataReader, MeshSource);
61 
63  using OutputMeshType = TOutputMesh;
64  using MeshTraits = typename OutputMeshType::MeshTraits;
66  using PixelType = typename MeshTraits::PixelType;
67 
69  using OutputMeshPointer = typename OutputMeshType::Pointer;
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);
97 
99  itkGetStringMacro(Version);
100 
102  itkGetStringMacro(Header);
103 
104 protected:
106  ~VTKPolyDataReader() override = default;
107  void PrintSelf(std::ostream & os, Indent indent) const override;
108 
110  void GenerateData() override;
111 
114 private:
115  std::string m_FileName;
116  std::string m_Header;
117  std::string m_Version;
118 };
119 } // end namespace itk
120 
121 #ifndef ITK_MANUAL_INSTANTIATION
122 #include "itkVTKPolyDataReader.hxx"
123 #endif
124 
125 #endif //_itkVTKPolyDataReader_h
Light weight base class for most itk classes.
TOutputMesh OutputMeshType
Definition: itkMeshSource.h:68
A wrapper of the STL &quot;map&quot; container.
typename OutputMeshType::PointsContainerPointer PointsContainerPointer
Reads a vtkPolyData file and create an itkMesh.
typename MeshTraits::PixelType PixelType
typename OutputMeshType::MeshTraits MeshTraits
Base class for all process objects that output mesh data.
Definition: itkMeshSource.h:49
typename OutputMeshType::PointIdentifier PointIdentifier
typename TriangleCellType::SelfAutoPointer TriangleCellAutoPointer
typename OutputMeshType::CellAutoPointer CellAutoPointer
std::pair< IdentifierType, IdentifierType > IndexPairType
typename OutputMeshType::CellTraits CellTraits
typename OutputMeshType::Pointer OutputMeshPointer
Definition: itkMeshSource.h:69
typename OutputMeshType::CellIdentifier CellIdentifier
typename OutputMeshType::PointsContainer PointsContainer
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename OutputMeshType::PointType PointType
Track the current version of the software.
Definition: itkVersion.h:57
typename PointType::VectorType VectorType
typename CellTraits::PointIdIterator PointIdIterator
typename OutputMeshType::CellType CellType