ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches

#include <itkSTLMeshIO.h>

Detailed Description

This class defines how to read and write STL file format.

Author
Luis Ibanez, Kitware Inc.

Definition at line 38 of file itkSTLMeshIO.h.

+ Inheritance diagram for itk::STLMeshIO:
+ Collaboration diagram for itk::STLMeshIO:

Classes

struct  PointCompare
 
class  TripletType
 

Public Types

using ConstPointer = SmartPointer<const Self>
 
using Pointer = SmartPointer<Self>
 
using Self = STLMeshIO
 
using Superclass = MeshIOBase
 
- Public Types inherited from itk::MeshIOBase
using ArrayOfExtensionsType = std::vector<std::string>
 
using ConstPointer = SmartPointer<const Self>
 
using Pointer = SmartPointer<Self>
 
using Self = MeshIOBase
 
using SizeValueType = IdentifierType
 
using StreamOffsetType = std::streamoff
 
using Superclass = LightProcessObject
 
- Public Types inherited from itk::LightProcessObject
using ConstPointer = SmartPointer<const Self>
 
using Pointer = SmartPointer<Self>
 
using Self = LightProcessObject
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer<const Self>
 
using Pointer = SmartPointer<Self>
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer<const Self>
 
using Pointer = SmartPointer<Self>
 
using Self = LightObject
 

Public Member Functions

bool CanReadFile (const char *fileName) override
 
bool CanWriteFile (const char *fileName) override
 
virtual::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetNameOfClass () const
 
bool GetUpdateCells () const override
 
bool GetUpdatePoints () const override
 
virtual void Read ()
 
void ReadCellData (void *buffer) override
 
void ReadCells (void *buffer) override
 
void ReadMeshInformation () override
 
void ReadPointData (void *buffer) override
 
void ReadPoints (void *buffer) override
 
void Write () override
 
void WriteCellData (void *buffer) override
 
void WriteCells (void *buffer) override
 
void WriteMeshInformation () override
 
void WritePointData (void *buffer) override
 
void WritePoints (void *buffer) override
 
- Public Member Functions inherited from itk::MeshIOBase
std::string GetByteOrderAsString (IOByteOrderEnum) const
 
unsigned int GetComponentSize (IOComponentEnum componentType) const
 
std::string GetFileTypeAsString (IOFileEnum) const
 
const ArrayOfExtensionsType & GetSupportedReadExtensions () const
 
const ArrayOfExtensionsType & GetSupportedWriteExtensions () const
 
void SetByteOrderToBigEndian ()
 
void SetByteOrderToLittleEndian ()
 
void SetFileTypeToASCII ()
 
void SetFileTypeToBinary ()
 
template<typename T>
void SetPixelType (const Array< T > &array, bool usePointPixel=true)
 
template<typename T, unsigned int VLength>
void SetPixelType (const CovariantVector< T, VLength > &dummy, bool usePointPixel=true)
 
template<typename T>
void SetPixelType (const DiffusionTensor3D< T > &dummy, bool usePointPixel=true)
 
template<typename T, unsigned int VLength>
void SetPixelType (const FixedArray< T, VLength > &dummy, bool usePointPixel=true)
 
template<typename T, unsigned int VRows, unsigned int VColumns>
void SetPixelType (const Matrix< T, VRows, VColumns > &dummy, bool usePointPixel=true)
 
template<typename T>
void SetPixelType (const RGBAPixel< T > &dummy, bool usePointPixel=true)
 
template<typename T>
void SetPixelType (const RGBPixel< T > &dummy, bool usePointPixel=true)
 
template<typename T>
void SetPixelType (const std::complex< T > &dummy, bool usePointPixel=true)
 
template<typename T, unsigned int VLength>
void SetPixelType (const SymmetricSecondRankTensor< T, VLength > dummy, bool usePointPixel=true)
 
template<typename T>
void SetPixelType (const T &dummy, bool usePointPixel=true)
 
template<typename T>
void SetPixelType (const VariableLengthVector< T > &vector, bool usePointPixel=true)
 
template<typename T>
void SetPixelType (const VariableSizeMatrix< T > &matrix, bool usePointPixel=true)
 
template<typename T, unsigned int VLength>
void SetPixelType (const Vector< T, VLength > &dummy, bool usePointPixel=true)
 
virtual void SetFileName (const char *_arg)
 
virtual const char * GetFileName () const
 
virtual void SetPointPixelType (const itk::CommonEnums::IOPixel _arg)
 
virtual itk::CommonEnums::IOPixel GetPointPixelType () const
 
virtual void SetCellPixelType (const itk::CommonEnums::IOPixel _arg)
 
virtual itk::CommonEnums::IOPixel GetCellPixelType () const
 
virtual void SetPointComponentType (const itk::CommonEnums::IOComponent _arg)
 
virtual itk::CommonEnums::IOComponent GetPointComponentType () const
 
virtual void SetCellComponentType (const itk::CommonEnums::IOComponent _arg)
 
virtual itk::CommonEnums::IOComponent GetCellComponentType () const
 
virtual void SetPointPixelComponentType (const itk::CommonEnums::IOComponent _arg)
 
virtual itk::CommonEnums::IOComponent GetPointPixelComponentType () const
 
virtual void SetCellPixelComponentType (const itk::CommonEnums::IOComponent _arg)
 
virtual itk::CommonEnums::IOComponent GetCellPixelComponentType () const
 
virtual void SetNumberOfPointPixelComponents (unsigned int _arg)
 
virtual unsigned int GetNumberOfPointPixelComponents () const
 
virtual void SetNumberOfCellPixelComponents (unsigned int _arg)
 
virtual unsigned int GetNumberOfCellPixelComponents () const
 
virtual void SetPointDimension (unsigned int _arg)
 
virtual unsigned int GetPointDimension () const
 
virtual void SetNumberOfPoints (SizeValueType _arg)
 
virtual SizeValueType GetNumberOfPoints () const
 
virtual void SetNumberOfCells (SizeValueType _arg)
 
virtual SizeValueType GetNumberOfCells () const
 
virtual void SetNumberOfPointPixels (SizeValueType _arg)
 
virtual SizeValueType GetNumberOfPointPixels () const
 
virtual void SetNumberOfCellPixels (SizeValueType _arg)
 
virtual SizeValueType GetNumberOfCellPixels () const
 
virtual void SetCellBufferSize (SizeValueType _arg)
 
virtual SizeValueType GetCellBufferSize () const
 
virtual void SetUpdatePoints (bool _arg)
 
virtual void UpdatePointsOn ()
 
virtual void UpdatePointsOff ()
 
virtual void SetUpdateCells (bool _arg)
 
virtual void UpdateCellsOn ()
 
virtual void UpdateCellsOff ()
 
virtual void SetUpdatePointData (bool _arg)
 
virtual bool GetUpdatePointData () const
 
virtual void UpdatePointDataOn ()
 
virtual void UpdatePointDataOff ()
 
virtual void SetUpdateCellData (bool _arg)
 
virtual bool GetUpdateCellData () const
 
virtual void UpdateCellDataOn ()
 
virtual void UpdateCellDataOff ()
 
virtual void SetFileType (const IOFileEnum _arg)
 
virtual IOFileEnum GetFileType () const
 
virtual void SetByteOrder (const IOByteOrderEnum _arg)
 
virtual IOByteOrderEnum GetByteOrder () const
 
virtual void SetUseCompression (bool _arg)
 
virtual bool GetUseCompression () const
 
virtual void UseCompressionOn ()
 
virtual void UseCompressionOff ()
 
- Public Member Functions inherited from itk::LightProcessObject
virtual void AbortGenerateDataOff ()
 
virtual void AbortGenerateDataOn ()
 
virtual const bool & GetAbortGenerateData () const
 
virtual void SetAbortGenerateData (bool _arg)
 
virtual void UpdateOutputData ()
 
void UpdateProgress (float amount)
 
virtual void SetProgress (float _arg)
 
virtual const float & GetProgress () const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *cmd) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
Command * GetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionary & GetMetaDataDictionary ()
 
const MetaDataDictionary & GetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStamp & GetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag) const
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::MeshIOBase
static std::string GetComponentTypeAsString (IOComponentEnum)
 
static std::string GetPixelTypeAsString (IOPixelEnum)
 
