SoVRRasterStackReader Class Reference
[Readers]

VolumeViz Raster stack reader. More...

#include <VolumeViz/readers/SoVRRasterStackReader.h>

Inheritance diagram for SoVRRasterStackReader:
SoVolumeReader SoFieldContainer SoBase SoRefCounter SoTypedObject

List of all members.

Public Types

enum  ChannelSelection {
  MAX_CHANNEL = 0,
  LUMINANCE = 1,
  RED_CHANNEL = 2,
  GREEN_CHANNEL = 3,
  BLUE_CHANNEL = 4,
  ALPHA_CHANNEL = 5,
  ALL_CHANNELS = 11
}

Public Member Functions

virtual SoType getTypeId () const
 SoVRRasterStackReader ()
virtual int setFilename (const SbString &filename)
SbBool setFilenameList (const SbStringList &filenameList)
SbBool setDirectory (const SbString &directory)
virtual ReadError getDataChar (SbBox3f &size, SoDataSet::DataType &type, SbVec3i32 &dim)
virtual void getSubSlice (const SbBox2i32 &subSlice, int sliceNumber, void *data)
void setSize (SbBox3f &size)
void setChannelSelection (ChannelSelection cs)
virtual SoVolumeReader::ReaderType getReaderType ()
virtual SbBool isRGBA () const
virtual SbBool isThreadSafe () const

Static Public Member Functions

static SoType getClassTypeId ()

Detailed Description

VolumeViz 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:

    Parameters {
      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
    ....
   

OR

    Parameters {
      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
    ....
   

Header Description

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.


Member Enumeration Documentation

Channel selection.

Enumerator:
MAX_CHANNEL 

Maximum of all channels.

LUMINANCE 

Luminance.

RED_CHANNEL 

Red channel.

GREEN_CHANNEL 

Green channel.

BLUE_CHANNEL 

Blue channel.

ALPHA_CHANNEL 

Alpha channel.

ALL_CHANNELS 

All channels combined.


Constructor & Destructor Documentation

SoVRRasterStackReader::SoVRRasterStackReader (  ) 

Constructor.


Member Function Documentation

static SoType SoVRRasterStackReader::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoVolumeReader.

virtual ReadError SoVRRasterStackReader::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 SoVRRasterStackReader::getReaderType (  )  [inline, virtual]

Returns the reader type.

Reimplemented from SoVolumeReader.

virtual void SoVRRasterStackReader::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 SoVRRasterStackReader::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Reimplemented from SoVolumeReader.

virtual SbBool SoVRRasterStackReader::isRGBA (  )  const [virtual]

Returns TRUE if the data set contains RGBA color values.

Reimplemented from SoVolumeReader.

virtual SbBool SoVRRasterStackReader::isThreadSafe (  )  const [virtual]

Return true as this reader is thread safe.

Reimplemented from SoVolumeReader.

void SoVRRasterStackReader::setChannelSelection ( ChannelSelection  cs  )  [inline]

Selects channels to be used for data rendering.

SbBool SoVRRasterStackReader::setDirectory ( const SbString 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

virtual int SoVRRasterStackReader::setFilename ( const SbString filename  )  [virtual]

Specifies the path of the descriptive (.lst) file.

Returns 0 for success. Any other return value indicates failure.

Reimplemented from SoVolumeReader.

SbBool SoVRRasterStackReader::setFilenameList ( const SbStringList filenameList  ) 

Specify a list of files to load.

All the specified files should be part of the same volume data set.

Returns:
true if successful.
Since Open Inventor 9.7

void SoVRRasterStackReader::setSize ( SbBox3f size  )  [inline]

Defines the bounding box size in physical units of the data set.


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

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/