Class SoVRRasterStackReader
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.misc.SoBase
-
- com.openinventor.inventor.fields.SoFieldContainer
-
- com.openinventor.ldm.readers.SoVolumeReader
-
- com.openinventor.volumeviz.readers.SoVRRasterStackReader
-
- All Implemented Interfaces:
SafeDisposable
public class SoVRRasterStackReader extends SoVolumeReader
Raster stack reader. Reader for a volume defined by a "stack" of images.A raster stack is a list of raster images (that is, containing pixels, not vector graphics) of the same size so as to create a voxel volume. This reader uses a descriptive file (.lst) including a header and a list of all the raster image filenames. The file is structured as follows:
ORParameters { Raw 0 Dims 2048 2048 100 Size 10.000000 10.000000 10.000000 1250.000000 1250.000000 500.000000 Channel 2 } C:/tmp/tiff/img00000.tiff C:/tmp/tiff/img00001.tiff C:/tmp/tiff/img00002.tiff C:/tmp/tiff/img00003.tiff C:/tmp/tiff/img00004.tiff ....
Header DescriptionParameters { Raw 1 Endianess 1 HeaderLength 256 PrimType 0 Binary 0 Dims 1024 1024 300 Size 50.000000 50.000000 50.000000 1050.000000 1050.000000 250.000000 Channel 1 } img00000.raw img00001.raw img00002.raw img00003.raw img00004.raw .... - Raw: 0 (formatted data file), 1 (raw data file).
- Endianess: 0 (little endian), 1 (big endian) (for raw data only).
- HeaderLength: length of header in characters/bytes (for raw data only).
- PrimType: See
SoDataSet.DataType
(for raw data only).
- Binary: 0 (ASCII), 1 (binary) (for raw data only).
- Dims: height, width, depth in pixels of the stack.
- Size: Xmin Ymin Zmin Xmax Ymax Zmax, bounding box of the data set.
- Channel: See
SoVRRasterStackReader.ChannelSelection
.
Images in the list can be of different formats (uses all files formats supported by Open Inventor). VolumeViz can load image data in most common image formats including BMP, DDS, GIF, JPEG, JPEG2000, PNG and TIFF.
If images are different sizes, RD_UNSUPPORTED_DATA_TYPE_ERROR is returned by getDataChar.
The file path can be relative or absolute.
It is mandatory to have a line break after each property and/or filename otherwise VolumeViz could be unable to read the file properly.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SoVRRasterStackReader.ChannelSelections
Channel selection.-
Nested classes/interfaces inherited from class com.openinventor.ldm.readers.SoVolumeReader
SoVolumeReader.Axis, SoVolumeReader.CoordinateTypes, SoVolumeReader.DataInfo, SoVolumeReader.ReadErrors, SoVolumeReader.ReaderTypes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoVRRasterStackReader()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setChannelSelection(SoVRRasterStackReader.ChannelSelections cs)
Selects channels to be used for data rendering.boolean
setDirectory(java.lang.String directory)
Specify a directory containing image files to load (jpg, png, tif,...).void
setSize(SbBox3f size)
Defines the bounding box size in physical units of the data set.-
Methods inherited from class com.openinventor.ldm.readers.SoVolumeReader
closeAllHandles, getAppropriateReader, getBorderFlag, getConfiguredWriter, getCoordinateType, getDataChar, getDirectCoordSys, getDirectCoordSysAutoDetection, getDoubleMinMax, getFilename, getIntMinMax, getMinMax, getNumSignificantBits, getNumVoxels, getOriginalFilename, getReaderType, getSizeToAllocate, getSubSlice, getTileMinMax, getTileSize, isDataConverted, isIgnoredFile, isRGBA, isThreadSafe, readTile, readTile, reloadTileMinMax, restoreAllHandles, setDirectCoordSysAutoDetection, setDirectCoorSys, setFilename, setInputDataRange, setOutputDataType, setRectilinearCoordinates, setRGBA
-
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
-
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable, touch
-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-
-
-
Method Detail
-
setSize
public void setSize(SbBox3f size)
Defines the bounding box size in physical units of the data set.
-
setDirectory
public boolean setDirectory(java.lang.String directory)
Specify a directory containing image files to load (jpg, png, tif,...). Each image file in this folder with the exact same dimension and the exact same number of components will be loaded.Notes:
- The directory should contain only valid image files.
- The file format is automatically detected.
- If the images are RGB or RGBA, the volume is loaded as RGBA data. (It is not possible to load a single component using this method.)
- Parameters:
directory
- The directory from which to load files.- Returns:
- true if successful.
- Since:
- Open Inventor 9.5.0
-
setChannelSelection
public void setChannelSelection(SoVRRasterStackReader.ChannelSelections cs)
Selects channels to be used for data rendering.
-
-