SoVolumeWriter Class Reference

Large Data Management Abstract base class for volume data writer. More...

#include <LDM/writers/SoVolumeWriter.h>

Inheritance diagram for SoVolumeWriter:
SoFieldContainer SoBase SoRefCounter SoTypedObject SoVRLdmFileWriter SoVRMemoryWriter

List of all members.

Public Types

enum  WordFormat {
  WF_BIG_ENDIAN = 0,
  WF_LITTLE_ENDIAN = 1
}

Public Member Functions

virtual SoType getTypeId () const
virtual SbBool initialize ()
virtual SbBool closeAllHandles ()
virtual SbBool restoreAllHandles ()
virtual SbBool isDataConverted () const =0
virtual SbBool writeTile (const SoLDMTileID &tileId, SoBufferObject *buffer)
virtual SbBool writeSubSlice (int sliceIndex, const SbBox2i32 &subSlice, SoBufferObject *buffer)
virtual SbBool finish ()

Static Public Member Functions

static SoType getClassTypeId ()

Public Attributes

SoSFBox3f extent
SoSFVec3i32 dimension
SoSFEnum dataType
SoSFEnum wordFormat

Detailed Description

Large Data Management Abstract base class for volume data writer.

Base class used to write volume data. Data are generally organised by tiles (like in LDM) or by slices (like in DICOM).

The isDataConverted() method must be reimplemented in derived classes and return TRUE if the data is organized in tiles. In this case, the writeTile() method MUST be implemented and will be used to write data.

If isDataConverted() returns FALSE, the writeSubSlice() method MUST be implemented and will be used to write data.

EXAMPLE

SEE ALSO

SoVRLdmFileWriter, SoVRMemoryWriter

See related examples:

CustomLdmWriter


Member Enumeration Documentation

Endianess.

Big endian or little endian.

Enumerator:
WF_BIG_ENDIAN 
WF_LITTLE_ENDIAN 

Member Function Documentation

virtual SbBool SoVolumeWriter::closeAllHandles (  )  [virtual]

Close all ressources that are locked by the writer so that someone else can read or write to them.

For example, if the writer write to a file, this method must close the file so that someone else can re-open it in read mode.

Reimplemented in SoVRLdmFileWriter.

virtual SbBool SoVolumeWriter::finish (  )  [virtual]

Finish writing the file, free ressources, .

.. depending on kind of writer.

Reimplemented in SoVRLdmFileWriter.

static SoType SoVolumeWriter::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoFieldContainer.

Reimplemented in SoVRLdmFileWriter, and SoVRMemoryWriter.

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

Returns the type identifier for this specific instance.

Implements SoTypedObject.

Reimplemented in SoVRLdmFileWriter, and SoVRMemoryWriter.

virtual SbBool SoVolumeWriter::initialize (  )  [virtual]

Initialize writer.

Allocates memory and other resources depending on the kind of writer. By default do nothing.

Reimplemented in SoVRLdmFileWriter, and SoVRMemoryWriter.

virtual SbBool SoVolumeWriter::isDataConverted (  )  const [pure virtual]

Returns TRUE if the data is already organized in tiles for the LDM module.


In other words, all writers that directly support the writeTile() method should return TRUE from isDataConverted.

If TRUE is returned, VolumeViz will use the writeTile method and will not call writeSubVolume() or writeSubSlice().

Must be reimplemented in children classes.

Implemented in SoVRLdmFileWriter, and SoVRMemoryWriter.

virtual SbBool SoVolumeWriter::restoreAllHandles (  )  [virtual]

Restore ressources that was closed by closeAllHandles.

Reimplemented in SoVRLdmFileWriter.

virtual SbBool SoVolumeWriter::writeSubSlice ( int  sliceIndex,
const SbBox2i32 subSlice,
SoBufferObject buffer 
) [virtual]

Writes the data contained in the specified subslice.

This function must be called only if isDataConverted() return FALSE.

Must be reimplemented in children classes.

Reimplemented in SoVRMemoryWriter.

virtual SbBool SoVolumeWriter::writeTile ( const SoLDMTileID tileId,
SoBufferObject buffer 
) [virtual]

Given a tileID, writes a tile if the data is organized in tiles (see SoLDMTileID).


This function must be called only if isDataConverted() return TRUE.

Must be reimplemented in children classes.

Please refer to SoLDMTileID and SoLDMTopoOctree for relation between tileId and tile position.

Reimplemented in SoVRLdmFileWriter.


Member Data Documentation

Type of input data (that will be given in the writeXXX method) Use enum SoDataSet::DataType.

Default is UNSIGNED_BYTE.

Dimension of dataset, in voxels.

Default is empty.

Extent of dataset.

Default is (-1, -1, -1, 1, 1, 1)

Endianess of data.

Use enum WordFormat. Default is current machine endianess.


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

Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/