public class SoVolumeConverter extends SoBaseLDMConverter
This class converts existing volume data sets into the LDM (Large Data Management) format.
The LDM converter classes provide many powerful features. Information common to all converter classes is documented in SoConverter, including:
You can subclass from SoVolumeConverter to use a custom volume reader, provide a custom subsampling method, etc. A custom volume reader can be used to convert almost any data format into LDM format. To use a custom volume reader, derive a new class from SoVolumeReader and override the getReader() method. To use a custom subsampling method override the sampleTile method. See for example $OIVJHOME/examples/volumeviz/sample/genericConverter/withDefaultReader/Main.java.
SoConverter
,
SoBaseLDMConverter
,
SoVolumeReader
SoConverter.ConverterErrors
Inventor.ConstructorCommand
CVT_ABORTED, CVT_CANT_CREATE_DATA_FILE, CVT_CANT_CREATE_HEADER_FILE, CVT_CANT_OPEN_INPUT_FILE, CVT_CANT_READ_INPUT_FILE, CVT_FILE_EXT_UNKNOWN, CVT_FINISHED_WITH_WARNINGS, CVT_INPUT_PARAMS_PROBLEM, CVT_NO_ERROR, CVT_NO_LDM_LICENSE, CVT_NO_NODE, CVT_NOT_ENOUGH_DISK_SPACE, CVT_NOT_INITIALIZED
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoVolumeConverter() |
SoVolumeConverter(boolean isClient) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getXmlTags()
Gets a string containing some xml tags that will be inserted in the header of
the converted file.
|
boolean |
progress(int numTilesGenerated,
int numTilesToGenerate)
This method is called each time a tile of data is generated.
|
void |
sampleTile(SbVec3i32 tile_dim,
int data_type,
int border,
java.nio.ByteBuffer[] octant_tiles,
java.nio.ByteBuffer parent_tile)
Method used to downsample a tile.
|
void |
setReader(SoVolumeReader reader)
Defines the reader that will be used to read the input file given
to the convert method.
|
getReader
convert, convert, convert, listenToServer
dispose, getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
public SoVolumeConverter()
public SoVolumeConverter(boolean isClient)
public void setReader(SoVolumeReader reader)
public void sampleTile(SbVec3i32 tile_dim, int data_type, int border, java.nio.ByteBuffer[] octant_tiles, java.nio.ByteBuffer parent_tile)
Protected usage only.
tile_dim
- is the size of the tile to create in number of voxels.data_type
- is the type of the data (see SoVolumeData
)border
- takes a 0 or 1 value to let the user know whether border between tiles should be handled.octant_tiles
- are the values of the 8 higher resolution tiles.
Attention : octant_tiles[i] is null if the i-th octant is free of
data (the data is an asymmetric volume).parent_tile
- is the output buffer that must be filled when overriding this methodpublic boolean progress(int numTilesGenerated, int numTilesToGenerate)
Protected usage only. This method can be overriden by a custom converter to abort the conversion conditionnaly and/or to update a progress bar.
numTilesGenerated
- represents the number of tiles already generatednumTilesToGenerate
- is the total number of tiles to generate.public java.lang.String getXmlTags()
Protected usage only. This method must be overriden by a custom converter to insert xml tags.
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com