MeVisLab Toolbox Reference
SoVirtualVolume Class Reference

The SoVirtualVolume class for fast voxel based access to paged ML images; see also mlVirtualVolume and mlTVirtualVolume in project MLTools for examples etc. More...

#include <SoVirtualVolume.h>

Public Member Functions

SO_VIRTUALVOLUME_EXPORT SoVirtualVolume (SoSFMLImage &image, MLDataType dType=ML_INVALID_DATA_TYPE, long maxNumKB=-1, bool useExceptions=false)
 Constructor which creates a SoVirtualVolume interface to an ML paged image hidden behind image.
 
SO_VIRTUALVOLUME_EXPORT SoVirtualVolume (const XVImageSize &ext=XVImageSize(0), double fillVal=0, MLDataType dType=MLuint8Type, long maxNumKB=-1, bool useExceptions=false)
 Constructor to map an image of extents ext filled with fillVal.
 
virtual SO_VIRTUALVOLUME_EXPORT ~SoVirtualVolume ()
 Destructor.
 
SO_VIRTUALVOLUME_EXPORT bool isValid () const
 Returns true if access methods may be called, otherwise false.
 
SO_VIRTUALVOLUME_EXPORT SoSFMLImagegetImage () const
 Returns the SoSFMLImage the SoVirtualVolume is associated to or NULL if it's a Virtual Volume of user defined extents and contents.
 
SO_VIRTUALVOLUME_EXPORT MLDataType getDataType () const
 Returns the data type used as internal data type of the virtual volume or - if currently no valid virtual volume exists - the value passed as dType to the constructor.
 
long getMaxNumKB () const
 Returns the maxNumKB value passed to the constructor.
 
bool areExceptionsOn () const
 Returns the useExceptions value passed to the constructor.
 
SO_VIRTUALVOLUME_EXPORT MLuint getNumMappedPages () const
 Access functions to virtual volume. Only to be called if isValid() returns true!
 
SO_VIRTUALVOLUME_EXPORT MLuint getNumWrittenPages ()
 Returns number of written (and therefore locked) pages.
 
SO_VIRTUALVOLUME_EXPORT MLuint getNumPages () const
 Returns number of all (mapped and written) pages.
 
SO_VIRTUALVOLUME_EXPORT MLuint getNumBytes () const
 Returns number of bytes currently allocated as pages in the virtual volume.
 
SO_VIRTUALVOLUME_EXPORT XVImageSize getPageExtent () const
 Returns extents of a written and read pages used by the virtual volume.
 
SO_VIRTUALVOLUME_EXPORT XVImageSize getPageArrayExtent () const
 Returns extents of the array of page buffers.
 
SO_VIRTUALVOLUME_EXPORT voidgetWrittenPageData (MLuint32 wp)
 Returns untyped pointer to data of written page with page id wp.
 
SO_VIRTUALVOLUME_EXPORT void unMapAndClearWrittenPages ()
 This function throws away all written pages.
 
SO_VIRTUALVOLUME_EXPORT void resize (const XVImageSize &newExt)
 This method resizes the virtual volume to the extents given by ext.
 
Functions for virtual volume access and cursor movement, filling etc.

See documentation of corresponding functions in ML_NAMESPACE::TVirtualVolume for a detailed description.

Note
Template versions of cursor voxel and voxel access functions are often faster since data values are not cast as in the non template versions.
Casting XVIMageSize to ml:ImageVector is legal, the guarantee that they can be cast is guaranteed by checks in SoVirtualVolumeInit. Without that cast a strong performance downgrade would result.
const XVImageSizegetCursorPosition ()
 
MLint getIntValue (const XVImageSize &pos)
 
MLint64 getInt64Value (const XVImageSize &pos)
 
MLdouble getDoubleValue (const XVImageSize &pos)
 
MLldouble getLDoubleValue (const XVImageSize &pos)
 
MLint getIntCursorValue ()
 
MLint64 getInt64CursorValue ()
 
MLdouble getDoubleCursorValue ()
 
MLldouble getLDoubleCursorValue ()
 
bool isMapped (const XVImageSize &pos)
 
void setCursorPosition (const XVImageSize &pos)
 
void setIntValue (const XVImageSize &pos, MLint v)
 
void setInt64Value (const XVImageSize &pos, MLint64 v)
 
void setDoubleValue (const XVImageSize &pos, MLdouble v)
 
void setLDoubleValue (const XVImageSize &pos, MLldouble v)
 
void setIntCursorValue (MLint v)
 
void setInt64CursorValue (MLint64 v)
 
void setDoubleCursorValue (MLdouble v)
 
void setLDoubleCursorValue (MLldouble v)
 
void fillInt (const XVImageSize &boxV1, const XVImageSize &boxV2, MLint v)
 
void fillInt64 (const XVImageSize &boxV1, const XVImageSize &boxV2, MLint64 v)
 
void fillDouble (const XVImageSize &boxV1, const XVImageSize &boxV2, MLdouble v)
 
void fillLDouble (const XVImageSize &boxV1, const XVImageSize &boxV2, MLldouble v)
 
void moveCursorX ()
 
void moveCursorY ()
 
void moveCursorZ ()
 
void moveCursorC ()
 
void moveCursorT ()
 
void moveCursorU ()
 
void reverseMoveCursorX ()
 
void reverseMoveCursorY ()
 
void reverseMoveCursorZ ()
 
void reverseMoveCursorC ()
 
void reverseMoveCursorT ()
 
void reverseMoveCursorU ()
 
void moveCursorByOffset (const XVImageSize &off)
 
void resetCursor ()
 
bool moveCursorXWrapAround ()
 
Typed access functions. Only to be called if \c isValid() returns true and \c DATATYPE matches getDataType()!
template<typename DATATYPE >
SO_VIRTUALVOLUME_EXPORT void getValue (const XVImageSize &pos, DATATYPE &retVal)
 Get a voxel from the virtual volume.
 
template<typename DATATYPE >
SO_VIRTUALVOLUME_EXPORT void setValue (const XVImageSize &pos, DATATYPE data)
 Write a voxel into the virtual volume.
 
template<typename DATATYPE >
SO_VIRTUALVOLUME_EXPORT void setCursorValue (DATATYPE val)
 Set value under cursor and lock page.
 
template<typename DATATYPE >
SO_VIRTUALVOLUME_EXPORT void getCursorValue (DATATYPE &retVal)
 
template<typename DATATYPE >
SO_VIRTUALVOLUME_EXPORT void fill (const XVImageSize &boxV1, const XVImageSize &boxV2, DATATYPE value)
 Fill the area box in the virtual image with voxel value value.
 
template<typename DATATYPE >
SO_VIRTUALVOLUME_EXPORT void getWrittenPageData (MLuint32 wp, DATATYPE *&dataPtr) const
 Returns typed pointer to voxel data of written page number wp.
 

Protected Member Functions

SO_VIRTUALVOLUME_EXPORT SoVirtualVolume (const SoVirtualVolume &virtVol)
 Copy constructor.
 
SO_VIRTUALVOLUME_EXPORT SoVirtualVolumeoperator= (const SoVirtualVolume &virtVol)
 Assignment operator.
 
SO_VIRTUALVOLUME_EXPORT void _updateVirtualVolumes (const XVImageSize &ext=XVImageSize(0), double fillVal=0, MLDataType dType=MLuint8Type, long maxNumKB=-1, bool useExceptions=false)
 If there is a non NULL SoSFMLImage pointer in _image which contains a valid connection to a valid ML image then this method recreates the virtual volume with the extents of _image.
 
SO_VIRTUALVOLUME_EXPORT void _createTypedVirtualVolume ()
 Create the typed version of the virtual volume and set up all function pointers from function wrapper.
 
SO_VIRTUALVOLUME_EXPORT void _removeVirtualVolumes (bool removeOnlyTyped=false)
 Removes all current virtual volumes.
 
void _enforceInstPub ()
 Template instantiation helper function. This function must not be called.
 
void _enforceInstPub2 ()
 Template instantiation helper function. This function must not be called.
 

Static Protected Member Functions

static SO_VIRTUALVOLUME_EXPORT void _imageChangedCB (void *clientData, SoSensor *sensor)
 Static function called if _fieldSensor detects a change of _image; it updates the internal virtual volumes to image changes.
 

Protected Attributes

SoSFMLImage_image
 Reference to the SoSFMLImage passed in the constructor.
 
MLDataType _constructorDataType
 Extents passed to constructor.
 
long _constructorMaxNumKB
 maxNumKB passed to constructor.
 
bool _constructorAreExceptionsOn
 useExceptions passed to constructor.
 
SoFieldSensor _fieldSensor
 Field sensor attached to the SoSFMLImage passed in the constructor.
 
ml::VirtualVolume_virtualVolume
 Pointer to the current untyped virtual volume or NULL if there is none.
 
void_tVirtualVolume
 Pointer to the current typed virtual volume or NULL if there is none.
 

Detailed Description

The SoVirtualVolume class for fast voxel based access to paged ML images; see also mlVirtualVolume and mlTVirtualVolume in project MLTools for examples etc.

Definition at line 38 of file SoVirtualVolume.h.

Constructor & Destructor Documentation

◆ SoVirtualVolume() [1/3]

SO_VIRTUALVOLUME_EXPORT SoVirtualVolume::SoVirtualVolume ( SoSFMLImage & image,
MLDataType dType = ML_INVALID_DATA_TYPE,
long maxNumKB = -1,
bool useExceptions = false )

Constructor which creates a SoVirtualVolume interface to an ML paged image hidden behind image.

If possible a SoVirtualVolume should be created as soon as possible after the SoSFMLImage initialization to be sure that it's notified first before other sensors on changes of image. So accesses to the SoVirtualVolume take place before other notifications.

Parameters
imageis the SoSFMLImage which shall be interfaced by the SoSVirtualVolume.
dTypeis the ML data type the SoVirtualVolume shall use internally. If passed as -1 the data type of image is used.
maxNumKB
useExceptionscontrols whether the virtual volume runs save accesses to the image or unsafe ones. If disabled invalid accesses will lead to undefined program state; if enabled the controlled exceptions will be thrown which can be handled safely. See mlVirtualVolume.h in project MLTools for more infos.

◆ SoVirtualVolume() [2/3]

SO_VIRTUALVOLUME_EXPORT SoVirtualVolume::SoVirtualVolume ( const XVImageSize & ext = XVImageSize(0),
double fillVal = 0,
MLDataType dType = MLuint8Type,
long maxNumKB = -1,
bool useExceptions = false )

Constructor to map an image of extents ext filled with fillVal.

Parameters
extspecifies the extents of the virtual volume to be created. Default is 0.
fillValis the default value for all unwritten (i.e. background) virtual volume areas. Default is 0.
dTypedefines the data type of the virtual volume. Default is MLuint8Type.
maxNumKBmeans that enough pages are buffered so that at least one horizontal line of image data can be accessed without swapping pages. Otherwise maxNumKB determines the maximum buffer size for all swapped read pages. Default is -1.
useExceptionsIf true then testing of all calls for validity is enabled and exception are thrown on errors. Otherwise errors only partially throw exceptions or could lead to undefined program behaviour. See mlVirtualVolume.h in project MLTools for more infos.

◆ ~SoVirtualVolume()

virtual SO_VIRTUALVOLUME_EXPORT SoVirtualVolume::~SoVirtualVolume ( )
virtual

Destructor.

It destroys the voxel based access to the SoSFMLImage (if such a constructor was used). Anyway, you can keep on using that SoSFMLImage image after destruction of this.

◆ SoVirtualVolume() [3/3]

SO_VIRTUALVOLUME_EXPORT SoVirtualVolume::SoVirtualVolume ( const SoVirtualVolume & virtVol)
protected

Copy constructor.

Protected since copying of mapped virtual volumes is not well defined, especially if they're associated to SoSFMLImages.

Member Function Documentation

◆ _createTypedVirtualVolume()

SO_VIRTUALVOLUME_EXPORT void SoVirtualVolume::_createTypedVirtualVolume ( )
protected

Create the typed version of the virtual volume and set up all function pointers from function wrapper.

All former pointers are overwritten, even allocated pointers.

◆ _enforceInstPub()

void SoVirtualVolume::_enforceInstPub ( )
inlineprotected

Template instantiation helper function. This function must not be called.

Definition at line 429 of file SoVirtualVolume.h.

◆ _enforceInstPub2()

void SoVirtualVolume::_enforceInstPub2 ( )
inlineprotected

Template instantiation helper function. This function must not be called.

Definition at line 432 of file SoVirtualVolume.h.

◆ _imageChangedCB()

static SO_VIRTUALVOLUME_EXPORT void SoVirtualVolume::_imageChangedCB ( void * clientData,
SoSensor * sensor )
staticprotected

Static function called if _fieldSensor detects a change of _image; it updates the internal virtual volumes to image changes.

Parameters
clientDataData passed to the sensor while it is attached to the image. In this case it will point to the instance, i.e. it is this.
sensorThe which has detected the field change and which is calling this function. In this case it's &_fieldSensor.

◆ _removeVirtualVolumes()

SO_VIRTUALVOLUME_EXPORT void SoVirtualVolume::_removeVirtualVolumes ( bool removeOnlyTyped = false)
protected

Removes all current virtual volumes.

If removeOnlyTyped is true then only the typed virtual volume is removed and the untyped one remains.

◆ _updateVirtualVolumes()

SO_VIRTUALVOLUME_EXPORT void SoVirtualVolume::_updateVirtualVolumes ( const XVImageSize & ext = XVImageSize(0),
double fillVal = 0,
MLDataType dType = MLuint8Type,
long maxNumKB = -1,
bool useExceptions = false )
protected

If there is a non NULL SoSFMLImage pointer in _image which contains a valid connection to a valid ML image then this method recreates the virtual volume with the extents of _image.

The data type of the virtual volume is set to dType if that's valid, otherwise the data type of the SoSFMLImage is used. The size of the page buffer is automatically determined if maxNumKB is < 0; otherwise a buffer size given by maxNumKB is assumed. Exception handling is enabled if areExceptionOn() is true; otherwise it's disabled. If no valid _image is set then a virtual volume of extents given by ext with data type dType is created. maxNumKB and useExceptions are handled as above. Passing an invalid dType there will lead to an error and the invalidation of the virtual volume.

Parameters
extDetermines the extents of the virtual volume if _image is not valid. Default is (0,0,0,0,0,0).
fillValDetermines the background/fill value of the virtual volume if _image is not valid. Default is 0.
dTypeDetermines the data type how data is stored in the virtual volume. If -1 then the type of _image is used. If that's not valid then an error is created and the virtual volume will be invalidated. Default is MLuint8Type.
maxNumKBIf -1 it means that enough pages are buffered so that at least one horizontal line of image data can be accessed without swapping pages. Otherwise maxNumKB determines the maximum buffer size for all swapped read pages. Default is -1.
useExceptionsException handling is enabled if areExceptionOn() is true; otherwise it's disabled. Default is false.

◆ areExceptionsOn()

bool SoVirtualVolume::areExceptionsOn ( ) const
inline

Returns the useExceptions value passed to the constructor.

Definition at line 103 of file SoVirtualVolume.h.

References _constructorAreExceptionsOn.

◆ fill()

template<typename DATATYPE >
SO_VIRTUALVOLUME_EXPORT void SoVirtualVolume::fill ( const XVImageSize & boxV1,
const XVImageSize & boxV2,
DATATYPE value )

Fill the area box in the virtual image with voxel value value.

If area reaches outside the valid virtual volume area it is automatically clamped to valid voxels.

Note
DATATYPE must fit the internal SoVirtualVolume type or crashes will occur.

◆ fillDouble()

void SoVirtualVolume::fillDouble ( const XVImageSize & boxV1,
const XVImageSize & boxV2,
MLdouble v )
inline

Definition at line 188 of file SoVirtualVolume.h.

References _tVirtualVolume, and mlrange_cast().

◆ fillInt()

void SoVirtualVolume::fillInt ( const XVImageSize & boxV1,
const XVImageSize & boxV2,
MLint v )
inline

Definition at line 186 of file SoVirtualVolume.h.

References _tVirtualVolume, and mlrange_cast().

◆ fillInt64()

void SoVirtualVolume::fillInt64 ( const XVImageSize & boxV1,
const XVImageSize & boxV2,
MLint64 v )
inline

Definition at line 187 of file SoVirtualVolume.h.

References _tVirtualVolume, and mlrange_cast().

◆ fillLDouble()

void SoVirtualVolume::fillLDouble ( const XVImageSize & boxV1,
const XVImageSize & boxV2,
MLldouble v )
inline

Definition at line 189 of file SoVirtualVolume.h.

References _tVirtualVolume, and mlrange_cast().

◆ getCursorPosition()

const XVImageSize & SoVirtualVolume::getCursorPosition ( )
inline

Definition at line 167 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ getCursorValue()

template<typename DATATYPE >
SO_VIRTUALVOLUME_EXPORT void SoVirtualVolume::getCursorValue ( DATATYPE & retVal)
Returns
The value under the current cursor.
Note
DATATYPE must fit the internal SoVirtualVolume type or crashes will occur.

◆ getDataType()

SO_VIRTUALVOLUME_EXPORT MLDataType SoVirtualVolume::getDataType ( ) const

Returns the data type used as internal data type of the virtual volume or - if currently no valid virtual volume exists - the value passed as dType to the constructor.

◆ getDoubleCursorValue()

MLdouble SoVirtualVolume::getDoubleCursorValue ( )
inline

Definition at line 174 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ getDoubleValue()

MLdouble SoVirtualVolume::getDoubleValue ( const XVImageSize & pos)
inline

Definition at line 170 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ getImage()

SO_VIRTUALVOLUME_EXPORT SoSFMLImage * SoVirtualVolume::getImage ( ) const

Returns the SoSFMLImage the SoVirtualVolume is associated to or NULL if it's a Virtual Volume of user defined extents and contents.

◆ getInt64CursorValue()

MLint64 SoVirtualVolume::getInt64CursorValue ( )
inline

Definition at line 173 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ getInt64Value()

MLint64 SoVirtualVolume::getInt64Value ( const XVImageSize & pos)
inline

Definition at line 169 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ getIntCursorValue()

MLint SoVirtualVolume::getIntCursorValue ( )
inline

Definition at line 172 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ getIntValue()

MLint SoVirtualVolume::getIntValue ( const XVImageSize & pos)
inline

Definition at line 168 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ getLDoubleCursorValue()

MLldouble SoVirtualVolume::getLDoubleCursorValue ( )
inline

Definition at line 175 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ getLDoubleValue()

MLldouble SoVirtualVolume::getLDoubleValue ( const XVImageSize & pos)
inline

Definition at line 171 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ getMaxNumKB()

long SoVirtualVolume::getMaxNumKB ( ) const
inline

Returns the maxNumKB value passed to the constructor.

Definition at line 100 of file SoVirtualVolume.h.

References _constructorMaxNumKB.

◆ getNumBytes()

SO_VIRTUALVOLUME_EXPORT MLuint SoVirtualVolume::getNumBytes ( ) const

Returns number of bytes currently allocated as pages in the virtual volume.

◆ getNumMappedPages()

SO_VIRTUALVOLUME_EXPORT MLuint SoVirtualVolume::getNumMappedPages ( ) const

Access functions to virtual volume. Only to be called if isValid() returns true!

Returns number of currently mapped (volatile) pages. Written pages are counted only temporarily here.

◆ getNumPages()

SO_VIRTUALVOLUME_EXPORT MLuint SoVirtualVolume::getNumPages ( ) const

Returns number of all (mapped and written) pages.

◆ getNumWrittenPages()

SO_VIRTUALVOLUME_EXPORT MLuint SoVirtualVolume::getNumWrittenPages ( )

Returns number of written (and therefore locked) pages.

◆ getPageArrayExtent()

SO_VIRTUALVOLUME_EXPORT XVImageSize SoVirtualVolume::getPageArrayExtent ( ) const

Returns extents of the array of page buffers.

◆ getPageExtent()

SO_VIRTUALVOLUME_EXPORT XVImageSize SoVirtualVolume::getPageExtent ( ) const

Returns extents of a written and read pages used by the virtual volume.

◆ getValue()

template<typename DATATYPE >
SO_VIRTUALVOLUME_EXPORT void SoVirtualVolume::getValue ( const XVImageSize & pos,
DATATYPE & retVal )

Get a voxel from the virtual volume.

The position must be within the valid image area.

Note
DATATYPE must fit the internal SoVirtualVolume type or crashes will occur.

◆ getWrittenPageData() [1/2]

SO_VIRTUALVOLUME_EXPORT void * SoVirtualVolume::getWrittenPageData ( MLuint32 wp)

Returns untyped pointer to data of written page with page id wp.

Parameters
wpis the page id of the written page to access and it must be within [0, getNumWrittenPages()-1].
Returns
The pointer to the data related to page with index wp or NULL if wp is out of range.
Note
If page is a page crossed by the image border then it could also contain undefined data.
The number of voxels in such a page is given by getPageExt().compMul().

◆ getWrittenPageData() [2/2]

template<typename DATATYPE >
SO_VIRTUALVOLUME_EXPORT void SoVirtualVolume::getWrittenPageData ( MLuint32 wp,
DATATYPE *& dataPtr ) const

Returns typed pointer to voxel data of written page number wp.

Parameters
wpmust be within [0, vVol.getNumWrittenPages()-1].
dataPtris the reference to a pointer which shall point to the data of page wp.
Returns
The pointer to the data related to page with index wp or NULL if wp is out of range. Useful for fast access to written pages.
Note
If page is a border page then it could also contain undefined data.
Number of voxels in page is given by vVol.getPageExt().compMul().
DATATYPE must fit the internal SoVirtualVolume type or crashes will occur.

◆ isMapped()

bool SoVirtualVolume::isMapped ( const XVImageSize & pos)
inline

Definition at line 176 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ isValid()

SO_VIRTUALVOLUME_EXPORT bool SoVirtualVolume::isValid ( ) const

Returns true if access methods may be called, otherwise false.

◆ moveCursorByOffset()

void SoVirtualVolume::moveCursorByOffset ( const XVImageSize & off)
inline

Definition at line 202 of file SoVirtualVolume.h.

References _tVirtualVolume, and mlrange_cast().

◆ moveCursorC()

void SoVirtualVolume::moveCursorC ( )
inline

Definition at line 193 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ moveCursorT()

void SoVirtualVolume::moveCursorT ( )
inline

Definition at line 194 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ moveCursorU()

void SoVirtualVolume::moveCursorU ( )
inline

Definition at line 195 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ moveCursorX()

void SoVirtualVolume::moveCursorX ( )
inline

Definition at line 190 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ moveCursorXWrapAround()

bool SoVirtualVolume::moveCursorXWrapAround ( )
inline

Definition at line 204 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ moveCursorY()

void SoVirtualVolume::moveCursorY ( )
inline

Definition at line 191 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ moveCursorZ()

void SoVirtualVolume::moveCursorZ ( )
inline

Definition at line 192 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ operator=()

SO_VIRTUALVOLUME_EXPORT SoVirtualVolume & SoVirtualVolume::operator= ( const SoVirtualVolume & virtVol)
protected

Assignment operator.

Protected since copying of mapped virtual volumes is not well defined, especially if they're associated to SoSFMLImages.

◆ resetCursor()

void SoVirtualVolume::resetCursor ( )
inline

Definition at line 203 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ resize()

SO_VIRTUALVOLUME_EXPORT void SoVirtualVolume::resize ( const XVImageSize & newExt)

This method resizes the virtual volume to the extents given by ext.

Pages which do not overlap any longer with the image are thrown away and areas where new pages are needed there the corresponding tables are updated. Already mapped pages which are overlapped by the image before and after the resizing operation will remain without changing the mapping state.

Note
Resizing a virtual volume associated with a SoSFMLImage is not supported since the underlying image can not be resized. In case of errors an MLErrorCode exception is thrown if exception handling is enabled; otherwise ML_PRINT_ERROR or ML_PRINT_FATAL_ERROR messages will be generated. Resizing invalid virtual volumes or other errors will also be handled like this.

◆ reverseMoveCursorC()

void SoVirtualVolume::reverseMoveCursorC ( )
inline

Definition at line 199 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ reverseMoveCursorT()

void SoVirtualVolume::reverseMoveCursorT ( )
inline

Definition at line 200 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ reverseMoveCursorU()

void SoVirtualVolume::reverseMoveCursorU ( )
inline

Definition at line 201 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ reverseMoveCursorX()

void SoVirtualVolume::reverseMoveCursorX ( )
inline

Definition at line 196 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ reverseMoveCursorY()

void SoVirtualVolume::reverseMoveCursorY ( )
inline

Definition at line 197 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ reverseMoveCursorZ()

void SoVirtualVolume::reverseMoveCursorZ ( )
inline

Definition at line 198 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ setCursorPosition()

void SoVirtualVolume::setCursorPosition ( const XVImageSize & pos)
inline

Definition at line 177 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ setCursorValue()

template<typename DATATYPE >
SO_VIRTUALVOLUME_EXPORT void SoVirtualVolume::setCursorValue ( DATATYPE val)

Set value under cursor and lock page.

Note
DATATYPE must fit the internal SoVirtualVolume type or crashes will occur.

◆ setDoubleCursorValue()

void SoVirtualVolume::setDoubleCursorValue ( MLdouble v)
inline

Definition at line 184 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ setDoubleValue()

void SoVirtualVolume::setDoubleValue ( const XVImageSize & pos,
MLdouble v )
inline

Definition at line 180 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ setInt64CursorValue()

void SoVirtualVolume::setInt64CursorValue ( MLint64 v)
inline

Definition at line 183 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ setInt64Value()

void SoVirtualVolume::setInt64Value ( const XVImageSize & pos,
MLint64 v )
inline

Definition at line 179 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ setIntCursorValue()

void SoVirtualVolume::setIntCursorValue ( MLint v)
inline

Definition at line 182 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ setIntValue()

void SoVirtualVolume::setIntValue ( const XVImageSize & pos,
MLint v )
inline

Definition at line 178 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ setLDoubleCursorValue()

void SoVirtualVolume::setLDoubleCursorValue ( MLldouble v)
inline

Definition at line 185 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ setLDoubleValue()

void SoVirtualVolume::setLDoubleValue ( const XVImageSize & pos,
MLldouble v )
inline

Definition at line 181 of file SoVirtualVolume.h.

References _tVirtualVolume.

◆ setValue()

template<typename DATATYPE >
SO_VIRTUALVOLUME_EXPORT void SoVirtualVolume::setValue ( const XVImageSize & pos,
DATATYPE data )

Write a voxel into the virtual volume.

The position must be within the valid image area. Written pages are hold in memory until vVol is deleted.

Note
DATATYPE must fit the internal SoVirtualVolume type or crashes will occur.

◆ unMapAndClearWrittenPages()

SO_VIRTUALVOLUME_EXPORT void SoVirtualVolume::unMapAndClearWrittenPages ( )

This function throws away all written pages.

So accesses to the previously written pages will access the original data. Note that this destroys all written information in the image. Currently mapped pages which are not written remain mapped and unchanged.

Member Data Documentation

◆ _constructorAreExceptionsOn

bool SoVirtualVolume::_constructorAreExceptionsOn
protected

useExceptions passed to constructor.

Definition at line 323 of file SoVirtualVolume.h.

Referenced by areExceptionsOn().

◆ _constructorDataType

MLDataType SoVirtualVolume::_constructorDataType
protected

Extents passed to constructor.

Definition at line 317 of file SoVirtualVolume.h.

◆ _constructorMaxNumKB

long SoVirtualVolume::_constructorMaxNumKB
protected

maxNumKB passed to constructor.

Definition at line 320 of file SoVirtualVolume.h.

Referenced by getMaxNumKB().

◆ _fieldSensor

SoFieldSensor SoVirtualVolume::_fieldSensor
protected

Field sensor attached to the SoSFMLImage passed in the constructor.

It fires on changes of that image to notify about called when

Definition at line 327 of file SoVirtualVolume.h.

◆ _image

SoSFMLImage* SoVirtualVolume::_image
protected

Reference to the SoSFMLImage passed in the constructor.

Definition at line 314 of file SoVirtualVolume.h.

◆ _tVirtualVolume

◆ _virtualVolume

ml::VirtualVolume* SoVirtualVolume::_virtualVolume
protected

Pointer to the current untyped virtual volume or NULL if there is none.

Definition at line 330 of file SoVirtualVolume.h.


The documentation for this class was generated from the following file: