public class SoLDMResourceParameters extends SoFieldContainer
Global LDM parameters can be set using static methods in class SoLDMGlobalResourceParameters
. See the SoLDMGlobalResourceParameters
class description for an overview of LDM memory management.
See also:
Modifier and Type | Class and Description |
---|---|
static class |
SoLDMResourceParameters.FixedResolutionReport
This structure returns information to the application when using fixed resolution mode.
|
static class |
SoLDMResourceParameters.LoadPolicies
Tile Load Policy.
|
static class |
SoLDMResourceParameters.TileCachePolicies
Tile cache management policy (see the Memory Management section above for more information).
|
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
SoSFBool |
fixedResolution
Fixed resolution mode.
|
SoSFInt32 |
loadNotificationRate
Tile loading notification rate.
|
SoSFEnum<SoLDMResourceParameters.LoadPolicies> |
loadPolicy
Tile loading policy.
|
SoSFInt32 |
max2DTexMemory
Maximum of 2D textures memory in MB for this data set.
|
SoSFInt32 |
maxMainMemory
Maximum allowed main memory in MB that LDM is allowed to use for this data set.
|
SoSFInt32 |
maxResolutionThreshold
Maximum loading threshold for the LDM module.
|
SoSFInt32 |
maxTexMemory
Maximum allowed texture (GPU) memory in MB for this data set.
|
SoSFInt32 |
minResolutionThreshold
Minimum loading threshold for LDM module.
|
SoSFInt32 |
numPrefetchThread
Number of threads used by the tile prefetch mechanism.
|
SoSFInt32 |
resolution
Resolution level for fixed resolution mode.
|
SoSFVec3i32 |
subTileDimension
Size of subtiles used by some accelerated algorithms.
|
SoSFInt32 |
tex2LoadRate
Maximum number of 2D tiles to be loaded in texture memory per frame.
|
SoSFInt32 |
tex3LoadRate
Maximum number of 3D tiles to be loaded into texture memory per frame for this data set.
|
SoSFEnum<SoLDMResourceParameters.TileCachePolicies> |
tileCachePolicy
Specify which tiles should be cached in LDM memory.
|
SoSFVec3i32 |
tileDimension
Sets the tile size for non-LDM data.
|
SoSFFloat |
tileHalfLife
Tile half-life (seconds).
|
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoLDMResourceParameters()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getDataSize()
Gets the size of a voxel in bytes.
|
float |
getGeometryPriority(java.lang.Class<? extends Inventor> geometryType)
Returns the priority of the specified geometry type.
|
float |
getMovingTimeOut()
Returns the amount of time during which LDM continues not loading data once a user stops interaction.
|
void |
setGeometryPriority(java.lang.Class<? extends Inventor> geometryType,
float priority)
Sets the importance of one type of geometry relative to others.
|
void |
setMovingTimeOut(float timeout)
Sets the amount of time (in seconds) during which LDM continues not loading once a user stops interaction.
|
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable, touch
getNativeResourceHandle
public final SoSFInt32 maxMainMemory
If value is not -1 (default) LDM will not consider this node in memory allocation, and allocated CPU memory for this node will be the exact value set in the field. In this case, the amount of memory is removed from Global value. All other dataset will share (SoLDMGlobalResourceParameters.getMaxMainMemory
- ( Sum of memory of all datasets with maxMainMemory
!= -1 )) / ( number of datasets with maxMainMemory
== -1 )
public final SoSFInt32 maxTexMemory
SoVolumeRender
nodes.
Default value is -1, meaning LDM is in charge of the automatic sharing of a given resource. Automatic sharing means LDM will compute, by itself, the amount of associated resource it allocates to each dataset. The automatic allocation take in account all nodes in scenegraph.
If value is not -1 (default) LDM will not consider this node in memory allocation, and allocated CPU memory for this node will be the exact value set in the field. In this case, the amount of memory is removed from Global value. All other dataset will share (SoLDMGlobalResourceParameters.getMaxTexMemory
- ( Sum of memory of all datasets with maxTexMemory
!= -1 )) / ( number of datasets with maxTexMemory
== -1 )
public final SoSFEnum<SoLDMResourceParameters.LoadPolicies> loadPolicy
The loading occurs as long as there is something to load if ALWAYS is passed. No loading occurs if NEVER is passed, however at least the resolution 0 is loaded.
public final SoSFEnum<SoLDMResourceParameters.TileCachePolicies> tileCachePolicy
TileCachePolicy
for the different options. Default value is ALL.
Note that in the case of an in-memory volume, the default mode will duplicate data in memory. In this case, you should use LOWRES_ONLY or NONE.
public final SoSFInt32 tex3LoadRate
SoLDMGlobalResourceParameters.setTex3LoadRate()
. This field is only considered for SoVolumeRender
nodes.
Each tile needed for volume rendering (SoVolumeRender
) and volume geometry must be transfered to GPU memory as a 3D texture. So, for example, transfering 1000 tiles at the loadRate 10 requires 100 frames. (How many seconds this takes depends on the frames per second possible, which in turn depends on many factors including the complexity of the scene graph.) Increasing the loadRate value reduces the number of frames required to reach maximum resolution. But the render traversal has to wait for the data transfer to finish, so each frame may take longer to render, increasing the total time to reach maximum resolution.
Default value is -1, meaning LDM is in charge of the automatic sharing of a given resource. Automatic sharing means LDM will compute, by itself, the amount of associated resource it allocates to each dataset. The automatic allocation takes into account all nodes in scenegraph.
If value is not -1 (default) LDM will not consider this node in automatic allocation, and allocated 3D texture LoadRate for this node will be the exact value set in the field. In this case, the amount of memory is removed from Global value. All other dataset will share (SoLDMGlobalResourceParameters.getTex3LoadRate
- ( Sum of memory of all datasets with tex3LoadRate
!= -1 )) / ( number of datasets with tex3LoadRate
== -1 )
public final SoSFInt32 max2DTexMemory
SoSlice
nodes.
Each tile needed to render a slice (SoOrthoSlice
, SoVolumeSkin
, etc) must be stored in GPU memory as a 2D texture. This method limits the amount of GPU memory that can be used by (for example) SoOrthoSlice
and SoVolumeSkin
nodes. This can be useful when combining slices and volume rendering because the 3D textures used by volume rendering require much more GPU memory.
Default value is -1, meaning LDM is in charge of the automatic sharing of a given resource. Automatic sharing means LDM will compute, by itself, the amount of associated resource it allocates to each dataset. The automatic allocation takes into account all nodes in scenegraph.
If value is not -1 (default) LDM will not consider this node in memory allocation, and allocated CPU memory for this node will be the exact value set in the field. In this case, the amount of memory is removed from Global value. All other dataset will share (SoLDMGlobalResourceParameters.setMax2DTexMemory
- ( Sum of memory of all datasets with max2DTexMemory
!= -1 )) / ( number of datasets with max2DTexMemory
== -1 )
public final SoSFInt32 tex2LoadRate
SoOrthoSlice
and SoVolumeSkin
. Default is SoLDMGlobalResourceParameters.getTex2LoadRate()
. This field is only considered for SoSlice
nodes.
Each tile needed to render a slice (SoOrthoSlice
, SoVolumeSkin
, etc) must be loaded into GPU memory as a 2D texture. Increasing the loadRate value reduces the number of frames required to reach maximum resolution. But the render traversal has to wait for the data transfer to finish, so each frame may take longer to render, increasing the total time to reach maximum resolution.
Default value is -1, meaning LDM is in charge of the automatic sharing of a given resource. Automatic sharing means LDM will compute, by itself, the amount of associated resource it allocates to each dataset. The automatic allocation takes into account all nodes in scenegraph.
If value is not -1 (default) LDM will not consider this node in automatic allocation, and allocated 2D texture for this node will be the exact value set in the field. In this case, the amount of LoadRate is removed from Global value. All other dataset will share (SoLDMGlobalResourceParameters.getTex2LoadRate
- ( Sum of memory of all datasets with tex2LoadRate
!= -1 )) / ( number of datasets with tex2LoadRate
== -1 )
public final SoSFInt32 minResolutionThreshold
If used with an ROI enabled, only tiles below the min resolution threshold and within the ROI subvolume will never be unloaded. All tiles outside the ROI subvolume will be unloaded. The ROI box allows you to specify where it is the most important to increase the resolution within the subvolume. By default, (subvolume ROI flag enabled) this would be within the box. If for example using the exclusion box mode, then lower resolution tiles will be within the box and higher resolution ones outside the box and within the subvolume.
public final SoSFInt32 maxResolutionThreshold
public final SoSFVec3i32 tileDimension
When loading data using an LDM volume reader, e.g. loading an LDM format file or using a custom volume reader that implements the readTile() method, the tile size is the value returned by the reader's getTileSize() method and cannot be modified by the application, so this field is ignored.
The default tile size is (128, 128, 128). Specifying a larger tile size than the default can improve performance and reduce the time required to fully refine the image. For example, a larger tile size reduces the total number of tiles that must be managed. However there are some trade-offs and limitations. A larger tile size means that the volume reader must load more data from the disk for each tile requested. That makes a larger tile size potentially more efficient for volume rendering, but means it will take longer to load the data to render a single slice because most of the data in each tile is not relevant for rendering that slice (but see also SoSlice.largeSliceSupport
). In general we recommend setting the tile size to 128 or 256. For relatively small volumes, especially in-memory volumes 512^3 or less, it can be effective to set the tile size equal to the volume size. This allows the entire volume to be handled as a single tile.
Notes:
SoVolumeData
node.
SoVolumeRender
node, then the subtileDimension should also be set to a larger value to avoid reducing performance. In general we recommend setting subTileDimension
to tileDimension
/4
public final SoSFVec3i32 subTileDimension
SoVolumeRender
nodes when field #subdivideTile is set to true. Notes:
subTileDimension
to tileDimension
/4.
public final SoSFInt32 loadNotificationRate
Default value is -1, meaning LDM is in charge of the automatic sharing of a given resource. Automatic sharing means LDM will compute, by itself, the amount of associated resource it allocates to each dataset. The automatic allocation takes into account all nodes in scenegraph.
If value is not -1 (default) LDM will not consider this node in automatic allocation, and allocated Notification rate for this node will be the exact value set in the field. In this case, the fixed value of notification rate is then removed from Global value. All other dataset will share (SoLDMGlobalResourceParameters.getLoadNotificationRate
- ( Sum of memory of all datasets with * loadNotificationRate
!= -1 )) / ( number of datasets with loadNotificationRate
== -1 )
public final SoSFFloat tileHalfLife
public final SoSFBool fixedResolution
resolution
field). If the requested resolution requires more memory than currently allowed (see maxMainMemory
, maxTexMemory
and SoLDMGlobalResourceParameters
) the highest resolution that fits in memory will be used. Note that tiles at lower resolution levels are always loaded into memory, but tiles at higher resolution levels (if any) will not be loaded.public final SoSFInt32 resolution
maxMainMemory
, maxTexMemory
, SoLDMGlobalResourceParameters
) the highest resolution that fits is used.public final SoSFInt32 numPrefetchThread
public void setGeometryPriority(java.lang.Class<? extends Inventor> geometryType, float priority)
The priority passed must be between 0 and 1, 0 being lowest priority and 1 the highest. LDM will refine tiles first where geometries are the most important. For example, if an SoVolumeRender
node has a higher priority than slices, then the tiles required for this SoVolumeRender
node will be refined first.
Default is 0.5 for a volume, 0.9 for other geometry.
public int getDataSize()
public float getGeometryPriority(java.lang.Class<? extends Inventor> geometryType)
setGeometryPriority()
.public void setMovingTimeOut(float timeout)
public float getMovingTimeOut()
setMovingTimeOut()
.Generated on July 31, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com