ITK  4.9.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 VTKPolyDataReader:public MeshSource< TOutputMesh >
46 {
47 public:
53 
55  itkNewMacro(Self);
56 
58  itkTypeMacro(VTKPolyDataReader, MeshSource);
59 
61  typedef TOutputMesh OutputMeshType;
62  typedef typename OutputMeshType::MeshTraits MeshTraits;
63  typedef typename OutputMeshType::PointType PointType;
64  typedef typename MeshTraits::PixelType PixelType;
65 
67  typedef typename OutputMeshType::Pointer OutputMeshPointer;
68  typedef typename OutputMeshType::CellTraits CellTraits;
69  typedef typename OutputMeshType::CellIdentifier CellIdentifier;
70  typedef typename OutputMeshType::CellType CellType;
71  typedef typename OutputMeshType::CellAutoPointer CellAutoPointer;
72  typedef typename OutputMeshType::PointIdentifier PointIdentifier;
73  typedef typename CellTraits::PointIdIterator PointIdIterator;
74 
75  typedef typename OutputMeshType::PointsContainerPointer PointsContainerPointer;
76  typedef typename OutputMeshType::PointsContainer PointsContainer;
77 
80 
81  typedef typename TriangleCellType::SelfAutoPointer TriangleCellAutoPointer;
82 
83  typedef std::pair< IdentifierType, IdentifierType > IndexPairType;
85  typedef typename PointType::VectorType VectorType;
86 
92  itkSetStringMacro(FileName);
93  itkGetStringMacro(FileName);
95 
97  itkGetStringMacro(Version);
98 
100  itkGetStringMacro(Header);
101 
102 protected:
105  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
106 
108  void GenerateData() ITK_OVERRIDE;
109 
112 private:
113  VTKPolyDataReader(const Self &) ITK_DELETE_FUNCTION;
114  void operator=(const Self &) ITK_DELETE_FUNCTION;
115 
116  std::string m_FileName;
117  std::string m_Header;
118  std::string m_Version;
119 };
120 } // end namespace itk
121 
122 #ifndef ITK_MANUAL_INSTANTIATION
123 #include "itkVTKPolyDataReader.hxx"
124 #endif
125 
126 #endif //_itkVTKPolyDataReader_h
Light weight base class for most itk classes.
CellTraits::PointIdIterator PointIdIterator
PointType::VectorType VectorType
A wrapper of the STL &quot;map&quot; container.
void GenerateData() override
TriangleCell< CellType > TriangleCellType
OutputMeshType::PointsContainerPointer PointsContainerPointer
OutputMeshType::MeshTraits MeshTraits
Reads a vtkPolyData file and create an itkMesh.
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
OutputMeshType::CellTraits CellTraits
OutputMeshType::PointType PointType
MapContainer< IndexPairType, IdentifierType > PointMapType
Base class for all process objects that output mesh data.
Definition: itkMeshSource.h:49
std::pair< IdentifierType, IdentifierType > IndexPairType
TriangleCellType::SelfAutoPointer TriangleCellAutoPointer
MeshTraits::PixelType PixelType
MeshSource< TOutputMesh > Superclass
void PrintSelf(std::ostream &os, Indent indent) const override
OutputMeshType::Pointer OutputMeshPointer
OutputMeshType::PointIdentifier PointIdentifier
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Track the current version of the software.
Definition: itkVersion.h:57
OutputMeshType::CellAutoPointer CellAutoPointer
OutputMeshType::CellType CellType
OutputMeshType::PointsContainer PointsContainer
OutputMeshType::CellIdentifier CellIdentifier