public class SbImageDataAdapterHelper extends Inventor
SoImageDataAdapter
.
Contains various utility methods.Inventor.ConstructorCommand
VERBOSE_LEVEL, ZeroHandle
Modifier and Type | Method and Description |
---|---|
static SoImageDataAdapter |
getAppropriateAdapter(java.lang.String filename)
Calls getAppropriateAdapter(filename, (long)0).
|
static SoImageDataAdapter |
getAppropriateAdapter(java.lang.String filename,
long maxMemory)
Loads data and returns a preconfigured
SoImageDataAdapter instance based on the given filename extension. |
static void |
saveToFile(SoImageDataAdapter image,
java.lang.String filename)
Save given image to a file.
|
void |
setValue(SbImageDataAdapterHelper copyFrom) |
dispose, getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
public static SoImageDataAdapter getAppropriateAdapter(java.lang.String filename)
public static SoImageDataAdapter getAppropriateAdapter(java.lang.String filename, long maxMemory)
SoImageDataAdapter
instance based on the given filename extension.
If no SoImageDataAdapter
is available for this extension or an error occurs, then NULL is returned.
filename
- File to load
maxMemory
- If the data is smaller than the specified maximum memory in MB (megabytes), getAppropriateAdapter()
will load the data in memory and return an SoMemoryDataAdapter
. Otherwise, data is not loaded in memory and an SoFileDataAdapter
is returned. Access to data will be faster using a memory than a file based adapter. Important:
SoMemoryDataAdapter
is returned.
The following file formats are supported without additional license:
BMP (Windows only), DDS, GIF, JPEG 2000, JPEG, PGX, PNG, PNM, SGI RGBA, Sun, TIFF
The table below shows file formats which are supported in combination with a VolumeViz license:
File extension | Reader class | Description |
.am | SoVRAmFileReader | Avizo Mesh file format |
.dc3, .dic, .dicom | SoVRDicomFileReader | DICOM file format |
.fld | SoVRAvsFileReader | AVS field file format |
.lda or .ldm | SoVRLdmFileReader | LDM file format |
.sgy or .segy | SoVRSegyFileReader | SEG Y rev 1 file format |
.vol | SoVRVolFileReader | Vol file format |
.vox | SoVRVoxFileReader | Vox file format |
.lst | SoVRRasterStackReader | Lst file format (stack of images) |
File format notes:
SoVRAmFileReader
for limitations.
SoVRAvsFileReader
.
SoVRDicomFileReader
SoVolumeConverter
). Preprocessing volume data into this format provides the maximum benefits from the VolumeViz large data management (LDM) features. See SoVRLdmFileReader
.
SoVRSegyFileReader
.
SoVRVolFileReader
.
SoVRRasterStackReader
for details and limitations.
Note: '3D TIFF' files (multiple images in one file) are not currently supported.
public void setValue(SbImageDataAdapterHelper copyFrom)
public static void saveToFile(SoImageDataAdapter image, java.lang.String filename)
Supported formats are:
SoVRRasterStackReader
.
Any other file extension will result in throwing an exception. A time series (getSize()[3] > 1) will result in throwing an exception.
This is just a convenience method. Other formats may be written using subclasses of SoRasterImageRW
or by accessing the data (see SbImageDataAccessor
) and writing explicitly.
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com