ITK  6.0.0
Insight Toolkit
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members

#include <itkMeshIOBase.h>

Detailed Description

Abstract superclass defines mesh IO interface.

MeshIOBase is a class that reads and/or writes Mesh / QuadEdgeMesh data of a particular format (such as PNG or raw binary). The MeshIOBase encapsulates both the reading and writing of data. The MeshIOBase is used by the MeshFileReader class (to read data) and the MeshFileWriter (to write data) into a single file. Normally the user does not directly manipulate this class other than to instantiate it, set the FileName, and assign it to a MeshFileReader or MeshFileWriter.

A Pluggable factory pattern is used this allows different kinds of readers to be registered (even at run time) without having to modify the code in this class.

Author
Wanlin Zhu. University of New South Wales, Australia.
See also
MeshFileWriter
MeshFileReader

Definition at line 72 of file itkMeshIOBase.h.

+ Inheritance diagram for itk::MeshIOBase:
+ Collaboration diagram for itk::MeshIOBase:

Classes

struct  MapComponentType
 
class  UnknownType
 

Public Types

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

virtual bool CanReadFile (const char *)=0
 
virtual bool CanWriteFile (const char *)=0
 
std::string GetByteOrderAsString (IOByteOrderEnum) const
 
unsigned int GetComponentSize (IOComponentEnum componentType) const
 
std::string GetComponentTypeAsString (IOComponentEnum) const
 
std::string GetFileTypeAsString (IOFileEnum) const
 
const char * GetNameOfClass () const override
 
std::string GetPixelTypeAsString (IOPixelEnum) const
 
const ArrayOfExtensionsTypeGetSupportedReadExtensions () const
 
const ArrayOfExtensionsTypeGetSupportedWriteExtensions () const
 
virtual void ReadCellData (void *buffer)=0
 
virtual void ReadCells (void *buffer)=0
 
virtual void ReadMeshInformation ()=0
 
virtual void ReadPointData (void *buffer)=0
 
virtual void ReadPoints (void *buffer)=0
 
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 > &, bool usePointPixel=true)
 
template<typename T >
void SetPixelType (const DiffusionTensor3D< T > &, bool usePointPixel=true)
 
template<typename T , unsigned int VLength>
void SetPixelType (const FixedArray< T, VLength > &, bool usePointPixel=true)
 
template<typename T , unsigned int VRows, unsigned int VColumns>
void SetPixelType (const Matrix< T, VRows, VColumns > &, bool usePointPixel=true)
 
template<typename T >
void SetPixelType (const RGBAPixel< T > &, bool usePointPixel=true)
 
template<typename T >
void SetPixelType (const RGBPixel< T > &, bool usePointPixel=true)
 
template<typename T >
void SetPixelType (const std::complex< T > &, bool usePointPixel=true)
 
template<typename T , unsigned int VLength>
void SetPixelType (const SymmetricSecondRankTensor< T, VLength >, bool usePointPixel=true)
 
template<typename T >
void SetPixelType (const T &, 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 > &, bool usePointPixel=true)
 
virtual void Write ()=0
 
virtual void WriteCellData (void *buffer)=0
 
virtual void WriteCells (void *buffer)=0
 
virtual void WriteMeshInformation ()=0
 
virtual void WritePointData (void *buffer)=0
 
virtual void WritePoints (void *buffer)=0
 
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 bool GetUpdatePoints () const
 
virtual void UpdatePointsOn ()
 
virtual void SetUpdateCells (bool _arg)
 
virtual bool GetUpdateCells () const
 
virtual void UpdateCellsOn ()
 
virtual void SetUpdatePointData (bool _arg)
 
virtual bool GetUpdatePointData () const
 
virtual void UpdatePointDataOn ()
 
virtual void SetUpdateCellData (bool _arg)
 
virtual bool GetUpdateCellData () const
 
virtual void UpdateCellDataOn ()
 
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 ()
 
- Public Member Functions inherited from itk::LightProcessObject
virtual void AbortGenerateDataOn ()
 
virtual const bool & GetAbortGenerateData () const
 
const char * GetNameOfClass () const override
 
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
 
LightObject::Pointer CreateAnother () const override
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
const char * GetNameOfClass () const override
 
virtual const TimeStampGetTimeStamp () 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 Pointer CreateAnother () const
 
virtual void Delete ()
 
virtual const char * GetNameOfClass () const
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 
virtual void Register () const
 
virtual void SetReferenceCount (int)
 
virtual void UnRegister () const noexcept
 

