#include <vlvolume.h>
Public Member Functions | |
| vlVolume (const vlDim &dim=vlDim(1, 1, 1), const vlDataType dataType=UnsignedInt8, const vlUnit &units=vlUnit(1.0, 1.0, 1.0)) | |
| default constructor | |
| vlVolume (const vlDim &dim, const std::string &layout, const vlDataType dataType=UnsignedInt8, const vlUnit &units=vlUnit(1.0, 1.0, 1.0)) | |
| Constructor where the layout can be specified. | |
| virtual | ~vlVolume () |
| default destructor | |
| bool | readInfo (const std::string &filename, vlVolInfo &info, bool useFileExt=true) |
| Read information stored in file from disk. | |
| bool | readInfo (const std::string &filename, vlVolInfo &info, const std::string &fileFormat, bool useFileExt=true) |
| Read information stored in file from disk. | |
| bool | readSubvolumes (const std::string &imgfilepath, const std::string &imgfilelist, const vlVolInfo &imgInfo, const vlVolInfo &info, const unsigned int nsubVols=0, const unsigned int start=0) |
| Read Subvolumes specified by imglist from imgfilepath into a volume file using the given volume info. | |
| bool | readSubvolumes (const std::string &imgfilepath, std::vector< std::string >, const vlVolInfo &info, const unsigned int nsubVols=0, const unsigned int start=0) |
| Read Subvolumes specified by imglist from imgfilepath into a volume file using the given volume info. | |
| bool | readSubvolumes (const std::string &imgfilepath, std::vector< std::string >, const vlVolInfo &imgInfo, const vlVolInfo &info, const unsigned int nsubVols=0, const unsigned int start=0) |
| Read Subvolumes specified by imglist from imgfilepath into a volume file using the given volume info. | |
| std::queue< std::string > | readImages (const std::string &imgfilepath, const std::string &imgfilelist, const vlVolInfo &imgInfo, const vlVolInfo &info, const unsigned int start=0) |
| std::queue< std::string > | readImages (const std::string &imgfilepath, const std::string &imgfilelist, const vlVolInfo &info, const unsigned int start=0) |
| Read images specified by imgfilelist from imgfilepath into a volume file using the given info. | |
| std::queue< std::string > | readImages (const std::string &imgfilepath, std::queue< std::string > validImgList, const vlVolInfo &imgInfo, const vlVolInfo &info, const unsigned int start=0) |
| bool | read (const std::string &filename, bool useFileExt=true) |
| Read a volume file from disk. | |
| bool | read (const std::string &filename, const std::string &fileFormat) |
| Read a volume file from disk using the given format. | |
| bool | read (const std::string &filename, const vlVolInfo &info, bool useFileExt=true) |
| Read a volume file from disk using the given info. | |
| bool | read (const std::string &filename, const vlVolInfo &info, const std::string &fileFormat, bool useFileExt=true) |
| Read a volume file from disk using the given info and file format. | |
| bool | writeSlice (const std::string &filename, const int slice=1) const |
| Write volume to a file. | |
| bool | writeSlice (const std::string &filename, const std::string &format, const bool appendExtension=false, const int slice=1) const |
| Write volume to a file using the given format. | |
| bool | write (const std::string &filename) const |
| Write volume to a file. | |
| bool | write (const std::string &filename, const std::string &format, const bool appendExtension=false) const |
| Write volume to a file using the given format. | |
| bool | isValid () const |
| Checks if this is a valid volume. Returns true of it is valid, else false. | |
| bool | resize (vlDim const &newDim, const bool keep=false, const vlPoint3ui cropStart=vlPoint3ui(0, 0, 0)) |
| Resize the volume. | |
| bool | clear (const uint8 data=0x00) |
| Clears the volume data with the given data. | |
| vlDim | dim () const |
| Returns the dimensions of the 3D data. | |
| vlStep | stepping () const |
| Returns the stepping in voxel distance along x, y and z axis. | |
| vlUnit | units () const |
| Returns the actual distance between the voxels along x, y and z. | |
| uint16 | bitsPerVoxel () const |
| Returns the number of bits that form a voxel. | |
| uint16 | bytesPerVoxel () const |
| Returns the number of bytes that form a voxel. | |
| uint64 | voxelCount () const |
| Returns the total number of voxels in the volume = XDim x YDim x ZDim. | |
| vlDataType | dataType () const |
| Returns the type of the data stored. | |
| const char * | typeInfo () const |
| Returns the type info of the stored data. | |
| vlLayoutType | dataLayout () const |
| Returns the layout in which data is stored. | |
| std::string | dataLayoutName () const |
| Returns the name of the layout. | |
| vlVolDataLayoutPlugin * | dataLayoutPlugin () const |
| Returns pointer to the plugin which provides the current layout. | |
| bool | isDirty () const |
| Returns the state of the dirty flag. | |
| void | setDirty (bool dirty) |
| Set/Reset the dirty flag. | |
| const vlVarList * | extraInfo () const |
| Returns a const pointer to the extra information about the volume. | |
| vlVarList * | extraInfoRW () |
| Same as the above extraInfo() function except that pointer is non-const. | |
| void * | getVoxelVoidPtr (const vlPoint3ui &position) const |
| Returns the pointer to the voxel at the given position. | |
| template<class DataType> bool | getVoxel (const vlPoint3ui &position, DataType &voxel) const |
| Get the voxel value at the given position. | |
| template<class DataType> bool | getVoxel (const vlPoint3f &position, DataType &voxel) const |
| Get the voxel value at the given position in float. | |
| template<class DataType> bool | setVoxel (const vlPoint3ui &position, const DataType voxel) |
| Set the voxel value at the given position to 'voxel'. | |
Protected Member Functions | |
| template<class DataType> bool | copyDataT (DataType &dummy, vlVolData *fromData, vlVolData *toData, vlPoint3ui fromPos=vlPoint3ui(0, 0, 0), vlPoint3ui toPos=vlPoint3ui(0, 0, 0)) |
| Copys data of same DataType from fromData at fromPos to toData at toPos. | |
| template<class DataType> bool | cropSliceT (DataType &dummy, const vlPoint3ui slicePos, const vlPoint3ui volPos) |
| Copys data of same DataType from slicePos in m_pSliceData to volPos in m_pVolData. | |
| bool | cropRGBtoRGBA (const vlPoint3ui slicePos, const vlPoint3ui volPos, uint8 threshold=0) |
| Copys RGB data from slicePos in m_pSliceData to RGBA data at volPos in m_pVolData. | |
| bool | cropREDtoRGBA (const vlPoint3ui slicePos, const vlPoint3ui volPos, uint8 threshold=0) |
| Copys RGB data from slicePos in m_pSliceData to RGBA data at volPos in m_pVolData. | |
| bool | cropRGBtoRed (const vlPoint3ui slicePos, const vlPoint3ui volPos, uint8 threshold=0) |
| Copys Red channel of RGB data from slicePos in m_pSliceData to raw data at volPos in m_pVolData. | |
| vlVolData * | volDataRW () |
| Returns a RW pointer to the storage of volume data. | |
| vlVolData * | volData () const |
| Returns a const pointer to the storage of volume data. | |
| vlVolInfo * | getVolInfo () const |
| Returns the volume information as a vlVolInfo structure. | |
| bool | resizeData (const vlDim &newDim, const vlDataType dataType, const vlUnit &units, const std::string &layout) |
| Resize the data stored in the volume. | |
| vlVolData * | createData (const vlDim &newDim, const vlDataType dataType, const vlUnit &units, const std::string &layout) |
| This will create a new vlVolData storage buffer for you. | |
Private Attributes | |
| vlVarListAdmin | m_extraInfo |
| Stores extra information about the volume like author etc. | |
| vlVolData * | m_pVolData |
| stores the volume data | |
| vlVolData * | m_pSliceData |
| vlPoint3ui | m_origFilePos |
| vlDim | m_origFileDim |
| vlVolDataLayoutPlugin * | m_layoutPlugin |
| Stores the plugin which was used for the current data layout. | |
Friends | |
| class | vlSlice |
| class | vlVolIterBase |
| class | vlVolIterBaseConst |
Definition at line 52 of file vlvolume.h.
|
||||||||||||||||
|
Definition at line 51 of file vlvolume.cpp. References vlVarListAdmin::add(), m_extraInfo, m_layoutPlugin, m_pVolData, name, and resizeData(). |
|
||||||||||||||||||||
|
Definition at line 74 of file vlvolume.cpp. References vlVarListAdmin::add(), m_extraInfo, m_layoutPlugin, m_pVolData, name, and resizeData(). |
|
|
Definition at line 94 of file vlvolume.cpp. References m_layoutPlugin, and m_pVolData. |
|
|
Definition at line 1635 of file vlvolume.cpp. References vlVolData::bitsPerVoxel(), m_pVolData, and uint16. Referenced by getVolInfo(). |
|
|
Definition at line 1644 of file vlvolume.cpp. References vlVolData::bytesPerVoxel(), m_pVolData, and uint16. Referenced by getVolInfo(), and vlSlice::getVoxelInfo(). |
|
|
Definition at line 1599 of file vlvolume.cpp. References vlVolData::clear(), and m_pVolData. |
|
||||||||||||||||||||||||||||
|
Definition at line 524 of file vlvolume.cpp. References vlVolData::dim(), vlVolIterConst< DataType, Layout >::get(), min, vlVolIterConst< DataType, Layout >::moveTo(), vlVolIterConst< DataType, Layout >::nextXYZ(), vlVolIter< DataType, Layout >::set(), vlTriple< uint16 >::x(), vlTriple< uint16 >::y(), and vlTriple< uint16 >::z(). Referenced by readSubvolumes(), and resize(). |
|
||||||||||||||||||||
|
Definition at line 1550 of file vlvolume.cpp. References vlVolDataLayoutPlugin::getLayout(), vlTrader::getPlugin(), vlPlugin::info(), m_layoutPlugin, vlPluginInfo::service(), and vlKernel::trader(). Referenced by readImages(), readSubvolumes(), and resize(). |
|
||||||||||||||||
|
Definition at line 582 of file vlvolume.cpp. References dim(), vlVolIterConst< DataType, Layout >::get(), m_pSliceData, m_pVolData, vlVolIterConst< DataType, Layout >::moveTo(), vlVolIterConst< DataType, Layout >::nextXYZ(), vlVolIter< DataType, Layout >::set(), threshold, uint8, vlColorRGBAub, vlTriple< uint16 >::x(), and vlTriple< uint16 >::y(). Referenced by readImages(). |
|
||||||||||||||||
|
Definition at line 637 of file vlvolume.cpp. References dim(), vlVolIterConst< DataType, Layout >::get(), m_pSliceData, m_pVolData, vlVolIterConst< DataType, Layout >::moveTo(), vlVolIterConst< DataType, Layout >::nextXYZ(), vlVolIter< DataType, Layout >::set(), threshold, uint8, vlTriple< uint16 >::x(), and vlTriple< uint16 >::y(). Referenced by readImages(). |
|
||||||||||||||||
|
Definition at line 609 of file vlvolume.cpp. References dim(), vlVolIterConst< DataType, Layout >::get(), m_pSliceData, m_pVolData, vlVolIterConst< DataType, Layout >::moveTo(), vlVolIterConst< DataType, Layout >::nextXYZ(), vlVolIter< DataType, Layout >::set(), threshold, uint8, vlTriple< uint16 >::x(), and vlTriple< uint16 >::y(). Referenced by readImages(). |
|
||||||||||||||||||||
|
Definition at line 559 of file vlvolume.cpp. References dim(), vlVolIterConst< DataType, Layout >::get(), m_pSliceData, m_pVolData, vlVolIterConst< DataType, Layout >::moveTo(), vlVolIterConst< DataType, Layout >::nextXYZ(), vlVolIter< DataType, Layout >::set(), vlTriple< uint16 >::x(), and vlTriple< uint16 >::y(). Referenced by readImages(). |
|
|
Definition at line 1680 of file vlvolume.cpp. References vlVolData::layout(), vlLayout::Linear, m_pVolData, and vlLayoutType. |
|
|
Definition at line 1689 of file vlvolume.cpp. References vlPlugin::info(), m_layoutPlugin, and vlPluginInfo::service(). Referenced by read(), readImages(), readSubvolumes(), and resize(). |
|
|
This will return a null pointer if the currently used layout was compiled-in and hence was not loaded from a dynamic plugin. Definition at line 1765 of file vlvolume.cpp. References m_layoutPlugin. |
|
|
|
|
Definition at line 1727 of file vlvolume.cpp. References m_extraInfo. |
|
|
Definition at line 1733 of file vlvolume.cpp. References m_extraInfo. |
|
|
Definition at line 1748 of file vlvolume.cpp. References bitsPerVoxel(), bytesPerVoxel(), dataType(), dim(), m_extraInfo, m_origFileDim, m_origFilePos, vlVolInfo::setBitsPerVoxel(), vlVolInfo::setBytesPerVoxel(), vlVolInfo::setDataType(), vlVolInfo::setDim(), vlVolInfo::setExtraInfo(), vlVolInfo::setOrigFileDim(), vlVolInfo::setOrigFilePos(), vlVolInfo::setStepping(), vlVolInfo::setUnits(), stepping(), and units(). Referenced by write(). |
|
||||||||||||||||
|
Definition at line 220 of file vlvolume.h. References m_pVolData, and vlVolData::typeInfo(). |
|
||||||||||||||||
|
Definition at line 203 of file vlvolume.h. References m_pVolData, and vlVolData::typeInfo(). |
|
|
This returns a void pointer, so make sure you cast it to the correct type. To avoid type-conflicts, "use iterators".
Definition at line 1739 of file vlvolume.cpp. References vlVolData::getVoxelVoidPtr(), and m_pVolData. |
|
|
Definition at line 1710 of file vlvolume.cpp. References vlVolData::isDirty(), and m_pVolData. Referenced by vlHistogram::update(). |
|
|
Definition at line 1698 of file vlvolume.cpp. References vlVolData::isValid(), and m_pVolData. Referenced by vlVolProcessorSobel::run(), vlVolProcessorRegionGrow::run(), vlVolProcessorErode::run(), vlVolProcessorDilate::run(), vlVolProcessorConcatenate::run(), vlVolProcessorCentralDiff::run(), vlVolProcessor::setVolume(), and write(). |
|
||||||||||||||||||||
|
If the given format does not succeed, no further atempt is made to read the file
Definition at line 356 of file vlvolume.cpp. References dataLayoutName(), vlVolInfo::dataType(), vlVolInfo::dim(), vlVolInfo::extraInfo(), fileExt, filename, vlVarList::get(), vlVolFioFilter::getFileExtensions(), vlTrader::getPluginsForGroup(), vlPlugin::info(), vlKernel::instance(), vlVarList::isDefined(), vlVolInfo::isValid(), m_extraInfo, m_pVolData, name, vlVolFioFilter::readData(), vlVolFioFilter::readInfo(), resizeData(), vlPluginInfo::service(), vlVarList::set(), vlKernel::trader(), and vlVolInfo::units(). |
|
||||||||||||||||
|
File format will be auto detected. (based on 1. file extension and 2. ability to read file header.)
Definition at line 332 of file vlvolume.cpp. |
|
||||||||||||
|
If the given format does not succeed, no further atempt is made to read the file
Definition at line 304 of file vlvolume.cpp. |
|
||||||||||||
|
If useFileExt is true (default), the extension is matched to check if the plugin can open the file. If extension matches, the IO filter tries to read the file header. If it succeeds, it goes on to read the dataset. v
Definition at line 285 of file vlvolume.cpp. References filename. |
|
||||||||||||||||||||||||
|
||||||||||||||||||||
|
The extension of the first image file is matched to check if the plugin can open the file. If extension matches, the IO filter tries to read the file header. If it succeeds, it goes on to read the dataset.
Definition at line 985 of file vlvolume.cpp. References imgfilelist, imgfilepath, and readImages(). |
|
||||||||||||||||||||||||
|
Definition at line 992 of file vlvolume.cpp. References vlVolInfo::dim(), imgfilelist, imgfilepath, and vlTriple< uint16 >::z(). Referenced by CreateVolume(), and readImages(). |
|
||||||||||||||||||||
|
If the given format does not succeed, no further atempt is made to read the file
Definition at line 137 of file vlvolume.cpp. References vlVarList::add(), vlVolInfo::dim(), vlVolInfo::extraInfoRW(), fileExt, filename, vlVolFioFilter::getFileExtensions(), vlTrader::getPluginsForGroup(), vlPlugin::info(), vlKernel::instance(), name, vlPluginInfo::name(), vlVolFioFilter::readInfo(), vlPluginInfo::service(), and vlKernel::trader(). |
|
||||||||||||||||
|
The file format is autodetected. If useFileExt is set to true, the file format will be detected based on the file extension. Else, each plugin will be try to read the file. The first successful plugin will be used.
Definition at line 116 of file vlvolume.cpp. References filename. Referenced by main(). |
|
||||||||||||||||||||||||||||
|
||||||||||||||||||||||||
|
Definition at line 735 of file vlvolume.cpp. References imgfilepath, and readSubvolumes(). |
|
||||||||||||||||||||||||||||
|
If extension matches, the IO filter tries to read the file header. If it succeeds, it goes on to read the dataset.
Definition at line 686 of file vlvolume.cpp. References imgfilelist, and imgfilepath. Referenced by CreateVolume(), and readSubvolumes(). |
|
||||||||||||||||
|
Note that the entire volume data will be lost.
Definition at line 1461 of file vlvolume.cpp. References callFunctionOnDataType, copyDataT(), createData(), dataLayoutName(), vlVolData::dataType(), m_origFilePos, m_pSliceData, m_pVolData, resizeData(), and vlVolData::units(). Referenced by CreateVolume(), readImages(), and vlVolProcessorConcatenate::run(). |
|
||||||||||||||||||||
|
Definition at line 1488 of file vlvolume.cpp. References vlVolDataLayoutPlugin::getLayout(), vlTrader::getPlugin(), vlPlugin::info(), m_layoutPlugin, m_pVolData, vlPluginInfo::service(), and vlKernel::trader(). Referenced by read(), readImages(), readSubvolumes(), resize(), and vlVolume(). |
|
|
Definition at line 1719 of file vlvolume.cpp. References m_pVolData, and vlVolData::setDirty(). |
|
||||||||||||||||
|
Definition at line 237 of file vlvolume.h. References m_pVolData, and vlVolData::typeInfo(). |
|
|
Definition at line 1617 of file vlvolume.cpp. References m_pVolData, and vlVolData::stepping(). Referenced by getVolInfo(). |
|
|
Definition at line 1671 of file vlvolume.cpp. References m_pVolData, and vlVolData::typeInfo(). Referenced by vlVolIterBaseConst< DataType >::vlVolIterBaseConst(). |
|
|
Definition at line 1626 of file vlvolume.cpp. References m_pVolData, and vlVolData::units(). Referenced by getVolInfo(). |
|
|
Definition at line 273 of file vlvolume.h. References m_pVolData. Referenced by vlVolIterBaseConst< DataType >::vlVolIterBaseConst(). |
|
|
Definition at line 270 of file vlvolume.h. References m_pVolData. |
|
|
Definition at line 1653 of file vlvolume.cpp. References m_pVolData, uint64, and vlVolData::voxelCount(). Referenced by main(). |
|
||||||||||||||||
|
Definition at line 1297 of file vlvolume.cpp. References extension(), fileExt, filename, vlVolFioFilter::getFileExtensions(), vlTrader::getPluginsForGroup(), getVolInfo(), vlPlugin::info(), isValid(), m_pVolData, vlVolInfo::origFilePos(), vlPluginInfo::service(), vlKernel::trader(), vlVolFioFilter::writeData(), and vlVolFioFilter::writeInfo(). |
|
|
The format used to write the file will depend on the file extension. The file extension of the given file will be matched with extensions supported by file IO plugins. If there is a match, that format will be used to write the file.
Definition at line 1279 of file vlvolume.cpp. References filename. Referenced by CreateVolume(), and main(). |
|
||||||||||||||||||||
|
|
|
||||||||||||
|
|
|
|
Definition at line 56 of file vlvolume.h. |
|
|
Definition at line 60 of file vlvolume.h. |
|
|
Definition at line 63 of file vlvolume.h. |
|
|
Definition at line 292 of file vlvolume.h. Referenced by extraInfo(), extraInfoRW(), getVolInfo(), read(), and vlVolume(). |
|
|
Definition at line 300 of file vlvolume.h. Referenced by createData(), dataLayoutName(), dataLayoutPlugin(), resizeData(), vlVolume(), and ~vlVolume(). |
|
|
Definition at line 298 of file vlvolume.h. Referenced by getVolInfo(), and readSubvolumes(). |
|
|
Definition at line 297 of file vlvolume.h. Referenced by getVolInfo(), readImages(), readSubvolumes(), and resize(). |
|
|
Definition at line 296 of file vlvolume.h. Referenced by cropREDtoRGBA(), cropRGBtoRed(), cropRGBtoRGBA(), cropSliceT(), readImages(), readSubvolumes(), and resize(). |
|
|
Definition at line 295 of file vlvolume.h. Referenced by bitsPerVoxel(), bytesPerVoxel(), clear(), cropREDtoRGBA(), cropRGBtoRed(), cropRGBtoRGBA(), cropSliceT(), dataLayout(), dataType(), dim(), getVoxel(), getVoxelVoidPtr(), isDirty(), isValid(), read(), readSubvolumes(), resize(), resizeData(), setDirty(), setVoxel(), stepping(), typeInfo(), units(), vlVolume(), volData(), volDataRW(), voxelCount(), write(), and ~vlVolume(). |
1.3.3