SoVRVolFileReader Class Reference

VolumeViz VOL file reader. More...

#include <VolumeViz/readers/SoVRVolFileReader.h>

Inheritance diagram for SoVRVolFileReader:
SoVolumeReader SoFieldContainer SoBase SoRefCounter SoTypedObject

List of all members.

Public Member Functions

virtual SoType getTypeId () const
 SoVRVolFileReader ()
virtual ReadError getDataChar (SbBox3f &size, SoDataSet::DataType &type, SbVec3i32 &dim)
virtual void getSubSlice (const SbBox2i32 &subSlice, int sliceNumber, void *data)
virtual SoVolumeReader::ReaderType getReaderType ()

Static Public Member Functions

static SoType getClassTypeId ()

Detailed Description

VolumeViz VOL file reader.

VOL is a simple volume interchange format (see "Introduction to Volume Rendering", Lichtenbelt, Crane, Naqvi, 1998). The VolumeViz reader can load files containing 8- or 16-bit voxels.

The following is a slightly simplified description of the VOL file format.

All values in a VOL file are binary format, stored in "big-endian" order. In other words, values can used directly on most UNIX machines (SPARC, MIPS, PA-RISC, etc), but must be byte swapped on most Windows and Linux (X86) machines.

A VOL file consists of a variable length header followed by data values. The VolumeViz reader looks at the first seven or ten header values (depending on the value of magicNumber). All values in the header are 4 bytes long and are 32 bit integer or float as listed below. The header contains the total length of the header in bytes and the data values begin at this offset in the file. Data values are either 1 or 2 bytes long (8- or 16- bit integers). Data values are stored as a stack of images, in other words Z slices (X increasing fastest, then Y, then Z).

The header consists of:

If "magicNumber" equals 192837466 (decimal) then header also contains three scale factors used to define nonuniform voxel spacing:

Constructor & Destructor Documentation

SoVRVolFileReader::SoVRVolFileReader (  ) 


Member Function Documentation

static SoType SoVRVolFileReader::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoVolumeReader.

virtual ReadError SoVRVolFileReader::getDataChar ( SbBox3f size,
SoDataSet::DataType type,
SbVec3i32 dim 
) [virtual]

Gets the characteristics (file header) of the data volume.

See SoVolumeData. size is the size of the actual volume. type is the type of the data. dim is the dimension of the data.

Implements SoVolumeReader.

virtual SoVolumeReader::ReaderType SoVRVolFileReader::getReaderType (  )  [inline, virtual]

Returns the reader type.

Reimplemented from SoVolumeReader.

virtual void SoVRVolFileReader::getSubSlice ( const SbBox2i32 subSlice,
int  sliceNumber,
void *  data 
) [virtual]

New method required by VolumeViz 3.0 when using large volume support.

Must copy a rectangular part of an XY slice to the memory specified by data. Slices will not always be read sequentially.

Implements SoVolumeReader.

virtual SoType SoVRVolFileReader::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Reimplemented from SoVolumeReader.

The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 7 Dec 2022
Copyright © Thermo Fisher Scientific All rights reserved.