Protected Member Functions

void AddSupportedReadExtension (const char *extension)
 
void AddSupportedWriteExtension (const char *extension)
 
 MeshIOBase ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
template<typename T >
void ReadBufferAsBinary (T *buffer, std::ifstream &inputFile, SizeValueType numberOfComponents)
 
 ~MeshIOBase () override=default
 
template<typename T >
void ReadBufferAsAscii (T *buffer, std::ifstream &inputFile, SizeValueType numberOfComponents)
 
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 ReadCellsBuffer (TInput *input, TOutput *output)
 
template<typename TInput , typename TOutput >
void ReadCellsBuffer (TInput *input, TOutput *output, CellGeometryEnum type)
 
template<typename TInput , typename TOutput >
void WriteCellsBuffer (TInput *input, TOutput *output, CellGeometryEnum cellType, unsigned int numberOfPoints, SizeValueType numberOfCells)
 
template<typename TInput , typename TOutput >
void WriteCellsBuffer (TInput *input, TOutput *output, CellGeometryEnum cellType, SizeValueType numberOfCells)
 
- Protected Member Functions inherited from itk::LightProcessObject
virtual void GenerateData ()
 
 LightProcessObject ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~LightProcessObject () override
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
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 PrintSelf (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Protected Attributes

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 {}
 

Private Attributes

ArrayOfExtensionsType m_SupportedReadExtensions {}
 
ArrayOfExtensionsType m_SupportedWriteExtensions {}
 

Additional Inherited Members

- 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 ()
 

Member Typedef Documentation

◆ ArrayOfExtensionsType

using itk::MeshIOBase::ArrayOfExtensionsType = std::vector<std::string>

Type for the list of strings to be used for extensions.

Definition at line 84 of file itkMeshIOBase.h.

◆ ConstPointer

Definition at line 80 of file itkMeshIOBase.h.

◆ Pointer

Definition at line 81 of file itkMeshIOBase.h.

◆ Self

Standard class type aliases.

Definition at line 78 of file itkMeshIOBase.h.

◆ SizeValueType

Definition at line 89 of file itkMeshIOBase.h.

◆ StreamOffsetType

using itk::MeshIOBase::StreamOffsetType = std::streamoff

Type for representing size of bytes, and or positions along a file

Definition at line 87 of file itkMeshIOBase.h.

◆ Superclass

Definition at line 79 of file itkMeshIOBase.h.

Constructor & Destructor Documentation

◆ MeshIOBase()

itk::MeshIOBase::MeshIOBase ( )
protected

◆ ~MeshIOBase()

itk::MeshIOBase::~MeshIOBase ( )
overrideprotecteddefault

Member Function Documentation

◆ AddSupportedReadExtension()

void itk::MeshIOBase::AddSupportedReadExtension ( const char *  extension)
protected

Insert an extension to the list of supported extensions for reading.

◆ AddSupportedWriteExtension()

void itk::MeshIOBase::AddSupportedWriteExtension ( const char *  extension)
protected

Insert an extension to the list of supported extensions for writing.

◆ CanReadFile()

virtual bool itk::MeshIOBase::CanReadFile ( const char *  )
pure virtual

Determine the file type. Returns true if this MeshIO can read the file specified.

Implemented in itk::BYUMeshIO, itk::FreeSurferAsciiMeshIO, itk::FreeSurferBinaryMeshIO, itk::GiftiMeshIO, itk::OBJMeshIO, itk::OFFMeshIO, and itk::VTKPolyDataMeshIO.

◆ CanWriteFile()

virtual bool itk::MeshIOBase::CanWriteFile ( const char *  )
pure virtual

Writes the data to disk from the memory buffer provided. Make sure that the IORegions has been set properly.

Implemented in itk::BYUMeshIO, itk::FreeSurferAsciiMeshIO, itk::FreeSurferBinaryMeshIO, itk::GiftiMeshIO, itk::OBJMeshIO, itk::OFFMeshIO, and itk::VTKPolyDataMeshIO.

◆ GetByteOrder()

virtual IOByteOrderEnum itk::MeshIOBase::GetByteOrder ( ) const
virtual

These methods indicate the byte ordering of the file you are trying to read in. These methods will then either swap or not swap the bytes depending on the byte ordering of the machine it is being run on. For example, reading in a BigEndian file on a BigEndian machine will result in no swapping. Trying to read the same file on a LittleEndian machine will result in swapping. Note: most UNIX machines are BigEndian while PC's and VAX's are LittleEndian. So if the file you are reading in was generated on a VAX or PC, SetByteOrderToLittleEndian() otherwise SetByteOrderToBigEndian(). Some MeshIOBase subclasses ignore these methods.

◆ GetByteOrderAsString()

std::string itk::MeshIOBase::GetByteOrderAsString ( IOByteOrderEnum  ) const

Convenience method returns the IOByteOrderEnum as a string. This can be used for writing output files.

◆ GetCellBufferSize()

virtual SizeValueType itk::MeshIOBase::GetCellBufferSize ( ) const
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ GetCellComponentType()

virtual itk::CommonEnums::IOComponent itk::MeshIOBase::GetCellComponentType ( ) const
virtual

Set/Get the component type of the point, cell, point data and cell data. This is always a native type.

◆ GetCellPixelComponentType()

virtual itk::CommonEnums::IOComponent itk::MeshIOBase::GetCellPixelComponentType ( ) const
virtual

Set/Get the component type of the point, cell, point data and cell data. This is always a native type.

◆ GetCellPixelType()

virtual itk::CommonEnums::IOPixel itk::MeshIOBase::GetCellPixelType ( ) const
virtual

Set/Get the type of the point/cell pixel. The PixelTypes provides context to the IO mechanisms for data conversions. PixelTypes can be SCALAR, RGB, RGBA, VECTOR, COVARIANTVECTOR, POINT, INDEX. If the PIXELTYPE is SCALAR, then the NumberOfComponents should be 1. Any other of PIXELTYPE will have more than one component.

◆ GetComponentSize()

unsigned int itk::MeshIOBase::GetComponentSize ( IOComponentEnum  componentType) const

◆ GetComponentTypeAsString()

std::string itk::MeshIOBase::GetComponentTypeAsString ( IOComponentEnum  ) const

Convenience method returns the IOComponentEnum as a string. This can be used for writing output files.

◆ GetFileName()

virtual const char * itk::MeshIOBase::GetFileName ( ) const
virtual

Set/Get the name of the file to be read.

◆ GetFileType()

virtual IOFileEnum itk::MeshIOBase::GetFileType ( ) const
virtual

These methods control whether the file is written binary or ASCII. Many file formats (i.e., subclasses) ignore this flag.

◆ GetFileTypeAsString()

std::string itk::MeshIOBase::GetFileTypeAsString ( IOFileEnum  ) const

Convenience method returns the IOFileEnum as a string. This can be used for writing output files.

◆ GetNameOfClass()

const char * itk::MeshIOBase::GetNameOfClass ( ) const
overridevirtual

◆ GetNumberOfCellPixelComponents()

virtual unsigned int itk::MeshIOBase::GetNumberOfCellPixelComponents ( ) const
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ GetNumberOfCellPixels()

virtual SizeValueType itk::MeshIOBase::GetNumberOfCellPixels ( ) const
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ GetNumberOfCells()

virtual SizeValueType itk::MeshIOBase::GetNumberOfCells ( ) const
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ GetNumberOfPointPixelComponents()

virtual unsigned int itk::MeshIOBase::GetNumberOfPointPixelComponents ( ) const
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ GetNumberOfPointPixels()

virtual SizeValueType itk::MeshIOBase::GetNumberOfPointPixels ( ) const
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ GetNumberOfPoints()

virtual SizeValueType itk::MeshIOBase::GetNumberOfPoints ( ) const
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ GetPixelTypeAsString()

std::string itk::MeshIOBase::GetPixelTypeAsString ( IOPixelEnum  ) const

Convenience method returns the IOPixelEnum as a string. This can be used for writing output files.

◆ GetPointComponentType()

virtual itk::CommonEnums::IOComponent itk::MeshIOBase::GetPointComponentType ( ) const
virtual

Set/Get the component type of the point, cell, point data and cell data. This is always a native type.

◆ GetPointDimension()

virtual unsigned int itk::MeshIOBase::GetPointDimension ( ) const
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ GetPointPixelComponentType()

virtual itk::CommonEnums::IOComponent itk::MeshIOBase::GetPointPixelComponentType ( ) const
virtual

Set/Get the component type of the point, cell, point data and cell data. This is always a native type.

◆ GetPointPixelType()

virtual itk::CommonEnums::IOPixel itk::MeshIOBase::GetPointPixelType ( ) const
virtual

Set/Get the type of the point/cell pixel. The PixelTypes provides context to the IO mechanisms for data conversions. PixelTypes can be SCALAR, RGB, RGBA, VECTOR, COVARIANTVECTOR, POINT, INDEX. If the PIXELTYPE is SCALAR, then the NumberOfComponents should be 1. Any other of PIXELTYPE will have more than one component.

◆ GetSupportedReadExtensions()

const ArrayOfExtensionsType & itk::MeshIOBase::GetSupportedReadExtensions ( ) const

This method returns an array with the list of filename extensions supported for reading by this MeshIO class. This is intended to facilitate GUI and application level integration.

◆ GetSupportedWriteExtensions()

const ArrayOfExtensionsType & itk::MeshIOBase::GetSupportedWriteExtensions ( ) const

This method returns an array with the list of filename extensions supported for writing by this MeshIO class. This is intended to facilitate GUI and application level integration.

◆ GetUpdateCellData()

virtual bool itk::MeshIOBase::GetUpdateCellData ( ) const
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ GetUpdateCells()

virtual bool itk::MeshIOBase::GetUpdateCells ( ) const
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ GetUpdatePointData()

virtual bool itk::MeshIOBase::GetUpdatePointData ( ) const
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ GetUpdatePoints()

virtual bool itk::MeshIOBase::GetUpdatePoints ( ) const
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ GetUseCompression()

virtual bool itk::MeshIOBase::GetUseCompression ( ) const
virtual

Set/Get a boolean to use the compression or not.

◆ PrintSelf()

void itk::MeshIOBase::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::LightProcessObject.

Reimplemented in itk::BYUMeshIO, itk::FreeSurferAsciiMeshIO, itk::FreeSurferBinaryMeshIO, itk::GiftiMeshIO, itk::OBJMeshIO, itk::OFFMeshIO, and itk::VTKPolyDataMeshIO.

◆ ReadBufferAsAscii()

template<typename T >
void itk::MeshIOBase::ReadBufferAsAscii ( T *  buffer,
std::ifstream &  inputFile,
SizeValueType  numberOfComponents 
)
inlineprotected

Read data from input file stream to buffer with ascii style

Definition at line 628 of file itkMeshIOBase.h.

◆ ReadBufferAsBinary()

template<typename T >
void itk::MeshIOBase::ReadBufferAsBinary ( T *  buffer,
std::ifstream &  inputFile,
SizeValueType  numberOfComponents 
)
inlineprotected

◆ ReadCellData()

virtual void itk::MeshIOBase::ReadCellData ( void *  buffer)
pure virtual

◆ ReadCells()

virtual void itk::MeshIOBase::ReadCells ( void *  buffer)
pure virtual

◆ ReadCellsBuffer() [1/2]

template<typename TInput , typename TOutput >
void itk::MeshIOBase::ReadCellsBuffer ( TInput *  input,
TOutput *  output 
)
inlineprotected

Read cells from a data buffer, used when writing cells. This function write all kind of cells as it is stored in cells container. It is used when cells container have only one kind of cells

Definition at line 724 of file itkMeshIOBase.h.

◆ ReadCellsBuffer() [2/2]

template<typename TInput , typename TOutput >
void itk::MeshIOBase::ReadCellsBuffer ( TInput *  input,
TOutput *  output,
CellGeometryEnum  type 
)
inlineprotected

Read cells from input buffer, used when Writing cells. This function only write specified type of cells(used when input cells container composes multiple type of cells and only want to write a specified cell type

Definition at line 748 of file itkMeshIOBase.h.

◆ ReadMeshInformation()

virtual void itk::MeshIOBase::ReadMeshInformation ( )
pure virtual

Determine the required information and whether need to ReadPoints, ReadCells, ReadPointData and ReadCellData

Implemented in itk::BYUMeshIO, itk::FreeSurferAsciiMeshIO, itk::FreeSurferBinaryMeshIO, itk::GiftiMeshIO, itk::OBJMeshIO, itk::OFFMeshIO, and itk::VTKPolyDataMeshIO.

◆ ReadPointData()

virtual void itk::MeshIOBase::ReadPointData ( void *  buffer)
pure virtual

◆ ReadPoints()

virtual void itk::MeshIOBase::ReadPoints ( void *  buffer)
pure virtual

Reads the data from disk into the memory buffer provided.

Implemented in itk::BYUMeshIO, itk::FreeSurferAsciiMeshIO, itk::FreeSurferBinaryMeshIO, itk::GiftiMeshIO, itk::OBJMeshIO, itk::OFFMeshIO, and itk::VTKPolyDataMeshIO.

◆ SetByteOrder()

virtual void itk::MeshIOBase::SetByteOrder ( const IOByteOrderEnum  _arg)
virtual

These methods indicate the byte ordering of the file you are trying to read in. These methods will then either swap or not swap the bytes depending on the byte ordering of the machine it is being run on. For example, reading in a BigEndian file on a BigEndian machine will result in no swapping. Trying to read the same file on a LittleEndian machine will result in swapping. Note: most UNIX machines are BigEndian while PC's and VAX's are LittleEndian. So if the file you are reading in was generated on a VAX or PC, SetByteOrderToLittleEndian() otherwise SetByteOrderToBigEndian(). Some MeshIOBase subclasses ignore these methods.

◆ SetByteOrderToBigEndian()

void itk::MeshIOBase::SetByteOrderToBigEndian ( )
inline

Definition at line 522 of file itkMeshIOBase.h.

References itk::CommonEnums::BigEndian.

◆ SetByteOrderToLittleEndian()

void itk::MeshIOBase::SetByteOrderToLittleEndian ( )
inline

Definition at line 528 of file itkMeshIOBase.h.

References itk::CommonEnums::LittleEndian.

◆ SetCellBufferSize()

virtual void itk::MeshIOBase::SetCellBufferSize ( SizeValueType  _arg)
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ SetCellComponentType()

virtual void itk::MeshIOBase::SetCellComponentType ( const itk::CommonEnums::IOComponent  _arg)
virtual

Set/Get the component type of the point, cell, point data and cell data. This is always a native type.

◆ SetCellPixelComponentType()

virtual void itk::MeshIOBase::SetCellPixelComponentType ( const itk::CommonEnums::IOComponent  _arg)
virtual

Set/Get the component type of the point, cell, point data and cell data. This is always a native type.

◆ SetCellPixelType()

virtual void itk::MeshIOBase::SetCellPixelType ( const itk::CommonEnums::IOPixel  _arg)
virtual

Set/Get the type of the point/cell pixel. The PixelTypes provides context to the IO mechanisms for data conversions. PixelTypes can be SCALAR, RGB, RGBA, VECTOR, COVARIANTVECTOR, POINT, INDEX. If the PIXELTYPE is SCALAR, then the NumberOfComponents should be 1. Any other of PIXELTYPE will have more than one component.

◆ SetFileName()

virtual void itk::MeshIOBase::SetFileName ( const char *  _arg)
virtual

Set/Get the name of the file to be read.

◆ SetFileType()

virtual void itk::MeshIOBase::SetFileType ( const IOFileEnum  _arg)
virtual

These methods control whether the file is written binary or ASCII. Many file formats (i.e., subclasses) ignore this flag.

◆ SetFileTypeToASCII()

void itk::MeshIOBase::SetFileTypeToASCII ( )
inline

Definition at line 495 of file itkMeshIOBase.h.

References itk::CommonEnums::ASCII.

◆ SetFileTypeToBinary()

void itk::MeshIOBase::SetFileTypeToBinary ( )
inline

Definition at line 501 of file itkMeshIOBase.h.

References itk::CommonEnums::BINARY.

◆ SetNumberOfCellPixelComponents()

virtual void itk::MeshIOBase::SetNumberOfCellPixelComponents ( unsigned int  _arg)
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ SetNumberOfCellPixels()

virtual void itk::MeshIOBase::SetNumberOfCellPixels ( SizeValueType  _arg)
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ SetNumberOfCells()

virtual void itk::MeshIOBase::SetNumberOfCells ( SizeValueType  _arg)
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ SetNumberOfPointPixelComponents()

virtual void itk::MeshIOBase::SetNumberOfPointPixelComponents ( unsigned int  _arg)
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ SetNumberOfPointPixels()

virtual void itk::MeshIOBase::SetNumberOfPointPixels ( SizeValueType  _arg)
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ SetNumberOfPoints()

virtual void itk::MeshIOBase::SetNumberOfPoints ( SizeValueType  _arg)
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ SetPixelType() [1/13]

template<typename T >
void itk::MeshIOBase::SetPixelType ( const Array< T > &  array,
bool  usePointPixel = true 
)
inline

Definition at line 391 of file itkMeshIOBase.h.

References itk::CommonEnums::ARRAY, and itk::Array< TValue >::Size().

◆ SetPixelType() [2/13]

template<typename T , unsigned int VLength>
void itk::MeshIOBase::SetPixelType ( const CovariantVector< T, VLength > &  ,
bool  usePointPixel = true 
)
inline

Definition at line 283 of file itkMeshIOBase.h.

References itk::CommonEnums::COVARIANTVECTOR.

◆ SetPixelType() [3/13]

template<typename T >
void itk::MeshIOBase::SetPixelType ( const DiffusionTensor3D< T > &  ,
bool  usePointPixel = true 
)
inline

Definition at line 337 of file itkMeshIOBase.h.

References itk::CommonEnums::DIFFUSIONTENSOR3D.

◆ SetPixelType() [4/13]

template<typename T , unsigned int VLength>
void itk::MeshIOBase::SetPixelType ( const FixedArray< T, VLength > &  ,
bool  usePointPixel = true 
)
inline

Definition at line 301 of file itkMeshIOBase.h.

References itk::CommonEnums::FIXEDARRAY.

◆ SetPixelType() [5/13]

template<typename T , unsigned int VRows, unsigned int VColumns>
void itk::MeshIOBase::SetPixelType ( const Matrix< T, VRows, VColumns > &  ,
bool  usePointPixel = true 
)
inline

Definition at line 355 of file itkMeshIOBase.h.

References itk::CommonEnums::MATRIX.

◆ SetPixelType() [6/13]

template<typename T >
void itk::MeshIOBase::SetPixelType ( const RGBAPixel< T > &  ,
bool  usePointPixel = true 
)
inline

Definition at line 247 of file itkMeshIOBase.h.

References itk::CommonEnums::RGBA.

◆ SetPixelType() [7/13]

template<typename T >
void itk::MeshIOBase::SetPixelType ( const RGBPixel< T > &  ,
bool  usePointPixel = true 
)
inline

Definition at line 229 of file itkMeshIOBase.h.

References itk::CommonEnums::RGB.

◆ SetPixelType() [8/13]

template<typename T >
void itk::MeshIOBase::SetPixelType ( const std::complex< T > &  ,
bool  usePointPixel = true 
)
inline

Definition at line 373 of file itkMeshIOBase.h.

References itk::CommonEnums::COMPLEX.

◆ SetPixelType() [9/13]

template<typename T , unsigned int VLength>
void itk::MeshIOBase::SetPixelType ( const SymmetricSecondRankTensor< T, VLength >  ,
bool  usePointPixel = true 
)
inline

Definition at line 319 of file itkMeshIOBase.h.

References itk::CommonEnums::SYMMETRICSECONDRANKTENSOR.

◆ SetPixelType() [10/13]

template<typename T >
void itk::MeshIOBase::SetPixelType ( const T &  ,
bool  usePointPixel = true 
)
inline

Definition at line 211 of file itkMeshIOBase.h.

References itk::CommonEnums::SCALAR.

◆ SetPixelType() [11/13]

template<typename T >
void itk::MeshIOBase::SetPixelType ( const VariableLengthVector< T > &  vector,
bool  usePointPixel = true 
)
inline

Definition at line 409 of file itkMeshIOBase.h.

References itk::CommonEnums::VARIABLELENGTHVECTOR.

◆ SetPixelType() [12/13]

template<typename T >
void itk::MeshIOBase::SetPixelType ( const VariableSizeMatrix< T > &  matrix,
bool  usePointPixel = true 
)
inline

◆ SetPixelType() [13/13]

template<typename T , unsigned int VLength>
void itk::MeshIOBase::SetPixelType ( const Vector< T, VLength > &  ,
bool  usePointPixel = true 
)
inline

Definition at line 265 of file itkMeshIOBase.h.

References itk::CommonEnums::VECTOR.

◆ SetPointComponentType()

virtual void itk::MeshIOBase::SetPointComponentType ( const itk::CommonEnums::IOComponent  _arg)
virtual

Set/Get the component type of the point, cell, point data and cell data. This is always a native type.

◆ SetPointDimension()

virtual void itk::MeshIOBase::SetPointDimension ( unsigned int  _arg)
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ SetPointPixelComponentType()

virtual void itk::MeshIOBase::SetPointPixelComponentType ( const itk::CommonEnums::IOComponent  _arg)
virtual

Set/Get the component type of the point, cell, point data and cell data. This is always a native type.

◆ SetPointPixelType()

virtual void itk::MeshIOBase::SetPointPixelType ( const itk::CommonEnums::IOPixel  _arg)
virtual

Set/Get the type of the point/cell pixel. The PixelTypes provides context to the IO mechanisms for data conversions. PixelTypes can be SCALAR, RGB, RGBA, VECTOR, COVARIANTVECTOR, POINT, INDEX. If the PIXELTYPE is SCALAR, then the NumberOfComponents should be 1. Any other of PIXELTYPE will have more than one component.

◆ SetUpdateCellData()

virtual void itk::MeshIOBase::SetUpdateCellData ( bool  _arg)
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ SetUpdateCells()

virtual void itk::MeshIOBase::SetUpdateCells ( bool  _arg)
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ SetUpdatePointData()

virtual void itk::MeshIOBase::SetUpdatePointData ( bool  _arg)
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ SetUpdatePoints()

virtual void itk::MeshIOBase::SetUpdatePoints ( bool  _arg)
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ SetUseCompression()

virtual void itk::MeshIOBase::SetUseCompression ( bool  _arg)
virtual

Set/Get a boolean to use the compression or not.

◆ UpdateCellDataOn()

virtual void itk::MeshIOBase::UpdateCellDataOn ( )
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ UpdateCellsOn()

virtual void itk::MeshIOBase::UpdateCellsOn ( )
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ UpdatePointDataOn()

virtual void itk::MeshIOBase::UpdatePointDataOn ( )
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ UpdatePointsOn()

virtual void itk::MeshIOBase::UpdatePointsOn ( )
virtual

Set/Get the number of components per pixel in the mesh. This may be set by the reading process. For SCALAR pixel types, NumberOfComponents will be 1. For other pixel types, NumberOfComponents will be greater than or equal to one.

◆ UseCompressionOn()

virtual void itk::MeshIOBase::UseCompressionOn ( )
virtual

Set/Get a boolean to use the compression or not.

◆ Write()

virtual void itk::MeshIOBase::Write ( )
pure virtual

◆ WriteBufferAsAscii()

template<typename T >
void itk::MeshIOBase::WriteBufferAsAscii ( T *  buffer,
std::ofstream &  outputFile,
SizeValueType  numberOfLines,
SizeValueType  numberOfComponents 
)
inlineprotected

Write buffer to output file stream with ascii style

Definition at line 663 of file itkMeshIOBase.h.

References itk::ConvertNumberToString().

◆ WriteBufferAsBinary()

template<typename TOutput , typename TInput >
void itk::MeshIOBase::WriteBufferAsBinary ( TInput *  buffer,
std::ofstream &  outputFile,
SizeValueType  numberOfComponents 
)
inlineprotected

◆ WriteCellData()

virtual void itk::MeshIOBase::WriteCellData ( void *  buffer)
pure virtual

◆ WriteCells()

virtual void itk::MeshIOBase::WriteCells ( void *  buffer)
pure virtual

◆ WriteCellsBuffer() [1/2]

template<typename TInput , typename TOutput >
void itk::MeshIOBase::WriteCellsBuffer ( TInput *  input,
TOutput *  output,
CellGeometryEnum  cellType,
SizeValueType  numberOfCells 
)
inlineprotected

Write cells to a data buffer, used when reading mesh, used for cellType with non-constant number of points

Definition at line 807 of file itkMeshIOBase.h.

References itk::CommonEnums::LINE_CELL, and itk::CommonEnums::POLYLINE_CELL.

◆ WriteCellsBuffer() [2/2]

template<typename TInput , typename TOutput >
void itk::MeshIOBase::WriteCellsBuffer ( TInput *  input,
TOutput *  output,
CellGeometryEnum  cellType,
unsigned int  numberOfPoints,
SizeValueType  numberOfCells 
)
inlineprotected

Write cells to a data buffer, used when reading a mesh. Used for cellType with constant number of points

Definition at line 780 of file itkMeshIOBase.h.

◆ WriteMeshInformation()

virtual void itk::MeshIOBase::WriteMeshInformation ( )
pure virtual

◆ WritePointData()

virtual void itk::MeshIOBase::WritePointData ( void *  buffer)
pure virtual

◆ WritePoints()

virtual void itk::MeshIOBase::WritePoints ( void *  buffer)
pure virtual

Member Data Documentation

◆ m_ByteOrder

IOByteOrderEnum itk::MeshIOBase::m_ByteOrder { IOByteOrderEnum::OrderNotApplicable }
protected

Big or Little Endian, and the type of the file. (May be ignored.)

Definition at line 837 of file itkMeshIOBase.h.

◆ m_CellBufferSize

SizeValueType itk::MeshIOBase::m_CellBufferSize {}
protected

The buffer size of cells

Definition at line 871 of file itkMeshIOBase.h.

◆ m_CellComponentType

IOComponentEnum itk::MeshIOBase::m_CellComponentType { IOComponentEnum::UNKNOWNCOMPONENTTYPE }
protected

Definition at line 848 of file itkMeshIOBase.h.

◆ m_CellPixelComponentType

IOComponentEnum itk::MeshIOBase::m_CellPixelComponentType { IOComponentEnum::UNKNOWNCOMPONENTTYPE }
protected

Definition at line 850 of file itkMeshIOBase.h.

◆ m_CellPixelType

IOPixelEnum itk::MeshIOBase::m_CellPixelType { IOPixelEnum::SCALAR }
protected

Definition at line 854 of file itkMeshIOBase.h.

◆ m_FileName

std::string itk::MeshIOBase::m_FileName {}
protected

Filename to read

Definition at line 841 of file itkMeshIOBase.h.

◆ m_FileType

IOFileEnum itk::MeshIOBase::m_FileType { IOFileEnum::ASCII }
protected

Definition at line 838 of file itkMeshIOBase.h.

◆ m_NumberOfCellPixelComponents

unsigned int itk::MeshIOBase::m_NumberOfCellPixelComponents { 0 }
protected

Definition at line 859 of file itkMeshIOBase.h.

◆ m_NumberOfCellPixels

SizeValueType itk::MeshIOBase::m_NumberOfCellPixels {}
protected

Definition at line 868 of file itkMeshIOBase.h.

◆ m_NumberOfCells

SizeValueType itk::MeshIOBase::m_NumberOfCells {}
protected

Definition at line 866 of file itkMeshIOBase.h.

◆ m_NumberOfPointPixelComponents

unsigned int itk::MeshIOBase::m_NumberOfPointPixelComponents { 0 }
protected

Stores the number of components per pixel. This will be 1 for grayscale images, 3 for RGBPixel images, and 4 for RGBPixelA images.

Definition at line 858 of file itkMeshIOBase.h.

◆ m_NumberOfPointPixels

SizeValueType itk::MeshIOBase::m_NumberOfPointPixels {}
protected

Definition at line 867 of file itkMeshIOBase.h.

◆ m_NumberOfPoints

SizeValueType itk::MeshIOBase::m_NumberOfPoints {}
protected

The number of points and cells

Definition at line 865 of file itkMeshIOBase.h.

◆ m_PointComponentType

IOComponentEnum itk::MeshIOBase::m_PointComponentType { IOComponentEnum::UNKNOWNCOMPONENTTYPE }
protected

Used internally to keep track of the type of the component.

Definition at line 847 of file itkMeshIOBase.h.

◆ m_PointDimension

unsigned int itk::MeshIOBase::m_PointDimension { 3 }
protected

The number of independent dimensions in the point.

Definition at line 862 of file itkMeshIOBase.h.

◆ m_PointPixelComponentType

IOComponentEnum itk::MeshIOBase::m_PointPixelComponentType { IOComponentEnum::UNKNOWNCOMPONENTTYPE }
protected

Definition at line 849 of file itkMeshIOBase.h.

◆ m_PointPixelType

IOPixelEnum itk::MeshIOBase::m_PointPixelType { IOPixelEnum::SCALAR }
protected

Used internally to keep track of the type of the pixel.

Definition at line 853 of file itkMeshIOBase.h.

◆ m_SupportedReadExtensions

ArrayOfExtensionsType itk::MeshIOBase::m_SupportedReadExtensions {}
private

Definition at line 881 of file itkMeshIOBase.h.

◆ m_SupportedWriteExtensions

ArrayOfExtensionsType itk::MeshIOBase::m_SupportedWriteExtensions {}
private

Definition at line 882 of file itkMeshIOBase.h.

◆ m_UpdateCellData

bool itk::MeshIOBase::m_UpdateCellData { false }
protected

Definition at line 878 of file itkMeshIOBase.h.

◆ m_UpdateCells

bool itk::MeshIOBase::m_UpdateCells { false }
protected

Definition at line 876 of file itkMeshIOBase.h.

◆ m_UpdatePointData

bool itk::MeshIOBase::m_UpdatePointData { false }
protected

Definition at line 877 of file itkMeshIOBase.h.

◆ m_UpdatePoints

bool itk::MeshIOBase::m_UpdatePoints { false }
protected

Flags indicate whether read or write points, cells, point data and cell data

Definition at line 875 of file itkMeshIOBase.h.

◆ m_UseCompression

bool itk::MeshIOBase::m_UseCompression { false }
protected

Should we compress the data?

Definition at line 844 of file itkMeshIOBase.h.


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