ITK  4.8.0
Insight Segmentation and Registration Toolkit
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
itk::MeshIOBase Class Referenceabstract

#include <itkMeshIOBase.h>

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

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. Uviversity of New South Wales, Australia.
See Also
MeshFileWriter
MeshFileReader

Definition at line 69 of file itkMeshIOBase.h.

Classes

struct  MapComponentType
 
class  UnknownType
 

Public Types

typedef std::vector< std::string > ArrayOfExtensionsType
 
enum  ByteOrder {
  BigEndian,
  LittleEndian,
  OrderNotApplicable
}
 
enum  CellGeometryType {
  VERTEX_CELL = 0,
  LINE_CELL,
  TRIANGLE_CELL,
  QUADRILATERAL_CELL,
  POLYGON_CELL,
  TETRAHEDRON_CELL,
  HEXAHEDRON_CELL,
  QUADRATIC_EDGE_CELL,
  QUADRATIC_TRIANGLE_CELL,
  LAST_ITK_CELL,
  MAX_ITK_CELLS = 255
}
 
typedef SmartPointer< const SelfConstPointer
 
enum  FileType {
  ASCII,
  BINARY,
  TYPENOTAPPLICABLE
}
 
enum  IOComponentType {
  UNKNOWNCOMPONENTTYPE,
  UCHAR,
  CHAR,
  USHORT,
  SHORT,
  UINT,
  INT,
  ULONG,
  LONG,
  LONGLONG,
  ULONGLONG,
  FLOAT,
  DOUBLE,
  LDOUBLE
}
 
enum  IOPixelType {
  UNKNOWNPIXELTYPE,
  SCALAR,
  RGB,
  RGBA,
  OFFSET,
  VECTOR,
  POINT,
  COVARIANTVECTOR,
  SYMMETRICSECONDRANKTENSOR,
  DIFFUSIONTENSOR3D,
  COMPLEX,
  FIXEDARRAY,
  ARRAY,
  MATRIX,
  VARIABLELENGTHVECTOR,
  VARIABLESIZEMATRIX
}
 
typedef SmartPointer< SelfPointer
 
typedef MeshIOBase Self
 
typedef IdentifierType SizeValueType
 
typedef std::streamoff StreamOffsetType
 
typedef LightProcessObject Superclass
 
- Public Types inherited from itk::LightProcessObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightProcessObject Self
 
typedef Object Superclass
 
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

virtual bool CanReadFile (const char *)=0
 
virtual bool CanWriteFile (const char *)=0
 
std::string GetByteOrderAsString (ByteOrder) const
 
unsigned int GetComponentSize (IOComponentType componentType) const
 
std::string GetComponentTypeAsString (IOComponentType) const
 
std::string GetFileTypeAsString (FileType) const
 
virtual const char * GetNameOfClass () const
 
std::string GetPixelTypeAsString (IOPixelType) 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 T &, bool UsePointPixel=true)
 
template<typename T >
void SetPixelType (const RGBPixel< T > &, bool UsePointPixel=true)
 
template<typename T >
void SetPixelType (const RGBAPixel< T > &, bool UsePointPixel=true)
 
template<typename T , unsigned int VLength>
void SetPixelType (const Vector< T, VLength > &, bool UsePointPixel=true)
 
template<typename T , unsigned int VLength>
void SetPixelType (const CovariantVector< T, VLength > &, bool UsePointPixel=true)
 
template<typename T , unsigned int VLength>
void SetPixelType (const FixedArray< T, VLength > &, bool UsePointPixel=true)
 
template<typename T , unsigned int VLength>
void SetPixelType (const SymmetricSecondRankTensor< T, VLength >, bool UsePointPixel=true)
 
template<typename T >
void SetPixelType (const DiffusionTensor3D< T > &, bool UsePointPixel=true)
 
template<typename T , unsigned int NR, unsigned int NC>
void SetPixelType (const Matrix< T, NR, NC > &, bool UsePointPixel=true)
 
