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

vlVolFioPPM Class Reference

#include <vlvolfio_ppm.h>

Inheritance diagram for vlVolFioPPM:

vlVolFioFilter vlPlugin List of all members.

Public Member Functions

 vlVolFioPPM ()
 Default constructor.

virtual ~vlVolFioPPM ()
 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)
 Load data into "data" from file using information in "info".

bool writeInfo (const vlVolInfo &info, FILE *const fp, const std::string &filename)
 Write just the volume information "info" 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 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

vlVolFioPPM::vlVolFioPPM  ) 
 

Definition at line 39 of file vlvolfio_ppm.cpp.

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

vlVolFioPPM::~vlVolFioPPM  )  [virtual]
 

Definition at line 51 of file vlvolfio_ppm.cpp.


Member Function Documentation

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

Returns:

Implements vlVolFioFilter.

Definition at line 61 of file vlvolfio_ppm.cpp.

References m_fileExtensions.

bool vlVolFioPPM::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 130 of file vlvolfio_ppm.cpp.

References vlVolInfo::dataType(), vlVolData::dataType(), vlVolInfo::dim(), vlVolData::dim(), vlVolInfo::headerSize(), vlVolInfo::isValid(), vlVolIter< DataType, Layout >::set(), vlVolInfo::stepping(), and vlTriple< uint32 >::z().

bool vlVolFioPPM::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_ppm.cpp.

References ColorRGBu8, int16, vlVolInfo::setBitsPerVoxel(), vlVolInfo::setBytesPerVoxel(), vlVolInfo::setDataType(), vlVolInfo::setDim(), vlVolInfo::setHeaderSize(), vlVolInfo::setStepping(), vlVolInfo::setUnits(), uint32, vlTriple< uint16 >::x(), vlTriple< uint16 >::y(), and vlTriple< uint16 >::z().

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

Implements vlVolFioFilter.

Definition at line 214 of file vlvolfio_ppm.cpp.

References vlVolInfo::dim(), vlVolIterConst< DataType, Layout >::get(), vlVolIterConst< DataType, Layout >::next(), uint8, vlTriple< uint16 >::x(), and vlTriple< uint16 >::y().

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

Implements vlVolFioFilter.

Definition at line 197 of file vlvolfio_ppm.cpp.

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


Member Data Documentation

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

Definition at line 76 of file vlvolfio_ppm.h.

Referenced by getFileExtensions(), and vlVolFioPPM().

FILE* vlVolFioPPM::m_fileId [protected]
 

Definition at line 70 of file vlvolfio_ppm.h.

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

Definition at line 73 of file vlvolfio_ppm.h.


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