- Static Public Member Functions inherited from itk::LightProcessObject
static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Protected Member Functions

void PrintSelf (std::ostream &os, Indent indent) const override
 
 STLMeshIO ()
 
template<typename TPointsBuffer>
void WritePointsTyped (const TPointsBuffer *const buffer)
 
 ~STLMeshIO () override=default
 
- Protected Member Functions inherited from itk::MeshIOBase
void AddSupportedReadExtension (const char *extension)
 
void AddSupportedWriteExtension (const char *extension)
 
 MeshIOBase ()
 
std::ifstream OpenInputFile () const
 
template<typename T>
void ReadBufferAsAscii (T *buffer, std::ifstream &inputFile, SizeValueType numberOfComponents)
 
template<typename T>
void ReadBufferAsBinary (T *buffer, std::ifstream &inputFile, SizeValueType numberOfComponents)
 
template<typename TInput, typename TOutput>
void ReadCellsBuffer (TInput *input, TOutput *output)
 
template<typename TInput, typename TOutput>
void ReadCellsBuffer (TInput *input, TOutput *output, CellGeometryEnum type)
 
template<typename T>
void WriteBufferAsAscii (T *buffer, std::ofstream &outputFile, SizeValueType numberOfLines, SizeValueType numberOfComponents)
 
template<typename TOutput, typename TInput>
void WriteBufferAsBinary (TInput *buffer, std::ofstream &outputFile, SizeValueType numberOfComponents)
 
template<typename TInput, typename TOutput>
void WriteCellsBuffer (TInput *input, TOutput *output, CellGeometryEnum cellType, SizeValueType numberOfCells)
 
template<typename TInput, typename TOutput>
void WriteCellsBuffer (TInput *input, TOutput *output, CellGeometryEnum cellType, unsigned int numberOfPoints, SizeValueType numberOfCells)
 
 ~MeshIOBase () override=default
 
- Protected Member Functions inherited from itk::LightProcessObject
virtual void GenerateData ()
 
 LightProcessObject ()
 
 ~LightProcessObject () override
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
 ~Object () override
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Types

using CellsVectorType = std::vector<TripletType>
 
using NormalType = CovariantVector<PointValueType, 3>
 
using PointContainerType = std::vector<PointType>
 
using PointsMapType = std::map<PointType, IdentifierType, PointCompare>
 
using PointType = Point<PointValueType, 3>
 
using PointValueType = float
 
using VectorType = Vector<PointValueType, 3>
 

Private Member Functions

bool CheckStringFromAscii (const std::string &expected)
 
void InsertPointIntoSet (const PointType &point)
 
void ReadInt16AsBinary (int16_t &value)
 
void ReadInt32AsBinary (int32_t &value)
 
void ReadMeshInternalFromAscii ()
 
void ReadMeshInternalFromBinary ()
 
void ReadNormalAsBinary (NormalType &normal)
 
void ReadPointAsAscii (PointType &point)
 
void ReadPointAsBinary (PointType &point)
 
void ReadStringFromAscii (const std::string &expected)
 
void ReadUInt32AsBinary (uint32_t &value)
 
virtual void WriteCellsAsAscii (void *buffer)
 
virtual void WriteCellsAsBinary (void *buffer)
 
void WriteInt16AsBinary (int16_t value)
 
void WriteInt32AsBinary (int32_t value)
 
void WriteNormalAsBinary (const NormalType &normal)
 
void WritePointAsBinary (const PointType &point)
 
void WriteUInt32AsBinary (uint32_t value)
 

Private Attributes

CellsVectorType m_CellsVector
 
std::string m_InputLine
 
unsigned int m_InputLineNumber
 
std::ifstream m_InputStream
 
IdentifierType m_LatestPointId
 
std::ofstream m_OutputStream
 
unsigned int m_PointInTriangleCounter
 
PointContainerType m_Points
 
PointsMapType m_PointsMap
 
TripletType m_TrianglePointIds
 

Additional Inherited Members

- Protected Attributes inherited from itk::MeshIOBase
IOByteOrderEnum m_ByteOrder { IOByteOrderEnum::OrderNotApplicable }
 