template<typename T >
void SetPixelType (const std::complex< T > &, bool UsePointPixel=true)
 
template<typename T >
void SetPixelType (const Array< T > &array, 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)
 
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 IOPixelType _arg)
 
virtual IOPixelType GetPointPixelType () const
 
virtual void SetCellPixelType (const IOPixelType _arg)
 
virtual IOPixelType GetCellPixelType () const
 
virtual void SetPointComponentType (const IOComponentType _arg)
 
virtual IOComponentType GetPointComponentType () const
 
virtual void SetCellComponentType (const IOComponentType _arg)
 
virtual IOComponentType GetCellComponentType () const
 
virtual void SetPointPixelComponentType (const IOComponentType _arg)
 
virtual IOComponentType GetPointPixelComponentType () const
 
virtual void SetCellPixelComponentType (const IOComponentType _arg)
 
virtual IOComponentType 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 SetUpdateCells (bool _arg)
 
virtual bool GetUpdateCells () const
 
virtual void SetUpdatePointData (bool _arg)
 
virtual bool GetUpdatePointData () const
 
virtual void SetUpdateCellData (bool _arg)
 
virtual bool GetUpdateCellData () const
 
virtual void SetFileType (const FileType _arg)
 
virtual FileType GetFileType () const
 
virtual void SetByteOrder (const ByteOrder _arg)
 
virtual ByteOrder 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 ::itk::LightObject::Pointer CreateAnother () const
 
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 *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
virtual void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetReferenceCount (int) override
 
virtual void UnRegister () const noexceptoverride
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Protected Member Functions

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

Protected Attributes

ByteOrder m_ByteOrder
 
SizeValueType m_CellBufferSize
 
IOComponentType m_CellComponentType
 
IOComponentType m_CellPixelComponentType
 
IOPixelType m_CellPixelType
 
std::string m_FileName
 
FileType m_FileType
 
unsigned int m_NumberOfCellPixelComponents
 
SizeValueType m_NumberOfCellPixels
 
SizeValueType m_NumberOfCells
 
unsigned int m_NumberOfPointPixelComponents
 
SizeValueType m_NumberOfPointPixels
 
SizeValueType m_NumberOfPoints
 
IOComponentType m_PointComponentType
 
SizeValueType m_PointDimension
 
IOComponentType m_PointPixelComponentType
 
IOPixelType m_PointPixelType
 
bool m_UpdateCellData
 
bool m_UpdateCells
 
bool m_UpdatePointData
 
bool m_UpdatePoints
 
bool m_UseCompression
 
- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

Private Member Functions

 MeshIOBase (const Self &)
 
void operator= (const Self &)
 

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 flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Member Typedef Documentation

typedef std::vector< std::string > itk::MeshIOBase::ArrayOfExtensionsType

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

Definition at line 79 of file itkMeshIOBase.h.

Definition at line 75 of file itkMeshIOBase.h.

Definition at line 76 of file itkMeshIOBase.h.

Standard class typedefs.

Definition at line 73 of file itkMeshIOBase.h.

Definition at line 84 of file itkMeshIOBase.h.

typedef std::streamoff itk::MeshIOBase::StreamOffsetType

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

Definition at line 82 of file itkMeshIOBase.h.

Definition at line 74 of file itkMeshIOBase.h.

Member Enumeration Documentation

Enums used to specify byte order; whether Big Endian or Little Endian. Some subclasses use this, some ignore it.

Enumerator
BigEndian 
LittleEndian 
OrderNotApplicable 

Definition at line 121 of file itkMeshIOBase.h.

Enums used to specify cell type

Enumerator
VERTEX_CELL 
LINE_CELL 
TRIANGLE_CELL 
QUADRILATERAL_CELL 
POLYGON_CELL 
TETRAHEDRON_CELL 
HEXAHEDRON_CELL 
QUADRATIC_EDGE_CELL 
QUADRATIC_TRIANGLE_CELL 
LAST_ITK_CELL 
MAX_ITK_CELLS 

