ITK  4.4.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 {
38 template< class TOutputMesh >
39 class VTKPolyDataReader:public MeshSource< TOutputMesh >
40 {
41 public:
47 
49  itkNewMacro(Self);
50 
52  itkTypeMacro(VTKPolyDataReader, MeshSource);
53 
55  typedef TOutputMesh OutputMeshType;
56  typedef typename OutputMeshType::MeshTraits MeshTraits;
57  typedef typename OutputMeshType::PointType PointType;
58  typedef typename MeshTraits::PixelType PixelType;
59 
61  typedef typename OutputMeshType::Pointer OutputMeshPointer;
62  typedef typename OutputMeshType::CellTraits CellTraits;
63  typedef typename OutputMeshType::CellIdentifier CellIdentifier;
64  typedef typename OutputMeshType::CellType CellType;
65  typedef typename OutputMeshType::CellAutoPointer CellAutoPointer;
66  typedef typename OutputMeshType::PointIdentifier PointIdentifier;
67  typedef typename CellTraits::PointIdIterator PointIdIterator;
68 
69  typedef typename OutputMeshType::PointsContainerPointer PointsContainerPointer;
70  typedef typename OutputMeshType::PointsContainer PointsContainer;
71 
74 
75  typedef typename TriangleCellType::SelfAutoPointer TriangleCellAutoPointer;
76 
77  typedef std::pair< IdentifierType, IdentifierType > IndexPairType;
79  typedef typename PointType::VectorType VectorType;
80 
86  itkSetStringMacro(FileName);
87  itkGetStringMacro(FileName);
89 
91  itkGetStringMacro(Version);
92 
94  itkGetStringMacro(Header);
95 
96 protected:
99  void PrintSelf(std::ostream & os, Indent indent) const;
100 
102  void GenerateData();
103 
106 private:
107  VTKPolyDataReader(const Self &); // purposely not implemented
108  void operator=(const Self &); // purposely not implemented
109 
110  std::string m_FileName;
111  std::string m_Header;
112  std::string m_Version;
113 };
114 } // end namespace itk
115 
116 #ifndef ITK_MANUAL_INSTANTIATION
117 #include "itkVTKPolyDataReader.hxx"
118 #endif
119 
120 #endif //_itkVTKPolyDataReader_h
121