NVIDIA IndeX API nvidia_logo_transpbg.gif Up
nv::index::ISparse_volume_subset Class Referenceabstract

Distributed data storage class for sparse volume subsets. More...

#include <isparse_volume_subset.h>

Inherits mi::base::Interface_declare< 0x1dfa0274, ... >.

Classes

struct  Data_brick_buffer_info
 Definition of internal buffer information. More...
 

Public Types

enum  Data_transformation {
  DATA_TRANSFORMATION_NONE = 0 ,
  DATA_TRANSFORMATION_FLIP_AXIS_ORDER = 1
}
 Transformation that should be applied on the written data. More...
 
enum  Data_brick_state
 Definition of the state of a data-brick in the subset. More...
 
enum  Sub_data_gen_flags {
  SUB_DATA_GEN_DEFAULT = 0x00u ,
  SUB_DATA_GEN_INCLUDE_BORDER_VOXELS = 0x01u ,
  SUB_DATA_GEN_NO_CLIP_REQUEST_VOLUME = 0x02u
}
 Flags used for specifying the data generation process. More...
 

Public Member Functions

virtual const ISparse_volume_attribute_set_descriptorget_attribute_set_descriptor () const =0
 Returns the attribute-set descriptor of the subset. More...
 
virtual const ISparse_volume_subset_data_descriptorget_subset_data_descriptor () const =0
 Returns the data subset descriptor of the subset. More...
 
virtual bool write_brick_data (mi::Uint32 brick_subset_idx, mi::Uint32 brick_attrib_idx, const void *src_values, mi::Sint32 gpu_device_id, Data_transformation brick_data_transform=DATA_TRANSFORMATION_NONE)=0
 Write a volume-data brick to the subset from a memory block in main memory. More...
 
virtual bool write_brick_data (mi::Uint32 brick_subset_idx, mi::Uint32 brick_attrib_idx, const mi::neuraylib::IRDMA_buffer *src_rdma_buffer, Data_transformation brick_data_transform=DATA_TRANSFORMATION_NONE)=0
 Write a volume-data brick to the subset from a IRDMA_buffer. More...
 
virtual bool write_brick_data_multiple (const mi::Uint32 *brick_subset_indices, const mi::Uint32 *brick_attrib_indices, mi::Uint32 nb_input_bricks, const mi::Size *src_rdma_buffer_offsets, const mi::neuraylib::IRDMA_buffer *src_rdma_buffer, Data_transformation brick_data_transform=DATA_TRANSFORMATION_NONE)=0
 Write multiple volume-data bricks to the subset from a single IRDMA_buffer. More...
 
virtual const Data_brick_buffer_info access_brick_data_buffer (mi::Uint32 brick_subset_idx, mi::Uint32 brick_attrib_idx)=0
 Query the internal buffer information of the data-subset instance for a volume-data brick in order to gain access to the internal buffer-data for direct write operations. More...
 
virtual const Data_brick_buffer_info access_brick_data_buffer (mi::Uint32 brick_subset_idx, mi::Uint32 brick_attrib_idx) const =0
 Query the internal buffer information of the data-subset instance for a volume-data brick in order to gain access to the internal buffer-data for direct write operations. More...
 
virtual mi::neuraylib::IRDMA_buffer * access_brick_data_buffer_rdma (mi::neuraylib::IRDMA_context *rdma_ctx, mi::Uint32 brick_subset_idx, mi::Uint32 brick_attrib_idx)=0
 Creates an RDMA buffer that is a wrapper for the internal buffer. More...
 
virtual bool set_brick_homogeneous_value (mi::Uint32 brick_subset_idx, mi::Uint32 brick_attrib_idx, const void *brick_homog_value)=0
 Write a single homogeneous value for a volume-data brick to the subset from a memory block in main memory. More...
 
virtual bool set_background_value (mi::Uint32 attrib_idx, const void *background_value)=0
 Set a background value used in volume areas not covered by voxel or homogeneous brick data. More...
 
virtual void set_brick_state (mi::Uint32 brick_subset_idx, mi::Uint32 brick_attrib_idx, Data_brick_state brick_state)=0
 Explicitly set the state of a data-brick in the subset. More...
 
virtual Data_brick_state get_brick_state (mi::Uint32 brick_subset_idx, mi::Uint32 brick_attrib_idx) const =0
 Query the state of a data-brick in the subset. More...
 
virtual bool store_internal_data_representation (const char *output_filename) const =0
 This method allows to write a compact cache file of successfully loaded subset data to the file system for more efficient future loading operations. More...
 