Definition at line 124 of file itkMeshIOBase.h.

Enums used to specify write style: whether binary or ASCII. Some subclasses use this, some ignore it.

Enumerator
ASCII 
BINARY 
TYPENOTAPPLICABLE 

Definition at line 117 of file itkMeshIOBase.h.

Enums used to manipulate the component type. The component type refers to the actual storage class associated with either a SCALAR pixel type or elements of a compound pixel.

Enumerator
UNKNOWNCOMPONENTTYPE 
UCHAR 
CHAR 
USHORT 
SHORT 
UINT 
INT 
ULONG 
LONG 
LONGLONG 
ULONGLONG 
FLOAT 
DOUBLE 
LDOUBLE 

Definition at line 112 of file itkMeshIOBase.h.

Enums used to manipulate the point/cell pixel type. The pixel type provides context for automatic data conversions (for instance, RGB to SCALAR, VECTOR to SCALAR).

Enumerator
UNKNOWNPIXELTYPE 
SCALAR 
RGB 
RGBA 
OFFSET 
VECTOR 
POINT 
COVARIANTVECTOR 
SYMMETRICSECONDRANKTENSOR 
DIFFUSIONTENSOR3D 
COMPLEX 
FIXEDARRAY 
ARRAY 
MATRIX 
VARIABLELENGTHVECTOR 
VARIABLESIZEMATRIX 

Definition at line 104 of file itkMeshIOBase.h.

Constructor & Destructor Documentation

itk::MeshIOBase::MeshIOBase ( )
protected
virtual itk::MeshIOBase::~MeshIOBase ( )
inlineprotectedvirtual

Definition at line 523 of file itkMeshIOBase.h.

itk::MeshIOBase::MeshIOBase ( const Self )
private

Member Function Documentation

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

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

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

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

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::GiftiMeshIO, itk::VTKPolyDataMeshIO, itk::FreeSurferBinaryMeshIO, itk::BYUMeshIO, itk::FreeSurferAsciiMeshIO, itk::OFFMeshIO, itk::STLMeshIO, and itk::OBJMeshIO.

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::GiftiMeshIO, itk::STLMeshIO, itk::VTKPolyDataMeshIO, itk::FreeSurferBinaryMeshIO, itk::BYUMeshIO, itk::FreeSurferAsciiMeshIO, itk::OFFMeshIO, and itk::OBJMeshIO.

virtual ByteOrder 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.

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

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

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.

virtual IOComponentType 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.

virtual IOComponentType 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.

virtual IOPixelType 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.

unsigned int itk::MeshIOBase::GetComponentSize ( IOComponentType  componentType) const
std::string itk::MeshIOBase::GetComponentTypeAsString ( IOComponentType  ) const

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

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

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

virtual FileType 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.

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

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

virtual const char* itk::MeshIOBase::GetNameOfClass ( ) const
virtual
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.

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.

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.

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.

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.

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.

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

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

virtual IOComponentType 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.

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.

virtual IOComponentType 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.

virtual IOPixelType 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.

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.

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.

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.

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.

Reimplemented in itk::STLMeshIO.

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.

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.

Reimplemented in itk::STLMeshIO.

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

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

void itk::MeshIOBase::operator= ( const Self )
private
virtual 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::OFFMeshIO, itk::FreeSurferBinaryMeshIO, itk::OBJMeshIO, itk::FreeSurferAsciiMeshIO, itk::BYUMeshIO, itk::STLMeshIO, itk::GiftiMeshIO, and itk::VTKPolyDataMeshIO.

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 535 of file itkMeshIOBase.h.

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

Read data from input file to buffer with binary style

Definition at line 546 of file itkMeshIOBase.h.

References itk::ByteSwapper< T >::SwapRangeFromSystemToBigEndian(), and itk::ByteSwapper< T >::SwapRangeFromSystemToLittleEndian().

