public class SoLDMTopoOctree extends Inventor
SoLDMTopoOctree
class provides information about the hierarchy of LDM tiles used for a given dataset, which depends only on the dataset dimensions and the tile dimensions.
For example, an application can query the total number of LDM tiles in a data set, the number of resolution levels in the LDM tile hierarchy, the id of the tile that contains a specified voxel position, the position and extent of a specified tile id, and more. An application can conveniently query the SoLDMTopoOctree
for an actual data set using the SoDataSet.getLDMTopoOctree()
method or create an LDMTopoOctree object with any specified dimensions. In the latter case, the LDMTopoOctree must be initialized using the init()
method.
In VolumeViz LDM every tile has both a tileID and a fileID. The tileID is the unique identifier of a tile in the (conceptual) complete, symmetrical hierarchy. The fileID is the index of a tile in a sequential numbering of all the tiles that actually contain data. The tileID is normally used to identify tiles in an application, but the fileID is used, for example, when calling the readTile method in an SoVolumeReader
class. In a cubical volume (all three dimensions the same), there are equal numbers of tileIDs and fileIDs, but in most volumes there are many fewer fileIDs than tileIDs.
The terms 'resolution' and 'level' are both used in this class to identify a specific level in the LDM tile hierarchy.
getTileID()
method takes resolution level as a parameter.
level()
method returns the tile level, not the resolution level.
getLevelMax()
- resolutionLevel.
See also:
Inventor.ConstructorCommand
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoLDMTopoOctree()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getFileID(SoLDMTileID tileID)
Given a tileID, returns the corresponding fileID.
|
int |
getLevelMax()
Returns the maximum level of the octree tile hierarchy.
|
int |
getNumFileIDs()
Returns the number of fileIDs in the volume.
|
long |
getNumTileIDs()
Returns the number of tileIDs in the complete (conceptual) octree.
|
SoLDMTileID |
getTileID(int fileID)
Given a fileID, returns the corresponding tileID.
|
SoLDMTileID |
getTileID(SbVec3i32 cellPos,
int resolutionLevel)
Given the position of a voxel in full resolution voxel coordinates (i,j,k) and a resolution level, returns the tile ID of the corresponding tile.
|
SbBox3i32 |
getTilePos(SoLDMTileID tileID)
Returns the bounding box, in voxel/cell coordinates, of the specified tile.
|
SbVec3i32 |
getTileSize()
Return the tilesize used to setup this octree.
|
void |
init(SbVec3i32 dimension,
int tileDim)
Calls init(dimension, tileDim, (int)0).
|
void |
init(SbVec3i32 dimension,
int tileDim,
int border)
Initialize with the properties of the data set.
|
boolean |
isEmpty()
Returns false if the octree is empty.
|
int |
level(long index)
Returns the tile level of the given tile Id.
|
int |
level(SoLDMTileID id)
Returns the tile level of the given tile Id.
|
dispose, getNativeResourceHandle
public void init(SbVec3i32 dimension, int tileDim)
public SoLDMTileID getTileID(int fileID)
public void init(SbVec3i32 dimension, int tileDim, int border)
public boolean isEmpty()
public SbBox3i32 getTilePos(SoLDMTileID tileID)
public SoLDMTileID getTileID(SbVec3i32 cellPos, int resolutionLevel)
Regardless of the tile's resolution level in the LDM tile hierarchy, the returned bounding box is always in full-resolution voxel coordinates. In other words, the box is the region of the full-resolution volume that the tile "spans" and the extent of this box is not the same as the tile size unless the specified tile is at resolution level 0 (full resolution).
Example: If the volume is 256 x 256 x 256 with tile size 64
public int getLevelMax()
public SbVec3i32 getTileSize()
public int getNumFileIDs()
getNumTileIDs()
.public int level(long index)
getLevelMax()
- tileLevel. Note: Octree must be initialized.public int getFileID(SoLDMTileID tileID)
public int level(SoLDMTileID id)
getLevelMax()
- tileLevel. Note: Octree must be initialized.public long getNumTileIDs()
getNumFileIDs()
.Generated on July 31, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com