Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

vlVolFioVOX Class Reference

#include <vlvolfio_vox.h>

Inheritance diagram for vlVolFioVOX:

vlVolFioFilter vlPlugin List of all members.

Public Member Functions

 vlVolFioVOX ()
 Default constructor.

virtual ~vlVolFioVOX ()
 Default destructor.

const std::vector< std::string > & getFileExtensions () const
 Return the list of valid file extensions for this file format.

bool readInfo (vlVolInfo &info, FILE *const fp, const std::string &filename)
 Read the volume information from the file into "info".

bool readData (vlVolInfo &info, vlVolData *const data, FILE *const fp, const std::string &filename)
 Read volume data from the file.

bool writeInfo (const vlVolInfo &info, FILE *const fp, const std::string &filename)
 Write just the volume information to the file.

bool writeData (const vlVolInfo &info, const vlVolData *data, FILE *const fp, const std::string &filename)
 Write just the volume data to file.

template<> bool readDataT (uint8 &dummy, vlVolInfo &info, vlVolData *const data, FILE *const fp, const std::string &filename)
template<> bool readDataT (vlColorRGBub &dummy, vlVolInfo &info, vlVolData *const data, FILE *const fp, const std::string &filename)
template<> bool readDataT (vlColorRGBAub &dummy, vlVolInfo &info, vlVolData *const data, FILE *const fp, const std::string &filename)

Protected Member Functions

template<class T> bool readDataT (T &dummy, vlVolInfo &info, vlVolData *const data, FILE *const fp, const std::string &filename)
 Read volume data from the file.

template<class T> bool writeInfoT (T &dummy)
template<class T> bool writeDataT (T &dummy, const vlVolInfo &info, const vlVolData *data, FILE *const fp, const std::string &filename)

Protected Attributes

FILE * m_fileId
 ID of the file to be read.

const std::string m_name
 Name id of the file format.

std::vector< std::string > m_fileExtensions
 Extensions associated with the file format.


Constructor & Destructor Documentation

vlVolFioVOX::vlVolFioVOX  ) 
 

Definition at line 39 of file vlvolfio_vox.cpp.

References vlPluginInfo::addAuthor(), vlPlugin::infoRef(), m_fileExtensions, vlPluginInfo::setCopyrightText(), vlPluginInfo::setName(), vlPluginInfo::setService(), and vlPluginInfo::setVersion().

vlVolFioVOX::~vlVolFioVOX  )  [virtual]
 

Definition at line 51 of file vlvolfio_vox.cpp.


Member Function Documentation

const std::vector< std::string > & vlVolFioVOX::getFileExtensions  )  const [virtual]
 

Returns:

Implements vlVolFioFilter.

Definition at line 61 of file vlvolfio_vox.cpp.

References m_fileExtensions.

bool vlVolFioVOX::readData vlVolInfo info,
vlVolData *const  data,
FILE *const  fp,
const std::string &  filename
[virtual]
 

Parameters:
data place to load the read data.
Returns:
true if loading data was successful, else false

Implements vlVolFioFilter.

Definition at line 351 of file vlvolfio_vox.cpp.

References callFunctionOnDataType, vlVolData::dataType(), vlVolInfo::dim(), vlVolData::dim(), filename, vlVolInfo::headerSize(), vlVolInfo::isValid(), and readDataT().

template<>
bool vlVolFioVOX::readDataT vlColorRGBAub dummy,
vlVolInfo info,
vlVolData *const  data,
FILE *const  fp,
const std::string &  filename
 

template<>
bool vlVolFioVOX::readDataT vlColorRGBub dummy,
vlVolInfo info,
vlVolData *const  data,
FILE *const  fp,
const std::string &  filename
 

template<>
bool vlVolFioVOX::readDataT uint8 dummy,
vlVolInfo info,
vlVolData *const  data,
FILE *const  fp,
const std::string &  filename
 

template<class DataType>
bool vlVolFioVOX::readDataT T &  dummy,
vlVolInfo info,
vlVolData *const  data,
FILE *const  fp,
const std::string &  filename
[protected]
 

Definition at line 338 of file vlvolfio_vox.cpp.

Referenced by readData().

bool vlVolFioVOX::readInfo vlVolInfo info,
FILE *const  fp,
const std::string &  filename
[virtual]
 

Todo:
Add icon reading support.
Parameters:
info The function will read the volume information into this file
Returns:
true If the information was successfully read and loaded, false otherwise

get the current position of the file stream

Implements vlVolFioFilter.

Definition at line 74 of file vlvolfio_vox.cpp.

References ColorRGBAu8, ColorRGBu8, int16, int8, vlVolInfo::setBitsPerVoxel(), vlVolInfo::setBytesPerVoxel(), vlVolInfo::setDataType(), vlVolInfo::setDim(), vlVolInfo::setHeaderSize(), vlVolInfo::setOrigFilePos(), vlVolInfo::setUnits(), sx, sy, sz, uint32, UnsignedInt16, UnsignedInt8, vlTriple< float >::x(), vlTriple< uint16 >::x(), x, vlTriple< float >::y(), vlTriple< uint16 >::y(), y, vlTriple< float >::z(), vlTriple< uint16 >::z(), and z.

bool vlVolFioVOX::writeData const vlVolInfo info,
const vlVolData data,
FILE *const  fp,
const std::string &  filename
[virtual]
 

Implements vlVolFioFilter.

Definition at line 433 of file vlvolfio_vox.cpp.

References callFunctionOnDataType, vlVolData::dataType(), filename, and writeDataT().

template<class T>
bool vlVolFioVOX::writeDataT T &  dummy,
const vlVolInfo info,
const vlVolData data,
FILE *const  fp,
const std::string &  filename
[protected]
 

Definition at line 447 of file vlvolfio_vox.cpp.

References vlVolIterConst< DataType, Layout >::get(), and vlVolIterConst< DataType, Layout >::nextXYZ().

Referenced by writeData().

bool vlVolFioVOX::writeInfo const vlVolInfo info,
FILE *const  fp,
const std::string &  filename
[virtual]
 

Implements vlVolFioFilter.

Definition at line 380 of file vlvolfio_vox.cpp.

References vlVolInfo::bitsPerVoxel(), ColorRGBAu8, vlVolInfo::dataType(), vlVolInfo::dim(), filename, max, vlVolInfo::origFileDim(), vlVolInfo::origFilePos(), uint16, vlVolInfo::units(), vlTriple< float >::x(), x, vlTriple< uint16 >::x(), vlTriple< float >::y(), y, vlTriple< uint16 >::y(), vlTriple< float >::z(), z, and vlTriple< uint16 >::z().

template<class T>
bool vlVolFioVOX::writeInfoT T &  dummy  )  [protected]
 


Member Data Documentation

std::vector<std::string> vlVolFioVOX::m_fileExtensions [protected]
 

Definition at line 88 of file vlvolfio_vox.h.

Referenced by getFileExtensions(), and vlVolFioVOX().

FILE* vlVolFioVOX::m_fileId [protected]
 

Definition at line 82 of file vlvolfio_vox.h.

const std::string vlVolFioVOX::m_name [protected]
 

Definition at line 85 of file vlvolfio_vox.h.


The documentation for this class was generated from the following files:
Generated on Fri Mar 18 11:33:21 2005 for OpenVL by doxygen 1.3.3