Package com.openinventor.ldm.readers
Class SoLDMReader
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.misc.SoBase
-
- com.openinventor.inventor.fields.SoFieldContainer
-
- com.openinventor.ldm.readers.SoVolumeReader
-
- com.openinventor.ldm.readers.SoLDMReader
-
- All Implemented Interfaces:
SafeDisposable
- Direct Known Subclasses:
SoVRLdmFileReader
public class SoLDMReader extends SoVolumeReader
Base class for LDM data set readers. This is the base class for specific LDM readers.See
SoVRLdmFileReader
for a specific implementation.This class retrieves the XML tags from an LDM header file (usually a .ldm file) that are general to all LDM files, i.e. the tags that are interpreted by VolumeViz.
Custom tags for classes derived from
SoLDMReader
can be retrieved by overriding the handleHeader method.General tags common for all LDM Readers are:
<?xml version="1.0" encoding="utf-8" ?> <VolumeInformation> <OriginalFile>3dhead.vol</OriginalFile> <Size> //or dimension// <U>256</U> <V>256</V> <W>109</W> </Size> <TileSize> <U>64</U> <V>64</V> <W>64</W> </TileSize> <DataType> <Type>n</Type><Num>m</Num> ... <DataType> <DataFilename>3DHEAD.dat</DataFilename>//separate datafile// <WordFormat>1</WordFormat>//data stored in little/big endian// <CompletionFilename>3dhead.fcp</CompletionFilename>//if the conversion was interrupted, refer to this file <RectilinearMapping> <mapping axis="U"> <map>-180</map> <map>-160</map> ... one entry per voxel on U axis </mapping> ... repeat for V, W axis </RectilinearMapping>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SoLDMReader.SoLDMErrors
LDM Reader error code.-
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 SoLDMReader()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SbBox3f
getBbox(int fileId)
Returns the bounding box of the data associated with the specified file ID.SbVec3f
getCenter(int fileId)
Returns the center of the data associated with the specified file ID.SbVec3i32
getDimension()
Returns the dimension of the data.SbBox3f
getSize()
Returns the bounding box of the total data in world coordinates.SbXmlTag
getXmlTag(java.lang.String tagName)
Gets the first occurrence of the XML element whose tag name is specified by tagName.boolean
isLittleEndian()
Returns whether the bytes of the data are stored in big or little endian order.-
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
-
getCenter
public SbVec3f getCenter(int fileId)
Returns the center of the data associated with the specified file ID. If returns false, not supported.
-
getSize
public SbBox3f getSize()
Returns the bounding box of the total data in world coordinates.
-
getBbox
public SbBox3f getBbox(int fileId)
Returns the bounding box of the data associated with the specified file ID. The file ID corresponds to the tile ID in an LDM data file. If returns false, not supported.
-
getXmlTag
public SbXmlTag getXmlTag(java.lang.String tagName)
Gets the first occurrence of the XML element whose tag name is specified by tagName. Then the associated value or subtags can be fetched using the SbXmlElement methods. Custom XML tags can be added to the LDM header file by using the method SoLDMConverter.setXmlCallback().
-
getDimension
public SbVec3i32 getDimension()
Returns the dimension of the data.
-
isLittleEndian
public boolean isLittleEndian()
Returns whether the bytes of the data are stored in big or little endian order. The order is little endian if the function returns true.
-
-