virtual bool load_internal_data_representation (const char *input_filename)=0
 This method allows to load a compact cache file of a data subset. More...
 
virtual IVolume_device_data_bufferallocate_volume_sub_data_device (mi::Uint32 subdata_attrib_idx, mi::math::Vector_struct< mi::Sint32, 3 > subdata_position, mi::math::Vector_struct< mi::Uint32, 3 > subdata_extent, mi::Uint32 subdata_flags=SUB_DATA_GEN_DEFAULT) const =0
 Generating a volume data buffer for use by the application. More...
 
virtual bool fill_volume_sub_data_buffer (IVolume_device_data_buffer *subdata_volume_buffer) const =0
 Fill a volume data buffer with subset-volume data for use by the application. More...
 
virtual bool write_from_volume_sub_data_buffer (const IVolume_device_data_buffer *subdata_volume_buffer) const =0
 Write back volume date from a volume data buffer. More...
 

Detailed Description

Distributed data storage class for sparse volume subsets.

The data import for sparse volume data associated with ISparse_volume_scene_element instances using NVIDIA IndeX is performed through instances of this subset class. A subset of a sparse volume is defined by all the volume-data bricks associated with a rectangular subregion of the entire scene/dataset. This interface class provides methods to input volume data for one or multiple attributes of a dataset.

Member Enumeration Documentation

 Data_brick_state

Definition of the state of a data-brick in the subset.

Data-bricks are empty by default. They can be set to a filled state, meaning that they are filled with voxel data, or homogeneous state, which means that they do not explicitly store voxel data but are defined by a constant value.

 Data_transformation

Transformation that should be applied on the written data.

Note
Experimental, subject to change!
Enumerator
DATA_TRANSFORMATION_NONE 

Pass through unchanged.

DATA_TRANSFORMATION_FLIP_AXIS_ORDER 

Change voxel storage order (x/y/z to z/y/x)

 Sub_data_gen_flags

Flags used for specifying the data generation process.

Enumerator
SUB_DATA_GEN_DEFAULT 

! Default generation mode.

SUB_DATA_GEN_INCLUDE_BORDER_VOXELS 

! Volume data generation with included border voxel.

SUB_DATA_GEN_NO_CLIP_REQUEST_VOLUME 

! Ignoring clip request

Member Function Documentation

 access_brick_data_buffer() [1/2]

virtual const Data_brick_buffer_info nv::index::ISparse_volume_subset::access_brick_data_buffer ( mi::Uint32  brick_subset_idx,
mi::Uint32  brick_attrib_idx 
) const
pure virtual

Query the internal buffer information of the data-subset instance for a volume-data brick in order to gain access to the internal buffer-data for direct write operations.

Note
Please note the const-qualifier in the access_brick_data_buffer interfaces method's signature, which leaves the instance of an ISparse_volume_subset implementation untouched.
Parameters
[in]brick_subset_idxVolume-data brick subset index for which to query internal buffer.
[in]brick_attrib_idxThe attribute index of the volume-data brick for which to query the internal buffer information
Returns
An instance of Internal_buffer_info describing the internal buffer data for direct use.

 access_brick_data_buffer() [2/2]

virtual const Data_brick_buffer_info nv::index::ISparse_volume_subset::access_brick_data_buffer ( mi::Uint32  brick_subset_idx,
mi::Uint32  brick_attrib_idx 
)
pure virtual

Query the internal buffer information of the data-subset instance for a volume-data brick in order to gain access to the internal buffer-data for direct write operations.

Parameters
[in]brick_subset_idxVolume-data brick subset index for which to query internal buffer.
[in]brick_attrib_idxThe attribute index of the volume-data brick for which to query the internal buffer information
Returns
An instance of Internal_buffer_info describing the internal buffer data for direct use.

 access_brick_data_buffer_rdma()

virtual mi::neuraylib::IRDMA_buffer * nv::index::ISparse_volume_subset::access_brick_data_buffer_rdma ( mi::neuraylib::IRDMA_context *  rdma_ctx,
mi::Uint32  brick_subset_idx,
mi::Uint32  brick_attrib_idx 
)
pure virtual

Creates an RDMA buffer that is a wrapper for the internal buffer.

Parameters
[in]rdma_ctxThe RDMA context used for wrapping the internal buffer.
[in]brick_subset_idxVolume-data brick subset index for which to query internal buffer.
[in]brick_attrib_idxThe attribute index of the volume-data brick for which to query the internal buffer information
Returns
RDMA buffer wrapping the internal buffer data, or 0 in case of failure.

 allocate_volume_sub_data_device()

