SoLDMGlobalResourceParameters Class |
Global resource parameters for LDM.
Namespace: OIV.LDM
The SoLDMGlobalResourceParameters type exposes the following members.
Name | Description | |
---|---|---|
![]() | Equals | (Inherited from Object.) |
![]() ![]() | GetDefaultMaxMainMem | Returns the default maximum system (CPU) memory in MB. |
![]() ![]() | GetDefaultMaxTex2D | Obsolete. Returns the default maximum number of 2D textures. |
![]() ![]() | GetDefaultMaxTexMem | Returns the default maximum GPU memory in MB. |
![]() | GetHashCode |
Overrides GetHashCode().
(Inherited from SoNetBase.) |
![]() ![]() | GetIgnoreFullyTransparentTiles | Returns the IgnoreFullyTransparentTiles flag. |
![]() ![]() | GetLoadNotificationRate | Returns the load notification rate. |
![]() ![]() | GetMax2DTexMemory | Get the maximum number of 2D textures allowed to be loaded. |
![]() ![]() | GetMax2DTextures | Obsolete. Get the maximum number of 2D textures allowed to be loaded. |
![]() ![]() | GetMaxMainMemory | Returns the maximum main memory in MB for all the VolumeViz data sets. |
![]() ![]() | GetMaxNumTriangles | Obsolete. Get the maximum number of triangles allowed to be rendered for all VolumeViz render nodes. |
![]() ![]() | GetMaxTexMemory | Returns the maximum texture memory in MB for all the VolumeViz data sets. |
![]() ![]() | GetMoveLowResolution | Obsolete. Returns the move low resolution flag. |
![]() ![]() | GetNumIO | Returns the current number of loading threads. |
![]() ![]() | GetScreenResolutionCulling | Returns the screen resolution culling state. |
![]() ![]() | GetSliceEqualResolution | Returns the slice equal resolution flag. |
![]() ![]() | GetTex2LoadRate | Returns the maximum number of 2D textures allowed to be loaded into texture memory per frame for all the VolumeViz data sets. |
![]() ![]() | GetTex3LoadRate | Returns the maximum number of tiles (3D textures) allowed to be downloaded into texture (GPU) memory per frame for all the VolumeViz data sets. |
![]() ![]() | GetTileCacheType | Obsolete. Returns the LDM tile cache setting. |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() ![]() | GetViewCulling | Returns the view culling flag. |
![]() ![]() | GetViewpointRefinement | Returns the viewpoint refinement flag. |
![]() ![]() | GetVisualFeedbackParam | Returns the state of the specified visual feedback parameter. |
![]() ![]() | SetIgnoreFullyTransparentTiles | Sets the IgnoreFullyTransparentTiles flag. |
![]() ![]() | SetLDMLoadCB(SoLDMGlobalResourceParametersLDMLoadCB) | Obsolete.
Use LoadCallback property instead.
Sets a delegate to be invoked with the loading state.
The delegate is invoked with true when the process starts loading, and with false
when loading is complete.
NOTE: This feature is available with VolumeVizLDM only.
|
![]() ![]() | SetLDMLoadCB(SoLDMGlobalResourceParametersLDMLoadUserDataCB, Object) | Obsolete. |
![]() ![]() | SetLDMMonitoringCB(SoLDMGlobalResourceParametersLDMMonitoringCB, Int32) | Obsolete.
Use SetMonitoringCB method instead.
|
![]() ![]() | SetLDMMonitoringCB(SoLDMGlobalResourceParametersLDMMonitoringUserDataCB, Int32, Object) | Obsolete.
Sets a monitoring delegate. This delegate provides a snapshot of the data loading
performance. The delegate will be invoked each time memAmount MB of data is loaded.
The delegate is called with the amount of data and the amount of time required to load that data.
NOTE: This feature is available with VolumeVizLDM only.
|
![]() ![]() | SetLoadNotificationRate | Sets the load notification rate (number of tiles). |
![]() ![]() | SetMax2DTexMemory | Sets the maximum 2D texture GPU memory in MB allowed to be loaded for all VolumeViz data sets. |
![]() ![]() | SetMax2DTextures | Obsolete. Sets the maximum number of 2D textures allowed to be loaded for all VolumeViz data sets. |
![]() ![]() | SetMaxMainMemory | |
![]() ![]() | SetMaxNumTriangles | Obsolete. Sets the maximum number of triangles allowed to be rendered for all VolumeViz render nodes. |
![]() ![]() | SetMaxTexMemory | Sets the maximum texture (GPU) memory, in MB, for all VolumeViz data sets. |
![]() ![]() | SetMonitoringCB | Sets a monitoring delegate. |
![]() ![]() | SetMoveLowResolution | Obsolete. |
![]() ![]() | SetNumIO | Sets how many simultaneous tile loading threads to use if multi I/O mode is on (it is on when LDM mode is on). |
![]() ![]() | SetScreenResolutionCulling | Sets the screen resolution culling flag. |
![]() ![]() | SetSliceEqualResolution(Boolean) | Calls SetSliceEqualResolution(state, true). |
![]() ![]() | SetSliceEqualResolution(Boolean, Boolean) | Sets the slice equal resolution flag. |
![]() ![]() | SetTex2LoadRate | Sets the maximum number of 2D textures allowed to be downloaded into texture (GPU) memory per frame (render traversal) for all the VolumeViz data sets. |
![]() ![]() | SetTex3LoadRate | Sets the maximum number of 3D textures allowed to be downloaded into texture (GPU) memory, per frame (render traversal), for all VolumeViz data sets. |
![]() ![]() | SetTileCacheType | Obsolete. Specifies how LDM will cache tiles in memory. |
![]() ![]() | SetViewCulling(Boolean) | Calls SetViewCulling(state, true). |
![]() ![]() | SetViewCulling(Boolean, Boolean) | |
![]() ![]() | SetViewpointRefinement | Sets the viewpoint refinement flag. |
![]() ![]() | SetVisualFeedbackParam | Sets the specified visual feedback parameter to true or false. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
![]() ![]() | LoadCallback | Sets a delegateto be called with the tile loading state. |
This class contains functions for controlling global resource parameters for the LDM module.
For extensions that use the LDM module, particularly VolumeViz, these parameters can have a significant effect on resource usage (primarily memory) and rendering performance.
Memory management
This class allows the application to specify how much CPU and GPU memory VolumeViz can use to load data and textures. By default the main memory and texture memory limits are set to a percentage of the total available system and GPU memory (see the setMaxMainMemory() and setMaxTexMemory() methods). Applications can use the SoCpuDevice and SoGLDevice classes to query the total and available memory on the CPU and GPU. There is an additional memory allocation for the BufferObject cache described below. How VolumeViz uses CPU memory depends on the data source (tiled or not tiled), the tile cache policy (see setTileCacheType() method) and the SoPreferences variable LDM_USE_IN_MEM_COMPRESSION.
Tiles: VolumeViz uses a data manager called LDM to manage volume data. LDM manages volume data in chunks called "tiles". If the volume size is larger than the tile size, then there are two classes of tile: full-resolution tiles containing actual data values and low-resolution tiles containing sub-sampled data values. The application may have native data that is already tiled or the data may be pre-processed to create tiles and store them in the LDM file format. In an LDM format file the tiles may optionally be compressed to save disk space and memory, but in this case, the tiles must be expanded before sending to the GPU. If the data is not tiled, for example disk formats like DICOM and SEGY or an in-memory volume, then tiles must be created in memory at runtime.
Tile size: Note that the default tile size is small and generally you wll get better performance with non-tiled data by explicitly setting a larger tile size (see the ldmResourceParameters field and SoLDMResourceParameters.tileDimension). If the volume size is 512^3 or less then the tile size may be set to the volume size to avoid the overhead of tiling. Do not set the tile size larger than 512 for a volume data set. However, if the volume is actually a large "image", i.e. the Z dimension is 1, then setting the tile size to 1024 may improve performance.
Caches: LDM allocates CPU memory for the CPU Tile Cache and the secondary BufferObject cache. The CPU tile cache is normally as large as needed or other memory requirements allow. If the volume is larger than the available or allowed CPU memory, then LDM keeps the "most important" tiles in memory (importance is determined by various heuristics set in this class and in SoLDMResourceParameters). The BufferObject cache is normally small and is used to temporarily store tiles that are created by LDM at run-time.
CPU Tile Cache (main memory) VolumeViz uses this amount of CPU memory as the primary cache for LDM data tiles. The main memory limit is set in megabytes using the setMaxMainMemory() method. If the data set is small enough to fit in system memory, then generally the memory limit should be set high enough to allow this. If the data set is larger than system memory, then the memory limit should be set as high as possible without impacting the application's other needs for memory. If the tile size is (for example) 64 and each voxel is a float value, then each tile requires approximately 1 MB of system memory. However since Open Inventor 8.5, the system memory requirement is reduced for compressed LDM tiles (stored compressed) and for uniform tiles (stored as a single value). When there are multiple LDM data sets, by default each data set receives getMaxMainMemory() divided by the number of datasets. Each time a new data set is created the per-dataset value is recomputed and some memory is taken away from existing data sets. Note: This default allocation of memory to multiple data sets is not optimal if the data sets have significantly different sizes. For example the memory required for a height field is normally much less than for a volume. In this case the application can explicitly allocate memory to each data set using the maxMainMemory field of the SoLDMResourceParameters object associated with the data set (see the SoDataSet.ldmResourceParameters field).
GPU Tile Cache (texture memory) VolumeViz uses this amount of GPU memory to cache LDM data tiles on the GPU. The texture memory limit is set in megabytes using the setMaxTexMemory() method. This value can also be set separately for each data set using SoLDMResourceParameters.
Some systems combine GPU memory and CPU memory. If 4GB are allocated on CPU and 4GB on GPU, the system may see a total amount of 8GB of private memory used by the process, which can lead to out of memory errors or swapping issues. When dealing with such issues, it is best to ensure that the total amount of memory allocated on both CPU and GPU by the program is lower than the available CPU memory.
BufferObject cache In some cases LDM needs to create tiles on-the-fly at runtime. To reduce memory usage and avoid duplicating application data, these created tiles are considered temporary and are stored in the BufferObject cache. This is a secondary cache that is separate from, and in addition to, the CPU tile cache (main memory). How the BufferObject cache is used depends on the data source (tiled or not) and the tile caching policy (see setTileCacheType()). For example when compressed tiles are loaded from an LDM format file, they are stored in the CPU tile cache still compressed (to reduce the memory requirement). When the tile data is needed to send data to the GPU, a temporary uncompressed tile is created and stored in the BufferObject cache. The BufferObject cache is also used to expand uniform tiles, which are stored in the LDM file and in memory as a single value. For non-tiled data (e.g. SEGY or DICOM or in-memory volume), depending on the tile cache policy, tiles are created from the source data when needed to send data to the GPU and temporarily stored in the BufferObject cache. The BufferObject cache size can only be set using the SoPreferences variable OIV_BUFFER_OBJECT_CACHE_SIZE. The size is set in number of tiles (not amount of memory) so the actual size of this cache depends on both the tile size and the data type size, i.e. it is larger for floating point data than for byte data. The default size is 50 tiles. The BufferObject cache size can only be set globally, not for each data set. The BufferObject cache was added in Open Inventor version 8.5.