13#ifndef SO_VIRTUAL_VOLUME_H 
   14#define SO_VIRTUAL_VOLUME_H 
   26  template <
typename intT> 
class TVector6DBase;
 
   27  template<
class TVectorBase> 
class TVector;
 
   28  template <
typename intT> 
class TImageVector;
 
   31  template<
typename DATATYPE> 
class TVirtualVolume;
 
  214  template <
typename DATATYPE>
 
  220  template <
typename DATATYPE>
 
  225  template <
typename DATATYPE>
 
  230  template <
typename DATATYPE>
 
  237  template <
typename DATATYPE>
 
  250  template <
typename DATATYPE>
 
  348  void _enforceInst2();
 
  354  typedef const ML_NAMESPACE::ImageVector &(*GetCursorPosWFuncType         )(
void *
vv)                                                               ;
 
  355  typedef MLint             (*GetIntVoxelWFuncType          )(
void *
vv, 
const ML_NAMESPACE::ImageVector &pos)                                        ;
 
  356  typedef MLint64           (*GetInt64VoxelWFuncType        )(
void *
vv, 
const ML_NAMESPACE::ImageVector &pos)                                        ;
 
  357  typedef MLdouble          (*GetDoubleVoxelWFuncType       )(
void *
vv, 
const ML_NAMESPACE::ImageVector &pos)                                        ;
 
  358  typedef MLldouble         (*GetLDoubleVoxelWFuncType      )(
void *
vv, 
const ML_NAMESPACE::ImageVector &pos)                                        ;
 
  359  typedef MLint             (*GetIntCursorVoxelWFuncType    )(
void *
vv)                                                               ;
 
  360  typedef MLint64           (*GetInt64CursorVoxelWFuncType  )(
void *
vv)                                                               ;
 
  361  typedef MLdouble          (*GetDoubleCursorVoxelWFuncType )(
void *
vv)                                                               ;
 
  362  typedef MLldouble         (*GetLDoubleCursorVoxelWFuncType)(
void *
vv)                                                               ;
 
  363  typedef bool              (*IsMappedWFuncType             )(
void *
vv, 
const ML_NAMESPACE::ImageVector &pos)                                        ;
 
  364  typedef void              (*SetCursorPosWFuncType         )(
void *
vv, 
const ML_NAMESPACE::ImageVector &pos)                                        ;
 
  365  typedef void              (*SetIntVoxelWFuncType          )(
void *
vv, 
const ML_NAMESPACE::ImageVector &pos, 
MLint     v)                           ;
 
  366  typedef void              (*SetInt64VoxelWFuncType        )(
void *
vv, 
const ML_NAMESPACE::ImageVector &pos, 
MLint64   v)                           ;
 
  367  typedef void              (*SetDoubleVoxelWFuncType       )(
void *
vv, 
const ML_NAMESPACE::ImageVector &pos, 
MLdouble  v)                           ;
 
  368  typedef void              (*SetLDoubleVoxelWFuncType      )(
void *
vv, 
const ML_NAMESPACE::ImageVector &pos, 
MLldouble v)                           ;
 
  369  typedef void              (*SetIntCursorVoxelWFuncType    )(
void *
vv, 
MLint     v)                                                  ;
 
  370  typedef void              (*SetInt64CursorVoxelWFuncType  )(
void *
vv, 
MLint64   v)                                                  ;
 
  371  typedef void              (*SetDoubleCursorVoxelWFuncType )(
void *
vv, 
MLdouble  v)                                                  ;
 
  372  typedef void              (*SetLDoubleCursorVoxelWFuncType)(
void *
vv, 
MLldouble v)                                                  ;
 
  373  typedef void              (*FillIntWFuncType              )(
void *
vv, 
const ML_NAMESPACE::ImageVector &
boxV1, 
const ML_NAMESPACE::ImageVector &
boxV2, 
MLint     v);
 
  374  typedef void              (*FillInt64WFuncType            )(
void *
vv, 
const ML_NAMESPACE::ImageVector &
boxV1, 
const ML_NAMESPACE::ImageVector &
boxV2, 
MLint64   v);
 
  375  typedef void              (*FillDoubleWFuncType           )(
void *
vv, 
const ML_NAMESPACE::ImageVector &
boxV1, 
const ML_NAMESPACE::ImageVector &
boxV2, 
MLdouble  v);
 
  376  typedef void              (*FillLDoubleWFuncType          )(
void *
vv, 
const ML_NAMESPACE::ImageVector &
boxV1, 
const ML_NAMESPACE::ImageVector &
boxV2, 
MLldouble v);
 
  377  typedef void              (*MoveWFuncType                 )(
void *
vv)                                                               ;
 
  378  typedef void              (*MoveOffsetWFuncType           )(
void *
vv, 
const ML_NAMESPACE::ImageVector &
off)                                        ;
 
  379  typedef void              (*ResetCursorWFuncType          )(
void *
vv)                                                               ;
 
  380  typedef bool              (*MoveCursorFXLFWFuncType       )(
void *
vv)                                                               ;
 
  387  GetCursorPosWFuncType          _getCursorPosWFunc          ;
 
  388  GetIntVoxelWFuncType           _getIntVoxelWFunc           ;
 
  389  GetInt64VoxelWFuncType         _getInt64VoxelWFunc         ;
 
  390  GetDoubleVoxelWFuncType        _getDoubleVoxelWFunc        ;
 
  391  GetLDoubleVoxelWFuncType       _getLDoubleVoxelWFunc       ;
 
  392  GetIntCursorVoxelWFuncType     _getIntCursorVoxelWFunc     ;
 
  393  GetInt64CursorVoxelWFuncType   _getInt64CursorVoxelWFunc   ;
 
  394  GetDoubleCursorVoxelWFuncType  _getDoubleCursorVoxelWFunc  ;
 
  395  GetLDoubleCursorVoxelWFuncType _getLDoubleCursorVoxelWFunc ;
 
  396  IsMappedWFuncType              _isMappedWFunc              ;
 
  397  SetCursorPosWFuncType          _setCursorPosWFunc          ;
 
  398  SetIntVoxelWFuncType           _setIntVoxelWFunc           ;
 
  399  SetInt64VoxelWFuncType         _setInt64VoxelWFunc         ;
 
  400  SetDoubleVoxelWFuncType        _setDoubleVoxelWFunc        ;
 
  401  SetLDoubleVoxelWFuncType       _setLDoubleVoxelWFunc       ;
 
  402  SetIntCursorVoxelWFuncType     _setIntCursorVoxelWFunc     ;
 
  403  SetInt64CursorVoxelWFuncType   _setInt64CursorVoxelWFunc   ;
 
  404  SetDoubleCursorVoxelWFuncType  _setDoubleCursorVoxelWFunc  ;
 
  405  SetLDoubleCursorVoxelWFuncType _setLDoubleCursorVoxelWFunc ;
 
  406  FillIntWFuncType               _fillIntWFunc               ;
 
  407  FillInt64WFuncType             _fillInt64WFunc             ;
 
  408  FillDoubleWFuncType            _fillDoubleWFunc            ;
 
  409  FillLDoubleWFuncType           _fillLDoubleWFunc           ;
 
  410  MoveWFuncType                  _moveFXWFunc                ;
 
  411  MoveWFuncType                  _moveFYWFunc                ;
 
  412  MoveWFuncType                  _moveFZWFunc                ;
 
  413  MoveWFuncType                  _moveFCWFunc                ;
 
  414  MoveWFuncType                  _moveFTWFunc                ;
 
  415  MoveWFuncType                  _moveFUWFunc                ;
 
  416  MoveWFuncType                  _moveBXWFunc                ;
 
  417  MoveWFuncType                  _moveBYWFunc                ;
 
  418  MoveWFuncType                  _moveBZWFunc                ;
 
  419  MoveWFuncType                  _moveBCWFunc                ;
 
  420  MoveWFuncType                  _moveBTWFunc                ;
 
  421  MoveWFuncType                  _moveBUWFunc                ;
 
  422  MoveOffsetWFuncType            _moveOffsetFunc             ;
 
  423  ResetCursorWFuncType           _resetCursorFunc            ;
 
  424  MoveCursorFXLFWFuncType        _moveCursorFXLFFunc         ;
 
 
#define SO_VIRTUALVOLUME_EXPORT
File containing all system dependent settings of the SoVirtualVolume project.
 
The SoSFMLImage field is the interface used by Inventor Nodes to access image data (in the current im...
 
The SoVirtualVolume class for fast voxel based access to paged ML images; see also mlVirtualVolume an...
 
ml::VirtualVolume * _virtualVolume
Pointer to the current untyped virtual volume or NULL if there is none.
 
MLdouble getDoubleValue(const XVImageSize &pos)
 
SO_VIRTUALVOLUME_EXPORT void getValue(const XVImageSize &pos, DATATYPE &retVal)
Get a voxel from the virtual volume.
 
MLint64 getInt64Value(const XVImageSize &pos)
 
bool _constructorAreExceptionsOn
useExceptions passed to constructor.
 
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.
 
SO_VIRTUALVOLUME_EXPORT MLDataType getDataType() const
Returns the data type used as internal data type of the virtual volume or - if currently no valid vir...
 
void setLDoubleCursorValue(MLldouble v)
 
SO_VIRTUALVOLUME_EXPORT void getWrittenPageData(MLuint32 wp, DATATYPE *&dataPtr) const
Returns typed pointer to voxel data of written page number wp.
 
virtual SO_VIRTUALVOLUME_EXPORT ~SoVirtualVolume()
Destructor.
 
SO_VIRTUALVOLUME_EXPORT XVImageSize getPageArrayExtent() const
Returns extents of the array of page buffers.
 
SO_VIRTUALVOLUME_EXPORT SoVirtualVolume & operator=(const SoVirtualVolume &virtVol)
Assignment operator.
 
SO_VIRTUALVOLUME_EXPORT void * getWrittenPageData(MLuint32 wp)
Returns untyped pointer to data of written page with page id wp.
 
MLint getIntValue(const XVImageSize &pos)
 
void fillInt(const XVImageSize &boxV1, const XVImageSize &boxV2, MLint v)
 
void setCursorPosition(const XVImageSize &pos)
 
SO_VIRTUALVOLUME_EXPORT bool isValid() const
Returns true if access methods may be called; otherwise, it returns false.
 
long getMaxNumKB() const
Returns the maxNumKB value passed to the constructor.
 
void setInt64Value(const XVImageSize &pos, MLint64 v)
 
void moveCursorByOffset(const XVImageSize &off)
 
SO_VIRTUALVOLUME_EXPORT SoSFMLImage * getImage() const
Returns the SoSFMLImage the SoVirtualVolume is associated to or NULL if it's a Virtual Volume of user...
 
SO_VIRTUALVOLUME_EXPORT MLuint getNumMappedPages() const
Access functions to virtual volume. Only to be called if isValid() returns true!
 
void reverseMoveCursorX()
 
void * _tVirtualVolume
Pointer to the current typed virtual volume or NULL if there is none.
 
bool moveCursorXWrapAround()
 
void fillDouble(const XVImageSize &boxV1, const XVImageSize &boxV2, MLdouble v)
 
bool isMapped(const XVImageSize &pos)
 
SO_VIRTUALVOLUME_EXPORT void unMapAndClearWrittenPages()
This function throws away all written pages.
 
void setIntValue(const XVImageSize &pos, MLint v)
 
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.
 
void _enforceInstPub()
Template instantiation helper function. This function must not be called.
 
SO_VIRTUALVOLUME_EXPORT void setCursorValue(DATATYPE val)
Set value under cursor and lock page.
 
void setLDoubleValue(const XVImageSize &pos, MLldouble v)
 
void setIntCursorValue(MLint v)
 
MLDataType _constructorDataType
Extents passed to constructor.
 
MLdouble getDoubleCursorValue()
 
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 MLuint getNumPages() const
Returns number of all (mapped and written) pages.
 
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 ...
 
SO_VIRTUALVOLUME_EXPORT void _removeVirtualVolumes(bool removeOnlyTyped=false)
Removes all current virtual volumes.
 
void reverseMoveCursorC()
 
MLldouble getLDoubleValue(const XVImageSize &pos)
 
void _enforceInstPub2()
Template instantiation helper function. This function must not be called.
 
void reverseMoveCursorZ()
 
SO_VIRTUALVOLUME_EXPORT void setValue(const XVImageSize &pos, DATATYPE data)
Write a voxel into the virtual volume.
 
void reverseMoveCursorU()
 
SO_VIRTUALVOLUME_EXPORT MLuint getNumBytes() const
Returns number of bytes currently allocated as pages in the virtual volume.
 
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 vo...
 
SO_VIRTUALVOLUME_EXPORT MLuint getNumWrittenPages()
Returns number of written (and therefore locked) pages.
 
SO_VIRTUALVOLUME_EXPORT SoVirtualVolume(const SoVirtualVolume &virtVol)
Copy constructor.
 
bool areExceptionsOn() const
Returns the useExceptions value passed to the constructor.
 
long _constructorMaxNumKB
maxNumKB passed to constructor.
 
MLint64 getInt64CursorValue()
 
const XVImageSize & getCursorPosition()
 
void reverseMoveCursorY()
 
void setInt64CursorValue(MLint64 v)
 
void fillLDouble(const XVImageSize &boxV1, const XVImageSize &boxV2, MLldouble v)
 
SoSFMLImage * _image
Reference to the SoSFMLImage passed in the constructor.
 
MLint getIntCursorValue()
 
SO_VIRTUALVOLUME_EXPORT XVImageSize getPageExtent() const
Returns extents of a written and read pages used by the virtual volume.
 
void setDoubleValue(const XVImageSize &pos, MLdouble v)
 
MLldouble getLDoubleCursorValue()
 
SO_VIRTUALVOLUME_EXPORT void getCursorValue(DATATYPE &retVal)
 
SO_VIRTUALVOLUME_EXPORT void _createTypedVirtualVolume()
Create the typed version of the virtual volume and set up all function pointers from function wrapper...
 
SoFieldSensor _fieldSensor
Field sensor attached to the SoSFMLImage passed in the constructor.
 
void fillInt64(const XVImageSize &boxV1, const XVImageSize &boxV2, MLint64 v)
 
void reverseMoveCursorT()
 
void setDoubleCursorValue(MLdouble v)
 
SO_VIRTUALVOLUME_EXPORT void resize(const XVImageSize &newExt)
This method resizes the virtual volume to the extents given by ext.
 
SoSFMLImage - field interface to ML images and related classes.
 
#define ML_INVALID_DATA_TYPE
Defines an invalid MLDataType.
 
MLint32 MLDataType
MLDataType.
 
@ MLuint8Type
Enumerator for the unsigned 8-bit ML integer type.
 
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
 
MLuint64 MLuint
An unsigned ML integer type with at least 64 bits used for index calculations on very large images ev...
 
INT64 MLint64
Include 64-bit integer support for Windows or Unix.
 
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
 
TImageVector< MLint > ImageVector
Defines the standard ImageVector type that is used by the ML for indexing and coordinates.