virtual IVolume_device_data_buffer * nv::index::ISparse_volume_subset::allocate_volume_sub_data_device ( mi::Uint32  subdata_attrib_idx,
mi::math::Vector_struct< mi::Sint32, 3 >  subdata_position,
mi::math::Vector_struct< mi::Uint32, 3 >  subdata_extent,
mi::Uint32  subdata_flags = SUB_DATA_GEN_DEFAULT 
) const
pure virtual

Generating a volume data buffer for use by the application.

Parameters
[in]subdata_attrib_idxThe attribute index.
[in]subdata_positionThe position as an anchor that specifies a request bounding box together with the extent.
[in]subdata_extentThe extent that specifies a request bounding box together with the position.
[in]subdata_flagsFlags specifying a generation mode.
Returns
Returns the volume data buffer encapsulated by an instance of an IVolume_device_data_buffer interface implementation.

 fill_volume_sub_data_buffer()

virtual bool nv::index::ISparse_volume_subset::fill_volume_sub_data_buffer ( IVolume_device_data_buffer subdata_volume_buffer) const
pure virtual

Fill a volume data buffer with subset-volume data for use by the application.

Parameters
[in]subdata_volume_bufferThe volume data buffer to fill.
Returns
Returns true if the operation was successful, false otherwise.

 get_attribute_set_descriptor()

virtual const ISparse_volume_attribute_set_descriptor * nv::index::ISparse_volume_subset::get_attribute_set_descriptor ( ) const
pure virtual

Returns the attribute-set descriptor of the subset.

Returns
Returns the attribute-set descriptor interfcae.

 get_brick_state()

virtual Data_brick_state nv::index::ISparse_volume_subset::get_brick_state ( mi::Uint32  brick_subset_idx,
mi::Uint32  brick_attrib_idx 
) const
pure virtual

Query the state of a data-brick in the subset.

Parameters
[in]brick_subset_idxVolume-data brick subset index for which to query the state.
[in]brick_attrib_idxThe attribute index of the volume-data brick for which to query the state.
Returns
The current state of the selected data-brick.

 get_subset_data_descriptor()

virtual const ISparse_volume_subset_data_descriptor * nv::index::ISparse_volume_subset::get_subset_data_descriptor ( ) const
pure virtual

Returns the data subset descriptor of the subset.

Returns
Returns the data subset descriptor interface.

 load_internal_data_representation()

virtual bool nv::index::ISparse_volume_subset::load_internal_data_representation ( const char *  input_filename)
pure virtual

This method allows to load a compact cache file of a data subset.

Note
This API is currently not supported and will change in future releases.
Parameters
[in]input_filenameThe file name of the cache file to be loaded.
Returns
Returns true if the cache file import was successful.

 set_background_value()

virtual bool nv::index::ISparse_volume_subset::set_background_value ( mi::Uint32  attrib_idx,
const void *  background_value 
)
pure virtual

Set a background value used in volume areas not covered by voxel or homogeneous brick data.

The default background value is a zero value according to the attributes voxel format.

Parameters
[in]attrib_idxThe attribute index of the volume for which to set the background value.
[in]background_valuePointer to source value of background value that will be written to this data-subset.
Returns
True if the write operation was successful, false otherwise.

 set_brick_homogeneous_value()

virtual bool nv::index::ISparse_volume_subset::set_brick_homogeneous_value ( mi::Uint32  brick_subset_idx,
mi::Uint32  brick_attrib_idx,
const void *  brick_homog_value 
)
pure virtual

Write a single homogeneous value for a volume-data brick to the subset from a memory block in main memory.

The passed value pointer needs to match the type and size of the attribute voxel-format.

Parameters
[in]brick_subset_idxVolume-data brick subset index for which to write homogeneous data value.
[in]brick_attrib_idxThe attribute index of the volume-data brick for which to write homogeneous data value.
[in]brick_homog_valuePointer to source value of homogeneous data value that will be written to this data-subset.
Returns
True if the write operation was successful, false otherwise.

 set_brick_state()

virtual void nv::index::ISparse_volume_subset::set_brick_state ( mi::Uint32  brick_subset_idx,
mi::Uint32  brick_attrib_idx,
Data_brick_state  brick_state 
)
pure virtual

Explicitly set the state of a data-brick in the subset.

Parameters
[in]brick_subset_idxVolume-data brick subset index for which to set the state.
[in]brick_attrib_idxThe attribute index of the volume-data brick for which to set the state.
[in]brick_stateThe state to set for the selected data-brick.

 store_internal_data_representation()

