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

vlVolFiof3d Class Reference

#include <f3d.h>

Inheritance diagram for vlVolFiof3d:

vlVolFioFilter vlPlugin List of all members.

Public Member Functions

 vlVolFiof3d ()
 Default constructor.

virtual ~vlVolFiof3d ()
 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 info about the volume from the file.

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.


Protected Member Functions

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

Protected Attributes

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


Constructor & Destructor Documentation

vlVolFiof3d::vlVolFiof3d  ) 
 

Definition at line 49 of file f3d.cpp.

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

vlVolFiof3d::~vlVolFiof3d  )  [virtual]
 

Definition at line 62 of file f3d.cpp.


Member Function Documentation

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

Returns:
String with extensions associated with this file format.

Implements vlVolFioFilter.

Definition at line 73 of file f3d.cpp.

References m_fileExtensions.

bool vlVolFiof3d::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 252 of file f3d.cpp.

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

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

Definition at line 284 of file f3d.cpp.

References vlVolInfo::dim(), vlVolIterConst< DataType, Layout >::nextXYZ(), vlVolIter< DataType, Layout >::set(), uint32, vlTriple< uint16 >::x(), vlTriple< uint16 >::y(), and vlTriple< uint16 >::z().

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

The idea here is to always return false since there is no way to read the correct information from a raw file. Instead, whatever possible information gathered from the file is loaded into vlVolInfo and a false is returned.

Parameters:
info place to load the volume information
Returns:
Always returns false.

get the current position of the file stream

Implements vlVolFioFilter.

Definition at line 89 of file f3d.cpp.

References vlVolInfo::dim(), Float, vlUnit::Meter, vlUnit::MicroMeter, vlUnit::MilliMeter, vlUnit::NoUnitType, PGM, PPM, vlVolInfo::setDataType(), vlVolInfo::setDim(), vlVolInfo::setHeaderSize(), vlVolInfo::setUnits(), SignedInt16, SignedInt32, SignedInt8, uint16, uint32, vlVolInfo::units(), vlUnit::UnitType, UnknownDataType, UnsignedInt16, UnsignedInt32, and UnsignedInt8.

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

Parameters:
info 
data 
fp 
filename 
Returns:

Implements vlVolFioFilter.

Definition at line 364 of file f3d.cpp.

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

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

Definition at line 377 of file f3d.cpp.

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

Referenced by writeData().

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

Parameters:
info Information to write.
fp 
filename 
Returns:

Implements vlVolFioFilter.

Definition at line 346 of file f3d.cpp.

References vlVolInfo::bitsPerVoxel(), vlVolInfo::dim(), vlTriple< uint16 >::x(), vlTriple< uint16 >::y(), and vlTriple< uint16 >::z().


Member Data Documentation

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

Definition at line 69 of file f3d.h.

Referenced by getFileExtensions(), and vlVolFiof3d().


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