SizeValueType m_CellBufferSize {}
 
IOComponentEnum m_CellComponentType { IOComponentEnum::UNKNOWNCOMPONENTTYPE }
 
IOComponentEnum m_CellPixelComponentType { IOComponentEnum::UNKNOWNCOMPONENTTYPE }
 
IOPixelEnum m_CellPixelType { IOPixelEnum::SCALAR }
 
std::string m_FileName {}
 
IOFileEnum m_FileType { IOFileEnum::ASCII }
 
unsigned int m_NumberOfCellPixelComponents { 0 }
 
SizeValueType m_NumberOfCellPixels {}
 
SizeValueType m_NumberOfCells {}
 
unsigned int m_NumberOfPointPixelComponents { 0 }
 
SizeValueType m_NumberOfPointPixels {}
 
SizeValueType m_NumberOfPoints {}
 
IOComponentEnum m_PointComponentType { IOComponentEnum::UNKNOWNCOMPONENTTYPE }
 
unsigned int m_PointDimension { 3 }
 
IOComponentEnum m_PointPixelComponentType { IOComponentEnum::UNKNOWNCOMPONENTTYPE }
 
IOPixelEnum m_PointPixelType { IOPixelEnum::SCALAR }
 
bool m_UpdateCellData { false }
 
bool m_UpdateCells { false }
 
bool m_UpdatePointData { false }
 
bool m_UpdatePoints { false }
 
bool m_UseCompression { false }
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount {}
 

Member Typedef Documentation

◆ CellsVectorType

using itk::STLMeshIO::CellsVectorType = std::vector<TripletType>
private

Definition at line 295 of file itkSTLMeshIO.h.

◆ ConstPointer

Definition at line 47 of file itkSTLMeshIO.h.

◆ NormalType

Definition at line 199 of file itkSTLMeshIO.h.

◆ PointContainerType

using itk::STLMeshIO::PointContainerType = std::vector<PointType>
private

Definition at line 201 of file itkSTLMeshIO.h.

◆ Pointer

Definition at line 46 of file itkSTLMeshIO.h.

◆ PointsMapType

Definition at line 276 of file itkSTLMeshIO.h.

◆ PointType

Definition at line 197 of file itkSTLMeshIO.h.

◆ PointValueType

using itk::STLMeshIO::PointValueType = float
private

Definition at line 195 of file itkSTLMeshIO.h.

◆ Self

Standard "Self" type alias.

Definition at line 44 of file itkSTLMeshIO.h.

◆ Superclass

Definition at line 45 of file itkSTLMeshIO.h.

◆ VectorType

Definition at line 198 of file itkSTLMeshIO.h.

Constructor & Destructor Documentation

◆ STLMeshIO()

itk::STLMeshIO::STLMeshIO ( )
protected

Referenced by GetNameOfClass().

◆ ~STLMeshIO()

itk::STLMeshIO::~STLMeshIO ( )
overrideprotecteddefault

Member Function Documentation

◆ CanReadFile()

bool itk::STLMeshIO::CanReadFile ( const char * fileName)
overridevirtual

-----— This part of the interfaces deals with reading data. --— Determine if the file can be read with this MeshIO implementation.

Parameters
fileNameThe name of the file to test for reading.
Postcondition
Sets classes MeshIOBase::m_FileName variable to be fileName
Returns
Returns true if this MeshIO can read the file specified.

Implements itk::MeshIOBase.

◆ CanWriteFile()

bool itk::STLMeshIO::CanWriteFile ( const char * fileName)
overridevirtual

Determine if the file can be written with this MeshIO implementation.

Parameters
fileNameThe name of the file to test for writing.
Postcondition
Sets classes MeshIOBase::m_FileName variable to be fileName
Returns
Returns true if this MeshIO can write the file specified.

Implements itk::MeshIOBase.

◆ CheckStringFromAscii()

bool itk::STLMeshIO::CheckStringFromAscii ( const std::string & expected)
private

◆ CreateAnother()