virtual bool nv::index::ISparse_volume_subset::store_internal_data_representation ( const char *  output_filename) const
pure virtual

This method allows to write a compact cache file of successfully loaded subset data to the file system for more efficient future loading operations.

Note
This API is currently not supported and will change in future releases.
Parameters
[in]output_filenameThe file name for the data subset memory dump.
Returns
Returns true if the memory dump was successful.

 write_brick_data() [1/2]

virtual bool nv::index::ISparse_volume_subset::write_brick_data ( mi::Uint32  brick_subset_idx,
mi::Uint32  brick_attrib_idx,
const mi::neuraylib::IRDMA_buffer *  src_rdma_buffer,
Data_transformation  brick_data_transform = DATA_TRANSFORMATION_NONE 
)
pure virtual

Write a volume-data brick to the subset from a IRDMA_buffer.

Note
The IRDMA_buffer can be located either in CPU or GPU memory. If a GPU-memory buffer is passed additional memory copy operations may occur.
Parameters
[in]brick_subset_idxVolume-data brick subset index for which to write voxel data.
[in]brick_attrib_idxThe attribute index of the volume-data brick for which to write voxel data.
[in]src_rdma_bufferSource RDMA buffer of voxel values that will be written to this data-subset buffer.
[in]brick_data_transformTransformation to apply to the data that is written
Returns
True if the write operation was successful, false otherwise.

 write_brick_data() [2/2]

virtual bool nv::index::ISparse_volume_subset::write_brick_data ( mi::Uint32  brick_subset_idx,
mi::Uint32  brick_attrib_idx,
const void *  src_values,
mi::Sint32  gpu_device_id,
Data_transformation  brick_data_transform = DATA_TRANSFORMATION_NONE 
)
pure virtual

Write a volume-data brick to the subset from a memory block in main memory.

Parameters
[in]brick_subset_idxVolume-data brick subset index for which to write voxel data.
[in]brick_attrib_idxThe attribute index of the volume-data brick for which to write voxel data.
[in]src_valuesSource array of voxel values that will be written to this data-subset buffer.
[in]gpu_device_idGPU device id if the passed buffer is located on a GPU device, otherwise this needs to be -1 to for a host memory buffer.
[in]brick_data_transformTransformation to apply to the data that is written
Returns
Returns true if the write operation was successful and false otherwise.

 write_brick_data_multiple()

virtual bool nv::index::ISparse_volume_subset::write_brick_data_multiple ( const mi::Uint32 *  brick_subset_indices,
const mi::Uint32 *  brick_attrib_indices,
mi::Uint32  nb_input_bricks,
const mi::Size *  src_rdma_buffer_offsets,
const mi::neuraylib::IRDMA_buffer *  src_rdma_buffer,
Data_transformation  brick_data_transform = DATA_TRANSFORMATION_NONE 
)
pure virtual

Write multiple volume-data bricks to the subset from a single IRDMA_buffer.

The packing of the volume-data bricks to be written from the IRDMA_buffer is defined in the passed src_rdma_buffer_offsets parameter. If this parameter is 0, the volume sub-blocks need to be tightly packed after each other in the source buffer.

Note
The IRDMA_buffer can be located either in CPU or GPU memory. If a GPU-memory buffer is passed additional memory copy operations may occur.
Parameters
[in]brick_subset_indicesSubset volume-data brick indices for which to write voxel data.
[in]brick_attrib_indicesThe attribute indices of the volume-data bricks for which to write voxel data.
[in]nb_input_bricksThe number of dst_range bounding boxes.
[in]src_rdma_buffer_offsetsArray defining the offsets of the individual volume sub-blocks in the linear source buffer. These offsets need to be defined as numbers of typed elements according the voxel type of the volume brick. If this parameter is 0, the offsets will be derived from the dst_ranges parameter assuming a tight packing of the volume sub-blocks in the source buffer.
[in]src_rdma_bufferSource RDMA buffer of voxel values that will be written to this subset buffer.
[in]brick_data_transformTransformation to apply to the data that is written
Returns
Returns true if the write operation was successful and false otherwise.

 write_from_volume_sub_data_buffer()

virtual bool nv::index::ISparse_volume_subset::write_from_volume_sub_data_buffer ( const IVolume_device_data_buffer subdata_volume_buffer) const
pure virtual

Write back volume date from a volume data buffer.

Parameters
[in]subdata_volume_bufferThe volume data buffer to fill.
Returns
Returns true if the operation was successful, false otherwise.

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