1 #ifndef __CPPLUGINS__EXTENSIONS__WAVEFRONTOBJREADER__H__
2 #define __CPPLUGINS__EXTENSIONS__WAVEFRONTOBJREADER__H__
5 #include <itkIntTypes.h>
7 #include <itkMeshSource.h>
8 #include <itkPolygonCell.h>
15 * \class WaveFrontOBJReader
17 * Reads a wavefront OBJ file and create an itkMesh.
19 * Caveat1: itkWaveFrontOBJReader will read only vertices and faces.
20 * Normal, parameters and textures vectors are ignored.
23 template< typename M >
24 class WaveFrontOBJReader
25 : public itk::MeshSource< M >
28 typedef WaveFrontOBJReader Self;
29 typedef itk::MeshSource< M > Superclass;
30 typedef itk::SmartPointer< Self > Pointer;
31 typedef itk::SmartPointer< const Self > ConstPointer;
34 typedef typename M::MeshTraits MeshTraits;
35 typedef typename M::PointType PointType;
36 typedef typename MeshTraits::PixelType PixelType;
37 typedef typename M::Pointer MeshPointer;
38 typedef typename M::CellTraits CellTraits;
39 typedef typename M::CellIdentifier CellIdentifier;
40 typedef typename M::CellType CellType;
41 typedef typename M::CellAutoPointer CellAutoPointer;
42 typedef typename M::PointIdentifier PointIdentifier;
43 typedef typename CellTraits::PointIdIterator PointIdIterator;
44 typedef typename M::PointsContainerPointer PointsContainerPointer;
45 typedef typename M::PointsContainer PointsContainer;
47 typedef itk::PolygonCell< CellType > TPolygonCell;
51 itkTypeMacro( WaveFrontOBJReader, itkMeshSource );
53 itkSetStringMacro( FileName );
54 itkGetStringMacro( FileName );
57 WaveFrontOBJReader( );
58 virtual ~WaveFrontOBJReader( );
60 virtual void GenerateData( );
63 // Purposely not implemented
64 WaveFrontOBJReader( const Self& );
65 Self& operator=( const Self & );
68 std::string m_FileName;
75 #include <cpPlugins/Extensions/WaveFrontOBJReader.hxx>
77 #endif // __CPPLUGINS__EXTENSIONS__WAVEFRONTOBJREADER__H__