21#include "ITKIOMeshOFFExport.h"
117 template <
typename T>
122 unsigned int numberOfPoints = 0;
127 inputFile >> numberOfPoints;
128 buffer[index++] =
static_cast<T
>(numberOfPoints);
129 for (
unsigned int jj = 0; jj < numberOfPoints; ++jj)
131 inputFile >> buffer[index++];
133 std::getline(inputFile, line,
'\n');
140 template <
typename TInput,
typename TOutput>
151 auto numberOfPoints =
static_cast<unsigned int>(input[indInput++]);
152 output[indOutput++] =
static_cast<TOutput
>(numberOfPoints);
153 for (
unsigned int jj = 0; jj < numberOfPoints; ++jj)
155 output[indOutput++] =
static_cast<TOutput
>(input[indInput++]);
162 template <
typename T>
171 auto numberOfCellPoints =
static_cast<unsigned int>(buffer[index++]);
172 outputFile << numberOfCellPoints <<
" ";
174 for (
unsigned int jj = 0; jj < numberOfCellPoints; ++jj)
176 outputFile << buffer[index++] <<
" ";
183 template <
typename TOutput,
typename TInput>
Control indentation during Print() invocation.
void WriteBufferAsBinary(TInput *buffer, std::ofstream &outputFile, SizeValueType numberOfComponents)
SizeValueType m_CellBufferSize
IdentifierType SizeValueType
std::streamoff StreamOffsetType
SizeValueType m_NumberOfCells
void ReadPointData(void *buffer) override
bool CanWriteFile(const char *fileName) override
SmartPointer< Self > Pointer
void ReadCellsBuffer(TInput *input, TOutput *output)
void WriteCells(void *buffer) override
void WriteCellData(void *buffer) override
void ReadPoints(void *buffer) override
std::ifstream m_InputFile
void WriteCellsAsAscii(T *buffer, std::ofstream &outputFile)
Superclass::StreamOffsetType StreamOffsetType
Superclass::SizeValueType SizeValueType
void WriteCellsAsBinary(TInput *buffer, std::ofstream &outputFile)
void WriteMeshInformation() override
StreamOffsetType m_PointsStartPosition
SmartPointer< const Self > ConstPointer
void ReadCells(void *buffer) override
void WritePoints(void *buffer) override
void PrintSelf(std::ostream &os, Indent indent) const override
void ReadCellsBufferAsAscii(T *buffer, std::ifstream &inputFile)
void WritePointData(void *buffer) override
bool CanReadFile(const char *fileName) override
void ReadCellData(void *buffer) override
void ReadMeshInformation() override
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
auto make_unique_for_overwrite(const vcl_size_t numberOfElements)