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

vlVolFioSLC Class Reference

#include <vlvolfio_slc.h>

Inheritance diagram for vlVolFioSLC:

vlVolFioFilter vlPlugin List of all members.

Public Member Functions

 vlVolFioSLC ()
 Default constructor.

virtual ~vlVolFioSLC ()
 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.

bool volvisRunLengthEncode (unsigned char **out_ptr, unsigned int *out_size, unsigned char *in_ptr, unsigned int in_size)
 RLE encode a given array of data.


Static Public Attributes

int const MAGIC_NUMBER = 11111
 magic number for SLC files


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

vlVolFioSLC::vlVolFioSLC  ) 
 

Definition at line 39 of file vlvolfio_slc.cpp.

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

vlVolFioSLC::~vlVolFioSLC  )  [virtual]
 

Definition at line 51 of file vlvolfio_slc.cpp.


Member Function Documentation

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

Returns:

Implements vlVolFioFilter.

Definition at line 61 of file vlvolfio_slc.cpp.

References m_fileExtensions.

bool vlVolFioSLC::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 226 of file vlvolfio_slc.cpp.

References vlVolInfo::bitsPerVoxel(), vlVolInfo::dataType(), vlVolData::dataType(), vlVolInfo::dim(), vlVolData::dim(), vlVolInfo::extraInfo(), vlVarList::get(), vlVolInfo::headerSize(), vlVarList::isDefined(), vlVolInfo::isValid(), vlVolIterConst< DataType, Layout >::nextXYZ(), vlVolIter< DataType, Layout >::set(), vlVolInfo::stepping(), VL_NO_COMPRESSION, VL_RUN_LENGTH_ENCODE, vlCompressionType, vlTriple< uint16 >::z(), and vlTriple< uint32 >::z().

bool vlVolFioSLC::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_slc.cpp.

References vlVarList::add(), vlVolInfo::bytesPerVoxel(), vlVolInfo::dim(), vlVolInfo::extraInfo(), vlVolInfo::extraInfoRW(), int16, vlVarList::isDefined(), MAGIC_NUMBER, vlVarList::set(), vlVolInfo::setBitsPerVoxel(), vlVolInfo::setBytesPerVoxel(), vlVolInfo::setDataType(), vlVolInfo::setDim(), vlVolInfo::setHeaderSize(), vlVolInfo::setStepping(), vlVolInfo::setUnits(), uint32, UnknownDataType, UnsignedInt16, UnsignedInt8, VL_NO_COMPRESSION, vlCompressionType, vlTriple< float >::x(), vlTriple< uint16 >::x(), vlTriple< T >::x(), vlTriple< float >::y(), vlTriple< uint16 >::y(), vlTriple< T >::y(), vlTriple< float >::z(), vlTriple< uint16 >::z(), and vlTriple< T >::z().

bool vlVolFioSLC::volvisRunLengthEncode unsigned char **  out_ptr,
unsigned int *  out_size,
unsigned char *  in_ptr,
unsigned int  in_size
 

Parameters:
out_ptr 
out_size 
in_ptr 
in_size 
Returns:
RLE encoded data pointer and size

Definition at line 656 of file vlvolfio_slc.cpp.

Referenced by writeData().

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

Implements vlVolFioFilter.

Definition at line 454 of file vlvolfio_slc.cpp.

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

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

Implements vlVolFioFilter.

Definition at line 409 of file vlvolfio_slc.cpp.

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


Member Data Documentation

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

Definition at line 82 of file vlvolfio_slc.h.

Referenced by getFileExtensions(), and vlVolFioSLC().

FILE* vlVolFioSLC::m_fileId [protected]
 

Definition at line 76 of file vlvolfio_slc.h.

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

Definition at line 79 of file vlvolfio_slc.h.

int const vlVolFioSLC::MAGIC_NUMBER = 11111 [static]
 

Definition at line 72 of file vlvolfio_slc.h.

Referenced by readInfo(), and writeInfo().


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