19 #ifndef itkOBJMeshIO_h
20 #define itkOBJMeshIO_h
21 #include "ITKIOMeshOBJExport.h"
53 itkOverrideGetNameOfClassMacro(
OBJMeshIO);
63 CanReadFile(
const char * fileName)
override;
67 ReadMeshInformation()
override;
71 ReadPoints(
void * buffer)
override;
74 ReadCells(
void * buffer)
override;
77 ReadPointData(
void * buffer)
override;
80 ReadCellData(
void * buffer)
override;
90 CanWriteFile(
const char * fileName)
override;
94 WriteMeshInformation()
override;
99 WritePoints(
void * buffer)
override;
102 WriteCells(
void * buffer)
override;
105 WritePointData(
void * buffer)
override;
108 WriteCellData(
void * buffer)
override;
115 template <
typename T>
121 for (
SizeValueType ii = 0; ii < this->m_NumberOfPoints; ++ii)
124 for (
unsigned int jj = 0; jj < this->m_PointDimension; ++jj)
132 template <
typename T>
142 auto numberOfCellPoints = static_cast<unsigned int>(buffer[index++]);
144 for (
unsigned int jj = 0; jj < numberOfCellPoints; ++jj)
146 outputFile << buffer[index++] + 1 <<
" ";
153 template <
typename T>
159 for (
SizeValueType ii = 0; ii < this->m_NumberOfPointPixels; ++ii)
162 for (
unsigned int jj = 0; jj < this->m_PointDimension; ++jj)
172 SplitLine(
const std::string & line, std::string & type, std::string & content);
179 PrintSelf(std::ostream & os,
Indent indent)
const override;
188 std::ifstream m_InputFile{};
189 std::streampos m_PointsStartPosition{};