19 #ifndef __itkBYUMeshIO_h
20 #define __itkBYUMeshIO_h
21 #include "ITKIOMeshExport.h"
62 virtual bool CanReadFile(
const char *FileNameToRead);
65 virtual void ReadMeshInformation();
68 virtual void ReadPoints(
void *buffer);
70 virtual void ReadCells(
void *buffer);
72 virtual void ReadPointData(
void *buffer);
74 virtual void ReadCellData(
void *buffer);
83 virtual bool CanWriteFile(
const char *FileNameToWrite);
86 virtual void WriteMeshInformation();
89 virtual void WritePoints(
void *buffer);
91 virtual void WriteCells(
void *buffer);
93 virtual void WritePointData(
void *buffer);
95 virtual void WriteCellData(
void *buffer);
101 template<
typename T >
109 for(
SizeValueType ii = 0; ii < this->m_NumberOfPoints; ii++ )
111 outputFile << indent;
112 for(
unsigned int jj = 0; jj < this->m_PointDimension; jj++ )
114 outputFile << convert(buffer[index++]) <<
" ";
120 template<
typename T >
126 for(
SizeValueType ii = 0; ii < this->m_NumberOfCells; ii++ )
128 unsigned int numberOfCellPoints =
static_cast< unsigned int >( buffer[++index] );
130 for (
unsigned int jj = 0; jj < numberOfCellPoints - 1; jj++ )
132 outputFile << indent << buffer[index++] + 1;
135 outputFile << indent << -
static_cast<long long>( buffer[index++] + 1 ) <<
'\n';
143 void PrintSelf(std::ostream & os,
Indent indent)
const;
147 void operator=(
const Self &);
void WriteCells(T *buffer, std::ofstream &outputFile)
Light weight base class for most itk classes.
SizeValueType m_LastCellId
std::streamoff StreamOffsetType
void WritePoints(T *buffer, std::ofstream &outputFile)
Superclass::StreamOffsetType StreamOffsetType
IdentifierType SizeValueType
Convert floating and fixed point numbers to strings.
SmartPointer< Self > Pointer
Superclass::SizeValueType SizeValueType
SizeValueType m_FirstCellId
SmartPointer< const Self > ConstPointer
Control indentation during Print() invocation.
Abstract superclass defines mesh IO interface.
StreamOffsetType m_FilePosition
Define additional traits for native types such as int or float.
This class defines how to read and write BYU Geometry File Format.