virtual void itk::MeshIOBase::ReadCellData ( void *  buffer)
pure virtual
virtual void itk::MeshIOBase::ReadCells ( void *  buffer)
pure virtual
template<typename TInput , typename TOutput >
void itk::MeshIOBase::ReadCellsBuffer ( TInput *  input,
TOutput *  output 
)
inlineprotected

Read cells from a data buffer, used when writting 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 626 of file itkMeshIOBase.h.

References itk::NumericTraits< T >::ZeroValue().

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

Read cells from input buffer, used when Writting 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 649 of file itkMeshIOBase.h.

References itk::NumericTraits< T >::ZeroValue().

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

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

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

virtual void itk::MeshIOBase::ReadPointData ( void *  buffer)
pure virtual
virtual void itk::MeshIOBase::ReadPoints ( void *  buffer)
pure virtual
virtual void itk::MeshIOBase::SetByteOrder ( const ByteOrder  _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.

void itk::MeshIOBase::SetByteOrderToBigEndian ( )
inline

Definition at line 449 of file itkMeshIOBase.h.

void itk::MeshIOBase::SetByteOrderToLittleEndian ( )
inline

Definition at line 454 of file itkMeshIOBase.h.

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.

virtual void itk::MeshIOBase::SetCellComponentType ( const IOComponentType  _arg)
virtual

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

virtual void itk::MeshIOBase::SetCellPixelComponentType ( const IOComponentType  _arg)
virtual

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

virtual void itk::MeshIOBase::SetCellPixelType ( const IOPixelType  _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.

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

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

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

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

void itk::MeshIOBase::SetFileTypeToASCII ( )
inline

Definition at line 424 of file itkMeshIOBase.h.

void itk::MeshIOBase::SetFileTypeToBinary ( )
inline

Definition at line 429 of file itkMeshIOBase.h.

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.

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.

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.

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.

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.

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.

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

Definition at line 158 of file itkMeshIOBase.h.

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

Definition at line 175 of file itkMeshIOBase.h.

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

Definition at line 192 of file itkMeshIOBase.h.

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

Definition at line 209 of file itkMeshIOBase.h.

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

Definition at line 226 of file itkMeshIOBase.h.

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

Definition at line 243 of file itkMeshIOBase.h.

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

Definition at line 260 of file itkMeshIOBase.h.

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

Definition at line 277 of file itkMeshIOBase.h.

template<typename T , unsigned int NR, unsigned int NC>
void itk::MeshIOBase::SetPixelType ( const Matrix< T, NR, NC > &  ,
bool  UsePointPixel = true 
)
inline

Definition at line 294 of file itkMeshIOBase.h.

References itk::NR.

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

Definition at line 311 of file itkMeshIOBase.h.

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

Definition at line 328 of file itkMeshIOBase.h.

References itk::Array< TValue >::Size().

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

Definition at line 345 of file itkMeshIOBase.h.

References itk::VariableLengthVector< TValue >::Size().

template<typename T >
void itk::MeshIOBase::SetPixelType ( const VariableSizeMatrix< T > &  matrix,
bool  UsePointPixel = true 
)
inline
virtual void itk::MeshIOBase::SetPointComponentType ( const IOComponentType  _arg)
virtual

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

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.

virtual void itk::MeshIOBase::SetPointPixelComponentType ( const IOComponentType  _arg)
virtual

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

virtual void itk::MeshIOBase::SetPointPixelType ( const IOPixelType  _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.

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.

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.

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.

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.

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

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

virtual void itk::MeshIOBase::UseCompressionOff ( )
virtual

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

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

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

virtual void itk::MeshIOBase::Write ( )
pure virtual
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 568 of file itkMeshIOBase.h.

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

Write buffer to output file stream with binary style

Definition at line 584 of file itkMeshIOBase.h.

References itk::ByteSwapper< T >::SwapRangeFromSystemToBigEndian(), and itk::ByteSwapper< T >::SwapRangeFromSystemToLittleEndian().

virtual void itk::MeshIOBase::WriteCellData ( void *  buffer)
pure virtual
virtual void itk::MeshIOBase::WriteCells ( void *  buffer)
pure virtual
template<typename TInput , typename TOutput >
void itk::MeshIOBase::WriteCellsBuffer ( TInput *  input,
TOutput *  output,
CellGeometryType  cellType,
unsigned int  numberOfPoints,
SizeValueType  numberOfCells 
)
inlineprotected

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

Definition at line 680 of file itkMeshIOBase.h.

References itk::NumericTraits< T >::ZeroValue().

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

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

Definition at line 702 of file itkMeshIOBase.h.

References itk::NumericTraits< T >::ZeroValue().

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

Member Data Documentation

ByteOrder itk::MeshIOBase::m_ByteOrder
protected

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

Definition at line 724 of file itkMeshIOBase.h.

SizeValueType itk::MeshIOBase::m_CellBufferSize
protected

The buffer size of cells

Definition at line 758 of file itkMeshIOBase.h.

IOComponentType itk::MeshIOBase::m_CellComponentType
protected

Definition at line 735 of file itkMeshIOBase.h.

IOComponentType itk::MeshIOBase::m_CellPixelComponentType
protected

Definition at line 737 of file itkMeshIOBase.h.

IOPixelType itk::MeshIOBase::m_CellPixelType
protected

Definition at line 741 of file itkMeshIOBase.h.

std::string itk::MeshIOBase::m_FileName
protected

Filename to read

Definition at line 728 of file itkMeshIOBase.h.

FileType itk::MeshIOBase::m_FileType
protected

Definition at line 725 of file itkMeshIOBase.h.

unsigned int itk::MeshIOBase::m_NumberOfCellPixelComponents
protected

Definition at line 746 of file itkMeshIOBase.h.

SizeValueType itk::MeshIOBase::m_NumberOfCellPixels
protected

Definition at line 755 of file itkMeshIOBase.h.

SizeValueType itk::MeshIOBase::m_NumberOfCells
protected

Definition at line 753 of file itkMeshIOBase.h.

unsigned int itk::MeshIOBase::m_NumberOfPointPixelComponents
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 745 of file itkMeshIOBase.h.

SizeValueType itk::MeshIOBase::m_NumberOfPointPixels
protected

Definition at line 754 of file itkMeshIOBase.h.

SizeValueType itk::MeshIOBase::m_NumberOfPoints
protected

The number of points and cells

Definition at line 752 of file itkMeshIOBase.h.

IOComponentType itk::MeshIOBase::m_PointComponentType
protected

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

Definition at line 734 of file itkMeshIOBase.h.

SizeValueType itk::MeshIOBase::m_PointDimension
protected

The number of independent dimensions in the point.

Definition at line 749 of file itkMeshIOBase.h.

IOComponentType itk::MeshIOBase::m_PointPixelComponentType
protected

Definition at line 736 of file itkMeshIOBase.h.

IOPixelType itk::MeshIOBase::m_PointPixelType
protected

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

Definition at line 740 of file itkMeshIOBase.h.

ArrayOfExtensionsType itk::MeshIOBase::m_SupportedReadExtensions
private

Definition at line 771 of file itkMeshIOBase.h.

ArrayOfExtensionsType itk::MeshIOBase::m_SupportedWriteExtensions
private

Definition at line 772 of file itkMeshIOBase.h.

bool itk::MeshIOBase::m_UpdateCellData
protected

Definition at line 765 of file itkMeshIOBase.h.

bool itk::MeshIOBase::m_UpdateCells
protected

Definition at line 763 of file itkMeshIOBase.h.

bool itk::MeshIOBase::m_UpdatePointData
protected

Definition at line 764 of file itkMeshIOBase.h.

bool itk::MeshIOBase::m_UpdatePoints
protected

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

Definition at line 762 of file itkMeshIOBase.h.

bool itk::MeshIOBase::m_UseCompression
protected

Should we compress the data?

Definition at line 731 of file itkMeshIOBase.h.


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