#include <itkPolygonCell.h>
namespace cpExtensions
+{
+ namespace IO
{
- namespace IO
+ /**
+ * \class WaveFrontOBJReader
+ * \brief
+ * Reads a wavefront OBJ file and create an itkMesh.
+ *
+ * Caveat1: itkWaveFrontOBJReader will read only vertices and faces.
+ * Normal, parameters and textures vectors are ignored.
+ *
+ */
+ template< typename M >
+ class WaveFrontOBJReader
+ : public itk::MeshSource< M >
{
- /**
- * \class WaveFrontOBJReader
- * \brief
- * Reads a wavefront OBJ file and create an itkMesh.
- *
- * Caveat1: itkWaveFrontOBJReader will read only vertices and faces.
- * Normal, parameters and textures vectors are ignored.
- *
- */
- template< typename M >
- class WaveFrontOBJReader
- : public itk::MeshSource< M >
- {
- public:
- typedef WaveFrontOBJReader Self;
- typedef itk::MeshSource< M > Superclass;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
+ public:
+ typedef WaveFrontOBJReader Self;
+ typedef itk::MeshSource< M > Superclass;
+ typedef itk::SmartPointer< Self > Pointer;
+ typedef itk::SmartPointer< const Self > ConstPointer;
- typedef M MeshType;
- typedef typename M::MeshTraits MeshTraits;
- typedef typename M::PointType PointType;
- typedef typename MeshTraits::PixelType PixelType;
- typedef typename M::Pointer MeshPointer;
- typedef typename M::CellTraits CellTraits;
- typedef typename M::CellIdentifier CellIdentifier;
- typedef typename M::CellType CellType;
- typedef typename M::CellAutoPointer CellAutoPointer;
- typedef typename M::PointIdentifier PointIdentifier;
- typedef typename CellTraits::PointIdIterator PointIdIterator;
- typedef typename M::PointsContainerPointer PointsContainerPointer;
- typedef typename M::PointsContainer PointsContainer;
+ typedef M MeshType;
+ typedef typename M::MeshTraits MeshTraits;
+ typedef typename M::PointType PointType;
+ typedef typename MeshTraits::PixelType PixelType;
+ typedef typename M::Pointer MeshPointer;
+ typedef typename M::CellTraits CellTraits;
+ typedef typename M::CellIdentifier CellIdentifier;
+ typedef typename M::CellType CellType;
+ typedef typename M::CellAutoPointer CellAutoPointer;
+ typedef typename M::PointIdentifier PointIdentifier;
+ typedef typename CellTraits::PointIdIterator PointIdIterator;
+ typedef typename M::PointsContainerPointer PointsContainerPointer;
+ typedef typename M::PointsContainer PointsContainer;
- typedef itk::PolygonCell< CellType > TPolygonCell;
+ typedef itk::PolygonCell< CellType > TPolygonCell;
- public:
- itkNewMacro( Self );
- itkTypeMacro( WaveFrontOBJReader, itkMeshSource );
+ public:
+ itkNewMacro( Self );
+ itkTypeMacro( WaveFrontOBJReader, itkMeshSource );
- itkSetStringMacro( FileName );
- itkGetStringMacro( FileName );
+ itkSetStringMacro( FileName );
+ itkGetStringMacro( FileName );
- protected:
- WaveFrontOBJReader( );
- virtual ~WaveFrontOBJReader( );
+ protected:
+ WaveFrontOBJReader( );
+ virtual ~WaveFrontOBJReader( );
- virtual void GenerateData( );
+ virtual void GenerateData( );
- private:
- // Purposely not implemented
- WaveFrontOBJReader( const Self& );
- Self& operator=( const Self & );
+ private:
+ // Purposely not implemented
+ WaveFrontOBJReader( const Self& );
+ Self& operator=( const Self & );
- protected:
- std::string m_FileName;
- };
+ protected:
+ std::string m_FileName;
+ };
- } // ecapseman
+ } // ecapseman
} // ecapseman