ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
00001 /*========================================================================= 00002 * 00003 * Copyright Insight Software Consortium 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0.txt 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 * 00017 *=========================================================================*/ 00018 #ifndef __itkVTKPolyDataReader_h 00019 #define __itkVTKPolyDataReader_h 00020 00021 #include "itkIntTypes.h" 00022 #include "itkMesh.h" 00023 #include "itkMeshSource.h" 00024 #include "itkTriangleCell.h" 00025 00026 namespace itk 00027 { 00038 template< class TOutputMesh > 00039 class VTKPolyDataReader:public MeshSource< TOutputMesh > 00040 { 00041 public: 00043 typedef VTKPolyDataReader Self; 00044 typedef MeshSource< TOutputMesh > Superclass; 00045 typedef SmartPointer< Self > Pointer; 00046 typedef SmartPointer< const Self > ConstPointer; 00047 00049 itkNewMacro(Self); 00050 00052 itkTypeMacro(VTKPolyDataReader, MeshSource); 00053 00055 typedef TOutputMesh OutputMeshType; 00056 typedef typename OutputMeshType::MeshTraits MeshTraits; 00057 typedef typename OutputMeshType::PointType PointType; 00058 typedef typename MeshTraits::PixelType PixelType; 00059 00061 typedef typename OutputMeshType::Pointer OutputMeshPointer; 00062 typedef typename OutputMeshType::CellTraits CellTraits; 00063 typedef typename OutputMeshType::CellIdentifier CellIdentifier; 00064 typedef typename OutputMeshType::CellType CellType; 00065 typedef typename OutputMeshType::CellAutoPointer CellAutoPointer; 00066 typedef typename OutputMeshType::PointIdentifier PointIdentifier; 00067 typedef typename CellTraits::PointIdIterator PointIdIterator; 00068 00069 typedef typename OutputMeshType::PointsContainerPointer PointsContainerPointer; 00070 typedef typename OutputMeshType::PointsContainer PointsContainer; 00071 00073 typedef TriangleCell< CellType > TriangleCellType; 00074 00075 typedef typename TriangleCellType::SelfAutoPointer TriangleCellAutoPointer; 00076 00077 typedef std::pair< IdentifierType, IdentifierType > IndexPairType; 00078 typedef MapContainer< IndexPairType, IdentifierType > PointMapType; 00079 typedef typename PointType::VectorType VectorType; 00080 00086 itkSetStringMacro(FileName); 00087 itkGetStringMacro(FileName); 00089 00091 itkGetStringMacro(Version); 00092 00094 itkGetStringMacro(Header); 00095 protected: 00096 VTKPolyDataReader(); 00097 ~VTKPolyDataReader() {} 00098 void PrintSelf(std::ostream & os, Indent indent) const; 00100 00102 void GenerateData(); 00103 00105 private: 00106 VTKPolyDataReader(const Self &); // purposely not implemented 00107 void operator=(const Self &); // purposely not implemented 00109 00110 std::string m_FileName; 00111 std::string m_Header; 00112 std::string m_Version; 00113 }; 00114 } // end namespace itk 00115 00116 #ifndef ITK_MANUAL_INSTANTIATION 00117 #include "itkVTKPolyDataReader.hxx" 00118 #endif 00119 00120 #endif //_itkVTKPolyDataReader_h 00121