21#include "IOMeshSTLExport.h"
159 template <
typename TPo
intsBuffer>
166 if (pointDimension != 3)
168 itkExceptionMacro(
"STL only supports 3D points");
171 const TPointsBuffer * pointCoordinates = buffer;
177 this->
m_Points.resize(numberOfPoints);
181 for (
unsigned int i = 0; i < pointDimension; ++i)
262 return p1[0] < p2[0];
268 return p1[1] < p2[1];
272 return p1[2] < p2[2];
A templated class holding a n-Dimensional covariant vector.
Control indentation during Print() invocation.
virtual unsigned int GetPointDimension() const
virtual SizeValueType GetNumberOfPoints() const
A templated class holding a geometric point in n-Dimensional space.
void ReadPointData(void *buffer) override
void PrintSelf(std::ostream &os, Indent indent) const override
std::map< PointType, IdentifierType, PointCompare > PointsMapType
virtual void WriteCellsAsAscii(void *buffer)
void ReadPointAsAscii(PointType &point)
void WriteUInt32AsBinary(uint32_t value)
bool CheckStringFromAscii(const std::string &expected)
void WriteCellData(void *buffer) override
PointContainerType m_Points
void WriteCells(void *buffer) override
std::ifstream m_InputStream
void ReadMeshInternalFromBinary()
void WriteMeshInformation() override
void ReadCellData(void *buffer) override
SmartPointer< const Self > ConstPointer
Vector< PointValueType, 3 > VectorType
SmartPointer< Self > Pointer
void InsertPointIntoSet(const PointType &point)
void ReadPointAsBinary(PointType &point)
void WritePointsTyped(const TPointsBuffer *const buffer)
std::ofstream m_OutputStream
unsigned int m_InputLineNumber
void WriteInt32AsBinary(int32_t value)
CellsVectorType m_CellsVector
bool GetUpdateCells() const override
~STLMeshIO() override=default
std::vector< TripletType > CellsVectorType
Point< PointValueType, 3 > PointType
void ReadUInt32AsBinary(uint32_t &value)
void ReadStringFromAscii(const std::string &expected)
void WriteInt16AsBinary(int16_t value)
CovariantVector< PointValueType, 3 > NormalType
void ReadCells(void *buffer) override
TripletType m_TrianglePointIds
bool CanReadFile(const char *fileName) override
IdentifierType m_LatestPointId
bool CanWriteFile(const char *fileName) override
void ReadPoints(void *buffer) override
void WritePoints(void *buffer) override
void ReadMeshInformation() override
void ReadInt16AsBinary(int16_t &value)
void ReadMeshInternalFromAscii()
unsigned int m_PointInTriangleCounter
void WriteNormalAsBinary(const NormalType &normal)
void WritePointData(void *buffer) override
void ReadInt32AsBinary(int32_t &value)
void WritePointAsBinary(const PointType &point)
virtual void WriteCellsAsBinary(void *buffer)
void ReadNormalAsBinary(NormalType &normal)
std::vector< PointType > PointContainerType
bool GetUpdatePoints() const override
PointsMapType m_PointsMap
Implements transparent reference counting.
A templated class holding a n-Dimensional vector.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
SizeValueType IdentifierType
bool operator()(const PointType &p1, const PointType &p2) const