ITK  4.13.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:
53 
55  itkNewMacro(Self);
56 
58  itkTypeMacro(VTKPolyDataReader, MeshSource);
59 
61  typedef TOutputMesh OutputMeshType;
62  typedef typename OutputMeshType::MeshTraits MeshTraits;
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;
86 
92  itkSetStringMacro(FileName);
93  itkGetStringMacro(FileName);
95 
97  itkGetStringMacro(Version);
98 
100  itkGetStringMacro(Header);
101 
102 protected:
104  ~VTKPolyDataReader() ITK_OVERRIDE {}
105  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
106 
108  void GenerateData() ITK_OVERRIDE;
109 
112 private:
113  ITK_DISALLOW_COPY_AND_ASSIGN(VTKPolyDataReader);
114 
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.
CellTraits::PointIdIterator PointIdIterator
PointType::VectorType VectorType
A wrapper of the STL &quot;map&quot; container.
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
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