1 #ifndef __CPPLUGINS__EXTENSIONS__IO__WAVEFRONTOBJREADER__H__
2 #define __CPPLUGINS__EXTENSIONS__IO__WAVEFRONTOBJREADER__H__
5 #include <itkIntTypes.h>
7 #include <itkMeshSource.h>
8 #include <itkPolygonCell.h>
17 * \class WaveFrontOBJReader
19 * Reads a wavefront OBJ file and create an itkMesh.
21 * Caveat1: itkWaveFrontOBJReader will read only vertices and faces.
22 * Normal, parameters and textures vectors are ignored.
25 template< typename M >
26 class WaveFrontOBJReader
27 : public itk::MeshSource< M >
30 typedef WaveFrontOBJReader Self;
31 typedef itk::MeshSource< M > Superclass;
32 typedef itk::SmartPointer< Self > Pointer;
33 typedef itk::SmartPointer< const Self > ConstPointer;
36 typedef typename M::MeshTraits MeshTraits;
37 typedef typename M::PointType PointType;
38 typedef typename MeshTraits::PixelType PixelType;
39 typedef typename M::Pointer MeshPointer;
40 typedef typename M::CellTraits CellTraits;
41 typedef typename M::CellIdentifier CellIdentifier;
42 typedef typename M::CellType CellType;
43 typedef typename M::CellAutoPointer CellAutoPointer;
44 typedef typename M::PointIdentifier PointIdentifier;
45 typedef typename CellTraits::PointIdIterator PointIdIterator;
46 typedef typename M::PointsContainerPointer PointsContainerPointer;
47 typedef typename M::PointsContainer PointsContainer;
49 typedef itk::PolygonCell< CellType > TPolygonCell;
53 itkTypeMacro( WaveFrontOBJReader, itkMeshSource );
55 itkSetStringMacro( FileName );
56 itkGetStringMacro( FileName );
59 WaveFrontOBJReader( );
60 virtual ~WaveFrontOBJReader( );
62 virtual void GenerateData( );
65 // Purposely not implemented
66 WaveFrontOBJReader( const Self& );
67 Self& operator=( const Self & );
70 std::string m_FileName;
79 #include <cpPlugins/Extensions/IO/WaveFrontOBJReader.hxx>
81 #endif // __CPPLUGINS__EXTENSIONS__IO__WAVEFRONTOBJREADER__H__