virtual::itk::LightObject::Pointer itk::STLMeshIO::CreateAnother ( ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::LightProcessObject.

◆ GetNameOfClass()

virtual const char * itk::STLMeshIO::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::MeshIOBase.

References STLMeshIO().

◆ GetUpdateCells()

bool itk::STLMeshIO::GetUpdateCells ( ) const
overridevirtual

Indicates whether ReadCells() should be called.

Reimplemented from itk::MeshIOBase.

◆ GetUpdatePoints()

bool itk::STLMeshIO::GetUpdatePoints ( ) const
overridevirtual

Indicates whether ReadPoints() should be called.

Reimplemented from itk::MeshIOBase.

◆ InsertPointIntoSet()

void itk::STLMeshIO::InsertPointIntoSet ( const PointType & point)
private

Functions to create set of points and disambiguate them.

◆ New()

static Pointer itk::STLMeshIO::New ( )
static

Method for creation through the object factory.

◆ PrintSelf()

void itk::STLMeshIO::PrintSelf ( std::ostream & os,
Indent indent ) const
overrideprotectedvirtual

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from itk::MeshIOBase.

◆ Read()

virtual void itk::STLMeshIO::Read ( )
virtual

Read the content of the file into a Mesh.

◆ ReadCellData()

void itk::STLMeshIO::ReadCellData ( void * buffer)
inlineoverridevirtual

Implements itk::MeshIOBase.

Definition at line 95 of file itkSTLMeshIO.h.

◆ ReadCells()

void itk::STLMeshIO::ReadCells ( void * buffer)
overridevirtual

Stores the cell data into the memory buffer provided.

Implements itk::MeshIOBase.

◆ ReadInt16AsBinary()

void itk::STLMeshIO::ReadInt16AsBinary ( int16_t & value)
private

◆ ReadInt32AsBinary()

void itk::STLMeshIO::ReadInt32AsBinary ( int32_t & value)
private

Helper functions to read elements from binary file

◆ ReadMeshInformation()

void itk::STLMeshIO::ReadMeshInformation ( )
overridevirtual

Set the spacing and dimension information for the set filename.

Implements itk::MeshIOBase.

◆ ReadMeshInternalFromAscii()

void itk::STLMeshIO::ReadMeshInternalFromAscii ( )
private

Helper functions to read elements from ASCII and BINARY files.

◆ ReadMeshInternalFromBinary()

void itk::STLMeshIO::ReadMeshInternalFromBinary ( )
private

◆ ReadNormalAsBinary()

void itk::STLMeshIO::ReadNormalAsBinary ( NormalType & normal)
private

◆ ReadPointAsAscii()

void itk::STLMeshIO::ReadPointAsAscii ( PointType & point)
private

◆ ReadPointAsBinary()

void itk::STLMeshIO::ReadPointAsBinary ( PointType & point)
private

◆ ReadPointData()

void itk::STLMeshIO::ReadPointData ( void * buffer)
inlineoverridevirtual

STL files do not carry information in points or cells. Therefore the following two methods are implemented as null operations.

Implements itk::MeshIOBase.

Definition at line 93 of file itkSTLMeshIO.h.

◆ ReadPoints()

void itk::STLMeshIO::ReadPoints ( void * buffer)
overridevirtual

Stores the point data into the memory buffer provided.

Implements itk::MeshIOBase.

◆ ReadStringFromAscii()

void itk::STLMeshIO::ReadStringFromAscii ( const std::string & expected)
private

Helper functions to read elements from ASCII files.

◆ ReadUInt32AsBinary()

void itk::STLMeshIO::ReadUInt32AsBinary ( uint32_t & value)
private

◆ Write()

void itk::STLMeshIO::Write ( )
overridevirtual

Write the content of the Mesh into an STL file.

Implements itk::MeshIOBase.

◆ WriteCellData()

void itk::STLMeshIO::WriteCellData ( void * buffer)
inlineoverridevirtual

Implements itk::MeshIOBase.

Definition at line 148 of file itkSTLMeshIO.h.

◆ WriteCells()

void itk::STLMeshIO::WriteCells ( void * buffer)
overridevirtual

The WriteCells() method does most of the work. It writes out every triangle in the mesh. For every triangle, it writes out its normal, followed by the coordinates of its three vertices.

A typical cell looks as follows in an ASCII STL file

   facet normal 0.357406 0.862856 0.357406
    outer loop
     vertex 0 1 0
     vertex 0 0.707107 0.707107
     vertex 0.707107 0.707107 0
    endloop
   endfacet

Implements itk::MeshIOBase.

◆ WriteCellsAsAscii()

virtual void itk::STLMeshIO::WriteCellsAsAscii ( void * buffer)
privatevirtual

Helper function to write cells as ASCII or BINARY.

◆ WriteCellsAsBinary()

virtual void itk::STLMeshIO::WriteCellsAsBinary ( void * buffer)
privatevirtual

◆ WriteInt16AsBinary()

void itk::STLMeshIO::WriteInt16AsBinary ( int16_t value)
private

◆ WriteInt32AsBinary()

void itk::STLMeshIO::WriteInt32AsBinary ( int32_t value)
private

Helper functions to write elements to binary file

◆ WriteMeshInformation()

void itk::STLMeshIO::WriteMeshInformation ( )
overridevirtual

Write header of the STL file

Implements itk::MeshIOBase.

◆ WriteNormalAsBinary()

void itk::STLMeshIO::WriteNormalAsBinary ( const NormalType & normal)
private

◆ WritePointAsBinary()

void itk::STLMeshIO::WritePointAsBinary ( const PointType & point)
private

◆ WritePointData()

void itk::STLMeshIO::WritePointData ( void * buffer)
inlineoverridevirtual

STL files do not carry information in points or cells. Therefore the following two methods are implemented as null operations.

Implements itk::MeshIOBase.

Definition at line 146 of file itkSTLMeshIO.h.

◆ WritePoints()

void itk::STLMeshIO::WritePoints ( void * buffer)
overridevirtual

The STL format stores point coordinates repeatedly as part of every triangle. Therefore point coordinates are writen as part of the WriteCells() method, and not as an independent operation. Consequently, this method only performs an internal copy of the Point coordinates data, than then is used in the WriteCells() method.

Implements itk::MeshIOBase.

◆ WritePointsTyped()

template<typename TPointsBuffer>
void itk::STLMeshIO::WritePointsTyped ( const TPointsBuffer *const buffer)
inlineprotected

Templated version of write points method, that is aware of the specific type used to represent the point coordinates.

Definition at line 161 of file itkSTLMeshIO.h.

References itk::MeshIOBase::GetNumberOfPoints(), itk::MeshIOBase::GetPointDimension(), and m_Points.

◆ WriteUInt32AsBinary()

void itk::STLMeshIO::WriteUInt32AsBinary ( uint32_t value)
private

Member Data Documentation

◆ m_CellsVector

CellsVectorType itk::STLMeshIO::m_CellsVector
private

Definition at line 296 of file itkSTLMeshIO.h.

◆ m_InputLine

std::string itk::STLMeshIO::m_InputLine
private

Definition at line 193 of file itkSTLMeshIO.h.

◆ m_InputLineNumber

unsigned int itk::STLMeshIO::m_InputLineNumber
private

Definition at line 253 of file itkSTLMeshIO.h.

◆ m_InputStream

std::ifstream itk::STLMeshIO::m_InputStream
private

Definition at line 191 of file itkSTLMeshIO.h.

◆ m_LatestPointId

IdentifierType itk::STLMeshIO::m_LatestPointId
private

Definition at line 281 of file itkSTLMeshIO.h.

◆ m_OutputStream

std::ofstream itk::STLMeshIO::m_OutputStream
private

Definition at line 190 of file itkSTLMeshIO.h.

◆ m_PointInTriangleCounter

unsigned int itk::STLMeshIO::m_PointInTriangleCounter
private

Definition at line 293 of file itkSTLMeshIO.h.

◆ m_Points

PointContainerType itk::STLMeshIO::m_Points
private

Definition at line 251 of file itkSTLMeshIO.h.

Referenced by WritePointsTyped().

◆ m_PointsMap

PointsMapType itk::STLMeshIO::m_PointsMap
private

Definition at line 278 of file itkSTLMeshIO.h.

◆ m_TrianglePointIds

TripletType itk::STLMeshIO::m_TrianglePointIds
private

Definition at line 292 of file itkSTLMeshIO.h.


The documentation for this class was generated from the following file: