Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoLDMDataAccess Class Reference

Large Data Management Volume data access methods. More...

#include <LDM/SoLDMDataAccess.h>

Classes

struct  DataInfo
 Information about returned data when directly accessing the data rather than copying the data. More...
 
struct  DataInfoBox
 Information about data returned for an arbitrary box (subvolume). More...
 
struct  DataInfoLine
 Information about data returned for an arbitrary line. More...
 
struct  DataInfoPlane
 Information about data returned for an arbitrary plane. More...
 
class  DataInfoPolyLine
 Information about data returned for an arbitrary polyline. More...
 
struct  DataInfoTrace
 Information about data returned for an arbitrary trace (column of voxels). More...
 

Public Types

enum  ErrorValue {
  CORRECT ,
  INCORRECT_RESOLUTION ,
  INCORRECT_SUBVOLUME ,
  INCORRECT_LINE ,
  INCORRECT_POLYLINE ,
  INCORRECT_PLANE ,
  INCORRECT_POSITION ,
  INCORRECT_COORDINATE ,
  MEMORY_FULL ,
  REQUEST_NOT_COMPLETED ,
  REQUEST_NOT_FOUND ,
  INCORRECT_BUFFER
}
 Error Code values. More...
 
enum  GetDataMode {
  CACHE ,
  DIRECT ,
  DIRECT_AND_PREFETCH
}
 Specifies the way data is requested from the volume reader when the necessary tiles are not already present in LDM cache memory. More...
 

Public Member Functions

 SoLDMDataAccess ()
 Constructor.
 
virtual ~SoLDMDataAccess ()
 Destructor.
 
void setDataSet (SoDataSet *v)
 Set dataset to fetch data from.
 
SoDataSetgetDataSet ()
 Returns the associated dataset.
 
DataInfoBox getData (int resolution, const SbBox3i32 &subVolume0, SoBufferObject *bufferObj=NULL)
 Given a subvolume in voxel coordinates, copies the associated data into an application buffer.
 
DataInfoPlane getData (int resolution, const SbBox3i32 &subVolume0, const SbPlane &plane, SoBufferObject *bufferObj=NULL)
 Given a subvolume in voxel coordinates and a plane, copies the data intersecting the plane and the subvolume into an application buffer.
 
DataInfoLine getData (int resolution, const SbBox3i32 &subVolume0, const SbLine &line, SoBufferObject *bufferObj=NULL)
 Given a subvolume in voxel coordinates and a line, copies the data intersecting the line and the subvolume into an application buffer.
 
DataInfoTrace getData (int resolution, const SbBox3i32 &subVolume, const SbVec2i32 coord, SoBufferObject *bufferObj=NULL)
 Data values in a single seismic trace (a row of voxels along the volume X axis) are copied into an application buffer.
 
void getData (DataInfoPolyLine &infoPolyline, int resolution, const SbBox3i32 &subVolume, int numPoints, const SbVec3i32 *polyline, SoBufferObject *bufferObj=NULL)
 Given a subvolume in voxel coordinates and a polyline (set of connected line segments), copies the data intersecting each line segment with the subvolume into an application buffer.
 
DataInfo getData (int resolution, const SbVec3i32 &dataPosition)
 Returns a pointer to the block of data (LDM tile) which contains the voxel at dataPosition.
 
void releaseData (SoLDMTileID tileID)
 Tells VolumeViz that this block of data (returned by getData above) is no longer in use by the application.
 
SbBool isTileUniform (int resolution, const SbVec3i32 &dataPosition, double &uniformValue)
 Returns TRUE if the tile containing the data located at position dataPosition (IJK voxel coordinates) at the specified resolution is uniform (all voxels have the same value).
 
int requestData (int resolution, const SbBox3i32 &box, SoBufferObject *bufferObj)
 Given a subvolume in voxel coordinates, asynchronously copies the associated data into an application buffer.
 
void getRequestedData (int requestId, DataInfoBox &infoBox)
 Returns the data associated with requestID into infoBox.
 
int requestData (int resolution, const SbBox3i32 &subVolume, const SbPlane &plane, SoBufferObject *bufferObj)
 Given a subvolume in voxel coordinates and a plane, asynchronously copies the data intersecting the plane and the subvolume into an application buffer.
 
void getRequestedData (int requestId, DataInfoPlane &infoPlane)
 Returns the data associated with requestID into infoPlane.
 
int requestData (int resolution, const SbBox3i32 &subVolume0, const SbLine &line, SoBufferObject *bufferObj)
 Given a subvolume in voxel coordinates and a line, asynchronously copies the data intersecting the line and the subvolume into an application buffer.
 
void getRequestedData (int requestId, DataInfoLine &infoLine)
 Returns the data associated with requestID into infoLine.
 
int requestData (int resolution, const SbBox3i32 &subVolume, int numPoints, const SbVec3i32 *polyline, SoBufferObject *bufferObj)
 Given a subvolume in voxel coordinates and a stack of line, asynchronously copies the data intersecting each line and the subvolume into an application buffer.
 
void getRequestedData (int requestId, DataInfoPolyLine &infoPolyline)
 Returns the data associated with requestID into infoPolyline.
 
int requestData (int resolution, const SbBox3i32 &subVolume0, const SbVec2i32 &coord, SoBufferObject *bufferObj)
 Data values in a single seismic trace (a row of voxels along the volume X axis) are asynchronously copied into an application buffer.
 
void getRequestedData (int requestId, DataInfoTrace &infoTrace)
 Returns the data associated with requestID into infoTrace .
 
virtual void endRequest (int requestId)
 This method is called each time a data request is finished, meaning that the data requested asynchronously is now available.
 
SbVec3f voxelToXYZ (const SbVec3i32 &dataPosition)
 Converts a voxel coordinate (I,J,K) to a geometry coordinate (X,Y,Z).
 
SbBox3f voxelToXYZ (const SbBox3i32 &boxIJK)
 Converts the specified box in voxel coordinates (I,J,K) to geometric coordinates (X,Y,Z).
 
SbVec3i32 XYZToVoxel (const SbVec3f &dataPosition)
 Converts a geometry coordinate (X,Y,Z) to a voxel coordinate (I,J,K).
 
SbBox3i32 XYZToVoxel (const SbBox3f &boxXYZ)
 Converts the specified box in geometric coordinates (X,Y,Z) to voxel coordinates (I,J,K).
 
bool setGetDataMode (const GetDataMode getDataMode)
 Set the GetDataMode.
 
GetDataMode getGetDataMode ()
 Returns the GetDataMode (see setGetDataMode).
 
Deprecated
SoDEPRECATED DataInfoBox getData (int resolution, const SbBox3i32 &subVolume, void *buffer)
 
SoDEPRECATED DataInfoPlane getData (int resolution, const SbBox3i32 &subVolume, const SbPlane &plane, void *buffer)
 
SoDEPRECATED DataInfoLine getData (int resolution, const SbBox3i32 &subVolume, const SbLine &line, void *buffer)
 
SoDEPRECATED DataInfoTrace getData (int resolution, const SbBox3i32 &subVolume, const SbVec2i32 coord, void *buffer)
 
SoDEPRECATED void getData (DataInfoPolyLine &infoPolyline, int resolution, const SbBox3i32 &subVolume, int numPoints, const SbVec3i32 *polyline, void *buffer)
 
SoDEPRECATED int requestData (int resolution, const SbBox3i32 &subVolume, void *buffer)
 
SoDEPRECATED int requestData (int resolution, const SbBox3i32 &subVolume, const SbPlane &plane, void *buffer)
 
SoDEPRECATED int requestData (int resolution, const SbBox3i32 &subVolume, const SbLine &line, void *buffer)
 
SoDEPRECATED int requestData (int resolution, const SbBox3i32 &subVolume, int numPoints, const SbVec3i32 *polyline, void *buffer)
 
SoDEPRECATED int requestData (int resolution, const SbBox3i32 &subVolume, const SbVec2i32 &coord, void *buffer)
 

Detailed Description

Large Data Management Volume data access methods.

The Data Access API provides methods to conveniently extract data from a volume. This is useful, for example, to extract data for computation, for segmentation or for display using other primitives. The data is accessible whether the SoVolumeData is part of a scene graph or not. These methods are only valid in LDM mode (which is the default mode). The Data Access API automatically takes advantage of LDM multi-threaded data loading when multiple tiles (not already in cache) are needed to complete the request.

The Data Access API automatically loads all data required to satisfy the request and can be invoked asynchronously to allow simultaneous loading and computation. The application can request data at any resolution level, e.g. full resolution (level 0) data, independent of the resolution level currently being used for rendering. For some requests, e.g. line and plane, the application can also specify a subvolume (region of interest) that limits the extent of the data request.

SoLDMDataAccess provides the following data requests:

  • Subvolume: The set of voxels inside a specified subvolume.
  • Plane: The set of voxels intersecting an arbitrary plane.
  • Line: The set of voxels intersecting an arbitrary line.
  • Trace: A column of axis aligned voxels (e.g. a seismic trace).
  • Polyline: The set of voxels intersecting an arbitrary polyline.
  • Tile: Direct access to the tile containing a specified voxel. (This is the best way to query individual voxels. See the method for more information.)

Each data request returns information struct specific to the request type. For example, SoLDMDataAccess::DataInfoBox is returned by the subvolume request. All these structs contain an errorFlag member containing the result of the request and a bufferSize member containing the amount of data (in bytes) returned. The application should always check these values. Note that even when errorFlag is CORRECT, bufferSize may be zero, meaning no data was returned. This happens, for example, if the specified plane is completely outside the volume.

The application is responsible for allocating and freeing the memory to store the requested data. Calling the data request method with a null bufferObject will return the size of the memory needed, in bytes, in the bufferSize member of the information struct. Once the buffer is allocated, a second call will extract the data from the volume. Since Open Inventor 8.0 we recommend using the methods that return data into an SoBufferObject. Because this class abstracts access to data stored on different devices it is possible, for example, to conveniently fetch data into CPU memory or directly into GPU memory.

Each data request can be either synchronous or asynchronous. Synchronous means that all the data will be loaded before the function returns. Asynchronous means that the function will return immediately and you will be notified when the data is actually available. This allows the application to continue to work while the data is being loaded, for example to overlap data loading and computation. Synchronous access is done using the getData methods.

To do asynchronous access, you must create a new class derived from SoLDMDataAccess and implement your own version of the endRequest method. Begin a request by calling the appropriate requestData method. This method will return a requestId.

  • If the requestID is positive, this value will be passed to the endRequest method when the requested data is ready, and can then be used with the appropriate getRequestedData method to complete the transaction.
  • If the requestID is negative, the data is already in memory. In this case endRequest will not be called, and -requestID (a positive value) should be used with the getRequestedData method. The data inside the destBuffer will be aligned as in the original volume. The info structure contains additional information about the current request including error status, coordinates (for line and polyline requests), tile id (for tile requests), etc.

Three different modes are available to control how data is requested from the volume reader when the necessary tiles are not already present in LDM cache memory:

  • CACHE: When data is requested, the data is copied from the LDM cache (tiles in memory) if possible. If any required tiles are not in the LDM cache, LDM will load those tiles into cache, then copy the data from the cache. This is the default behavior.
  • DIRECT: When data is requested, the data is copied from the LDM cache (tiles in memory) if possible. If any required tiles are not in the LDM cache, LDM will request the data directly from the volume reader without loading any tiles into the LDM cache memory. This could potentially be slower than the previous mode, but uses less I/O and less memory. It allows getting data without loading the whole tile into memory, for example when the requested data is a slice.
  • DIRECT_AND_PREFETCH: This mode is a mix of the previous modes. When data is requested, the data is copied from the LDM cache if possible. If any required tiles are not in the LDM cache, LDM will request the data directly from the volume reader to avoid reading complete tiles immediately, but will also schedule the relevant tiles to be loaded into the LDM cache memory asynchronously.
    This may improve performance overall if the application is likely to load additional data from these tiles.

Note that DIRECT access requires that specific methods are implemented in the data set reader, for example readXSliceInTile (see SoLDMReader and SoVolumeReader). The default LDM reader implements these methods for the standard Open Inventor LDM file format. Custom LDM readers may need to be enhanced.

EXAMPLE

Member Enumeration Documentation

◆ ErrorValue

Error Code values.

Enumerator
CORRECT 

Request was successfully completed.

INCORRECT_RESOLUTION 

The specified resolution is lower than the lowest resolution level of the data.

INCORRECT_SUBVOLUME 

The specified subvolume does not intersect the data volume.

INCORRECT_LINE 

The specified line does not intersect the specified subvolume.

INCORRECT_POLYLINE 

The specified polyline does not intersect the specified subvolume.

INCORRECT_PLANE 

The specified plane does not intersect the specified subvolume.

INCORRECT_POSITION 

The specified position is outside the specified subvolume.

INCORRECT_COORDINATE 

The trace at the specified coordinate does not intersect the specified subvolume.

MEMORY_FULL 

No more memory is available.

REQUEST_NOT_COMPLETED 

Requesting data from an unfinished asynchronous request.

REQUEST_NOT_FOUND 

Request is unknown.

INCORRECT_BUFFER 

Application buffer to copy data into is invalid.

Most common cases are :

  • buffer size does not take in account the datasize
  • request size parameter is inclusive and app forget to remove (1,1,1) to it.

Definition at line 274 of file SoLDMDataAccess.h.

◆ GetDataMode

Specifies the way data is requested from the volume reader when the necessary tiles are not already present in LDM cache memory.

See the class description for more info. See setGetDataMode() method.

Enumerator
CACHE 

Request data by tile (default)

DIRECT 

Request data directly.

This means to only request, for example, the specific slice of data, not the complete tiles.

DIRECT_AND_PREFETCH 

Same as Direct, but also schedule the relevant tiles to be loaded for faster future access.

Definition at line 311 of file SoLDMDataAccess.h.

Constructor & Destructor Documentation

◆ SoLDMDataAccess()

SoLDMDataAccess::SoLDMDataAccess ( )

Constructor.


Application must call the setDataSet method before using any other methods of this object.

◆ ~SoLDMDataAccess()

virtual SoLDMDataAccess::~SoLDMDataAccess ( )
virtual

Destructor.

Member Function Documentation

◆ endRequest()

void SoLDMDataAccess::endRequest ( int  requestId)
inlinevirtual

This method is called each time a data request is finished, meaning that the data requested asynchronously is now available.

This method should be overloaded in a derived class in order to handle loaded data.

Definition at line 1165 of file SoLDMDataAccess.h.

◆ getData() [1/11]

void SoLDMDataAccess::getData ( DataInfoPolyLine infoPolyline,
int  resolution,
const SbBox3i32 subVolume,
int  numPoints,
const SbVec3i32 polyline,
SoBufferObject bufferObj = NULL 
)

Given a subvolume in voxel coordinates and a polyline (set of connected line segments), copies the data intersecting each line segment with the subvolume into an application buffer.


The resolution is the power of 2 of the desired subsampling level (0:1/1, 1:1/2, 2:1/4, ...) NOTE: The data is copied.

All information is returned in the struct DataInfoPolyline. Call this method with buffer = NULL to get the required size of the application buffer (in the bufferSize member of DataInfoLine).

◆ getData() [2/11]

SoDEPRECATED void SoLDMDataAccess::getData ( DataInfoPolyLine infoPolyline,
int  resolution,
const SbBox3i32 subVolume,
int  numPoints,
const SbVec3i32 polyline,
void *  buffer 
)

◆ getData() [3/11]

SoDEPRECATED DataInfoLine SoLDMDataAccess::getData ( int  resolution,
const SbBox3i32 subVolume,
const SbLine line,
void *  buffer 
)

◆ getData() [4/11]

SoDEPRECATED DataInfoPlane SoLDMDataAccess::getData ( int  resolution,
const SbBox3i32 subVolume,
const SbPlane plane,
void *  buffer 
)

◆ getData() [5/11]

DataInfoTrace SoLDMDataAccess::getData ( int  resolution,
const SbBox3i32 subVolume,
const SbVec2i32  coord,
SoBufferObject bufferObj = NULL 
)

Data values in a single seismic trace (a row of voxels along the volume X axis) are copied into an application buffer.


The trace is identified by a YZ voxel coordinate. The range of values returned is the intersection of the trace with the specified subvolume. The resolution is the power of 2 of the desired subsampling level (0:1/1, 1:1/2, 2:1/4, ...) NOTE: The data is copied.

Returns a DataInfoTrace struct containing errorFlag, bufferSize (number of bytes) and bufferDimension (number of values). Call this method with buffer = NULL to get the required size of the application buffer (in the bufferSize member of DataInfoTrace).

◆ getData() [6/11]

SoDEPRECATED DataInfoTrace SoLDMDataAccess::getData ( int  resolution,
const SbBox3i32 subVolume,
const SbVec2i32  coord,
void *  buffer 
)

◆ getData() [7/11]

SoDEPRECATED DataInfoBox SoLDMDataAccess::getData ( int  resolution,
const SbBox3i32 subVolume,
void *  buffer 
)

◆ getData() [8/11]

DataInfoLine SoLDMDataAccess::getData ( int  resolution,
const SbBox3i32 subVolume0,
const SbLine line,
SoBufferObject bufferObj = NULL 
)

Given a subvolume in voxel coordinates and a line, copies the data intersecting the line and the subvolume into an application buffer.


The resolution is the power of 2 of the desired subsampling level (0:1/1, 1:1/2, 2:1/4, ...) NOTE: The data is copied.

All information is returned in the struct DataInfoLine. Call this method with buffer = NULL to get the required size of the application buffer (in the bufferSize member of DataInfoLine).

◆ getData() [9/11]

DataInfoPlane SoLDMDataAccess::getData ( int  resolution,
const SbBox3i32 subVolume0,
const SbPlane plane,
SoBufferObject bufferObj = NULL 
)

Given a subvolume in voxel coordinates and a plane, copies the data intersecting the plane and the subvolume into an application buffer.


The resolution is the power of 2 of the desired subsampling level (0:1/1, 1:1/2, 2:1/4, ...) NOTE: The data is copied.

All information is returned in the struct DataInfoPlane. Call this method with buffer = NULL to get the required size of the application buffer (in the bufferSize member of DataInfoPlane).

◆ getData() [10/11]

DataInfoBox SoLDMDataAccess::getData ( int  resolution,
const SbBox3i32 subVolume0,
SoBufferObject bufferObj = NULL 
)

Given a subvolume in voxel coordinates, copies the associated data into an application buffer.


The resolution is the power of 2 of the desired subsampling level (0:1/1, 1:1/2, 2:1/4, ...). NOTE: The data is copied.

All information is returned in the struct DataInfoBox. Call this method with buffer = NULL to get the required size of the application buffer (in the bufferSize member of DataInfoBox).

◆ getData() [11/11]

DataInfo SoLDMDataAccess::getData ( int  resolution,
const SbVec3i32 dataPosition 
)

Returns a pointer to the block of data (LDM tile) which contains the voxel at dataPosition.

The resolution is the power of 2 of the desired subsampling level (0:1/1, 1:1/2, 2:1/4, ...). In most cases you will pass 0 to request full resolution data.

The data is not copied. The pointer is valid until releaseData() is called with the corresponding tile id or until the associated volumeData node is destroyed.

The LDM tile is locked in CPU memory until releaseData() is called. The application may lock multiple tiles in memory using this method. However these locked tiles count against the maximum CPU memory allowed for the volume. Locking too many tiles may reduce the rendered image quality because LDM does not have enough memory to load other tiles. A released tile will remain in memory (allowing quick re-access) for some period of time, depending on whether it is needed for rendering and (if not) on the value of SoLDMResourceParameters::tileHalfLife.

This method is a good solution when the application needs to get the values of multiple voxels that are not part of a line, plane or box. After locking a tile, for each subsequent voxel, check if the voxel position is contained in the currently locked tile. You can use the intersect() method on the SbBox3i32 tilePosition member of the DataInfo struct for this test. If the voxel is in the current tile, compute the offset into the data buffer and get its value. If not, release the current tile (using releaseData) and get the appropriate tile by calling getData() again.

// Compute the address of a voxel value in a tile.
// We know the position of the desired voxel in absolute IJK coords and we
// know the location of the tile in absolute IJK coords, so we can compute
// the voxel position relative to the tile. But note that tiles on a "face"
// of the volume are normally partial tiles, so we have to consider both the
// min and max corners of the tile.
SbVec3i32 voxelPos; // Absolute IJK position of desired voxel
DataInfo dataInfo; // Tile info returned by getData() method
SbVec3i32 tileSize = dataInfo.tileDimension;
SbVec3i32 tilePosMin, tilePosMax;
dataInfo.tilePosition.getBounds( tilePosMin, tilePosMax );
SbVec3i32 relPos; // Relative IJK position of desired voxel
relPos[0] = (voxelPos[0] - tilePosMin[0]) * tileSize[0] / (tilePosMax[0] - tilePosMin[0] + 1);
relPos[1] = (voxelPos[1] - tilePosMin[1]) * tileSize[1] / (tilePosMax[1] - tilePosMin[1] + 1);
relPos[2] = (voxelPos[2] - tilePosMin[2]) * tileSize[2] / (tilePosMax[2] - tilePosMin[2] + 1);
// Offset into tile data. First in voxels, then in bytes.
int64_t offset = (relPos[2]*tileSize[1] + relPos[1])*tileSize[0] + relPos[0];
offset *= volumeData->getDatumSize();
// Address of voxel value
unsigned char* voxelPtr = ((unsigned char *)dataInfo.tileData) + offset;
void getBounds(int &xmin, int &ymin, int &zmin, int &xmax, int &ymax, int &zmax) const
Gets the corners of the box.
Definition SbBox.h:244
3D vector class.
Definition SbVec.h:1517
Information about returned data when directly accessing the data rather than copying the data.
SbBox3i32 tilePosition
Position of the data tile in voxel coordinates (min = lower left back corner, max = upper right front...
SbVec3i32 tileDimension
Dimensions of the data tile in voxels.
void * tileData
Pointer to the data tile, valid until the releaseData() method of SoLDMDataAccess is called or the a...

◆ getDataSet()

SoDataSet * SoLDMDataAccess::getDataSet ( )
inline

Returns the associated dataset.

Definition at line 1159 of file SoLDMDataAccess.h.

◆ getGetDataMode()

SoLDMDataAccess::GetDataMode SoLDMDataAccess::getGetDataMode ( )
inline

Returns the GetDataMode (see setGetDataMode).

Definition at line 1171 of file SoLDMDataAccess.h.

◆ getRequestedData() [1/5]

void SoLDMDataAccess::getRequestedData ( int  requestId,
DataInfoBox infoBox 
)

Returns the data associated with requestID into infoBox.

◆ getRequestedData() [2/5]

void SoLDMDataAccess::getRequestedData ( int  requestId,
DataInfoLine infoLine 
)

Returns the data associated with requestID into infoLine.

◆ getRequestedData() [3/5]

void SoLDMDataAccess::getRequestedData ( int  requestId,
DataInfoPlane infoPlane 
)

Returns the data associated with requestID into infoPlane.

◆ getRequestedData() [4/5]

void SoLDMDataAccess::getRequestedData ( int  requestId,
DataInfoPolyLine infoPolyline 
)

Returns the data associated with requestID into infoPolyline.

◆ getRequestedData() [5/5]

void SoLDMDataAccess::getRequestedData ( int  requestId,
DataInfoTrace infoTrace 
)

Returns the data associated with requestID into infoTrace .

◆ isTileUniform()

SbBool SoLDMDataAccess::isTileUniform ( int  resolution,
const SbVec3i32 dataPosition,
double &  uniformValue 
)

Returns TRUE if the tile containing the data located at position dataPosition (IJK voxel coordinates) at the specified resolution is uniform (all voxels have the same value).

Returns FALSE if not or if accessing the tile failed (e.g. invalid coordinates). If TRUE then uniformValue contains the uniform value of the tile, else it is undefined.

Since Open Inventor 9.1

◆ releaseData()

void SoLDMDataAccess::releaseData ( SoLDMTileID  tileID)

Tells VolumeViz that this block of data (returned by getData above) is no longer in use by the application.

◆ requestData() [1/10]

int SoLDMDataAccess::requestData ( int  resolution,
const SbBox3i32 box,
SoBufferObject bufferObj 
)

Given a subvolume in voxel coordinates, asynchronously copies the associated data into an application buffer.


The resolution is the power of 2 of the desired subsampling level (0:1/1, 1:1/2, 2:1/4, ...). NOTE: The data is copied.

Returns a request ID. If requestID is positive, this value will be passed to the endRequest method when the requested data is ready, and can then be used with the getRequestedData method to complete the transaction. If requestID is negative, the data is already in memory, so endRequest will not be called, and -requestID (a positive value) should be used with the getRequestedData method.

Call this method with buffer = NULL to get the required size of the application buffer.

Limitations :

  • it is not currently possible to query the value of a single voxel using this method. The smallest query possible is 8 voxels (a subvolume 2 x 2 x 2).
  • it is not possible to perform an asynchronous data request within GLRender action

◆ requestData() [2/10]

SoDEPRECATED int SoLDMDataAccess::requestData ( int  resolution,
const SbBox3i32 subVolume,
const SbLine line,
void *  buffer 
)

◆ requestData() [3/10]

int SoLDMDataAccess::requestData ( int  resolution,
const SbBox3i32 subVolume,
const SbPlane plane,
SoBufferObject bufferObj 
)

Given a subvolume in voxel coordinates and a plane, asynchronously copies the data intersecting the plane and the subvolume into an application buffer.


The resolution is the power of 2 of the desired subsampling level (0:1/1, 1:1/2, 2:1/4, ...). NOTE: The data is copied.

Returns a request ID. If requestID is positive, this value will be passed to the endRequest method when the requested data is ready, and can then be used with the getRequestedData method to complete the transaction. If requestID is negative, the data is already in memory, so endRequest will not be called, and -requestID (a positive value) should be used with the getRequestedData method.

Call this method with buffer = NULL to get the required size of the application buffer (in the bufferSize member of DataInfoPlane). Limitations :

  • it is not possible to perform an asynchronous data request within GLRender action

◆ requestData() [4/10]

SoDEPRECATED int SoLDMDataAccess::requestData ( int  resolution,
const SbBox3i32 subVolume,
const SbPlane plane,
void *  buffer 
)

◆ requestData() [5/10]

SoDEPRECATED int SoLDMDataAccess::requestData ( int  resolution,
const SbBox3i32 subVolume,
const SbVec2i32 coord,
void *  buffer 
)

◆ requestData() [6/10]

int SoLDMDataAccess::requestData ( int  resolution,
const SbBox3i32 subVolume,
int  numPoints,
const SbVec3i32 polyline,
SoBufferObject bufferObj 
)

Given a subvolume in voxel coordinates and a stack of line, asynchronously copies the data intersecting each line and the subvolume into an application buffer.


The resolution is the power of 2 of the desired subsampling level (0:1/1, 1:1/2, 2:1/4, ...). NOTE: The data is copied.

Returns a request ID. If requestID is positive, this value will be passed to the endRequest method when the requested data is ready, and can then be used with the getRequestedData method to complete the transaction. If requestID is negative, the data is already in memory, so endRequest will not be called, and -requestID (a positive value) should be used with the getRequestedData method.

Call this method with buffer = NULL to get the required size of the application buffer (in the bufferSize member of DataInfoLine). Limitations :

  • it is not possible to perform an asynchronous data request within GLRender action

◆ requestData() [7/10]

SoDEPRECATED int SoLDMDataAccess::requestData ( int  resolution,
const SbBox3i32 subVolume,
int  numPoints,
const SbVec3i32 polyline,
void *  buffer 
)

◆ requestData() [8/10]

SoDEPRECATED int SoLDMDataAccess::requestData ( int  resolution,
const SbBox3i32 subVolume,
void *  buffer 
)

◆ requestData() [9/10]

int SoLDMDataAccess::requestData ( int  resolution,
const SbBox3i32 subVolume0,
const SbLine line,
SoBufferObject bufferObj 
)

Given a subvolume in voxel coordinates and a line, asynchronously copies the data intersecting the line and the subvolume into an application buffer.


The resolution is the power of 2 of the desired subsampling level (0:1/1, 1:1/2, 2:1/4, ...). NOTE: The data is copied.

Returns a request ID. If requestID is positive, this value will be passed to the endRequest method when the requested data is ready, and can then be used with the getRequestedData method to complete the transaction. If requestID is negative, the data is already in memory, so endRequest will not be called, and -requestID (a positive value) should be used with the getRequestedData method.

Call this method with buffer = NULL to get the required size of the application buffer (in the bufferSize member of DataInfoLine). Limitations :

  • it is not possible to perform an asynchronous data request within GLRender action

◆ requestData() [10/10]

int SoLDMDataAccess::requestData ( int  resolution,
const SbBox3i32 subVolume0,
const SbVec2i32 coord,
SoBufferObject bufferObj 
)

Data values in a single seismic trace (a row of voxels along the volume X axis) are asynchronously copied into an application buffer.


The trace is identified by a YZ voxel coordinate. The range of values returned is the intersection of the trace with the specified subvolume (which may be the full dimensions of the volume). The resolution is the power of 2 of the desired subsampling level (0:1/1, 1:1/2, 2:1/4, ...). NOTE: The data is copied.

Returns a request ID. If requestID is positive, this value will be passed to the endRequest method when the requested data is ready, and can then be used with the getRequestedData method to complete the transaction. If requestID is negative, the data is already in memory, so endRequest will not be called, and -requestID (a positive value) should be used with the getRequestedData method.

Call this method with buffer = NULL to get the required size of the application buffer (in the bufferSize member of DataInfoTrace). Limitations :

  • it is not possible to perform an asynchronous data request within GLRender action

◆ setDataSet()

void SoLDMDataAccess::setDataSet ( SoDataSet v)

Set dataset to fetch data from.

◆ setGetDataMode()

bool SoLDMDataAccess::setGetDataMode ( const GetDataMode  getDataMode)

Set the GetDataMode.


This controls how data is requested from the volume reader when the necessary tiles are not already present in LDM cache memory. Default is CACHE.

◆ voxelToXYZ() [1/2]

SbBox3f SoLDMDataAccess::voxelToXYZ ( const SbBox3i32 boxIJK)

Converts the specified box in voxel coordinates (I,J,K) to geometric coordinates (X,Y,Z).

The geometric coordinates are expressed in "extent" space, where voxel coordinates are mapped to the box defined by the volume extent.

Correctly converts coordinates that are outside the volume extent, but the resulting voxel coordinate is outside the volume dimensions.

See also
voxelToXYZ(const SbVec3i32&) const
XYZToVoxel(const SbVec3f&) const
XYZToVoxel(const SbBox3f&) const

Since Open Inventor 10.8

◆ voxelToXYZ() [2/2]

SbVec3f SoLDMDataAccess::voxelToXYZ ( const SbVec3i32 dataPosition)

Converts a voxel coordinate (I,J,K) to a geometry coordinate (X,Y,Z).

The geometric coordinates are expressed in "extent" space, where voxel coordinates are mapped to the box defined by the volume extent.

Correctly converts coordinates that are outside the volume extent, but the resulting voxel coordinate is outside the volume dimensions.

See also
voxelToXYZ(const SbBox3i32&) const
XYZToVoxel(const SbVec3f&) const
XYZToVoxel(const SbBox3f&) const

◆ XYZToVoxel() [1/2]

SbBox3i32 SoLDMDataAccess::XYZToVoxel ( const SbBox3f boxXYZ)

Converts the specified box in geometric coordinates (X,Y,Z) to voxel coordinates (I,J,K).

The geometric coordinates are expressed in "extent" space, where voxel coordinates are mapped to the box defined by the volume extent.

Correctly converts coordinates that are outside the volume extent, but the resulting voxel coordinate is outside the volume dimensions.

See also
voxelToXYZ(const SbVec3i32&) const
voxelToXYZ(const SbBox3i32&) const
XYZToVoxel(const SbVec3f&) const

Since Open Inventor 10.8

◆ XYZToVoxel() [2/2]

SbVec3i32 SoLDMDataAccess::XYZToVoxel ( const SbVec3f dataPosition)

Converts a geometry coordinate (X,Y,Z) to a voxel coordinate (I,J,K).

The geometric coordinates are expressed in "extent" space, where voxel coordinates are mapped to the box defined by the volume extent.

Correctly converts coordinates that are outside the volume extent, but the resulting voxel coordinate is outside the volume dimensions.

See also
voxelToXYZ(const SbVec3i32&) const
voxelToXYZ(const SbBox3i32&) const
XYZToVoxel(const SbBox3f&) const

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