Coin Logo Coin3D is Free Software,
published under the BSD 3-clause license.
https://bitbucket.org/Coin3D/
http://www.kongsberg.com/kogt/
SoObliqueSlice Class Reference

Render a slice of the volume data, with any orientation. More...

#include <VolumeViz/nodes/SoObliqueSlice.h>

Inherits SoShape.

Public Types

enum  Interpolation { NEAREST, LINEAR }
 
enum  AlphaUse { ALPHA_AS_IS, ALPHA_OPAQUE, ALPHA_BINARY }
 

Static Public Member Functions

static void initClass (void)
 

Public Attributes

SoSFPlane plane
 
SoSFEnum interpolation
 
SoSFEnum alphaUse
 
SoSFNode alternateRep
 

Protected Member Functions

virtual void GLRender (SoGLRenderAction *action)
 
virtual void rayPick (SoRayPickAction *action)
 
virtual void generatePrimitives (SoAction *action)
 
virtual void computeBBox (SoAction *action, SbBox3f &box, SbVec3f &center)
 
virtual void write (SoWriteAction *action)
 
virtual SbBool readInstance (SoInput *in, unsigned short flags)
 

Friends

class SoObliqueSliceP
 

Detailed Description

Render a slice of the volume data, with any orientation.

Insert a node of this type after an SoVolumeData node in the scene graph to render a single slice from the full volume data set. The slice is specified as a plane with an orientation and position within the volume.

Here is a simple example, in the form of an iv-file:

#Inventor V2.1 ascii

SoVolumeData { fileName "ENGINE.VOL" }
 
Separator {
  SoTransferFunction { }  
  DEF clipper ClipPlaneManip { }
  SoVolumeRender { }   
}

Separator {
  SoTransferFunction { predefColorMap GLOW }  
  SoObliqueSlice {
    interpolation LINEAR        
    alphaUse ALPHA_AS_IS
    plane = USE clipper . plane
  }
}

Please note that SoObliqueSlice will not work with older OpenGL drivers as they usually lack 3D-texture support. OpenGL drivers of version 1.2 and onwards supports 3D-texturing, as does older OpenGL drivers with the GL_EXT_texture3D extension. If none of these are available, a warning message will be printed using Coin's SoDebugError::postWarning().

See also
SoVolumeRender, SoOrthoSlice
SoVolumeTriangleStripSet, SoVolumeIndexedTriangleStripSet,
SoVolumeIndexedFaceSet, SoVolumeFaceSet
Since
SIM Voleon 2.0

Member Enumeration Documentation

◆ Interpolation

Enumeration of available types of voxel colors interpolation.

Enumerator
NEAREST 

For "in between" pixels of the screen rasterization, pick the color of the nearest voxel. Will give sharp edges and a distinct blocky look.

LINEAR 

For "in between" pixels of the screen rasterization, interpolate by averaging the colors of several of the nearest voxels. Will give a smoother appearance, but sacrifies some "correctness" for appearance.

◆ AlphaUse

Enumerator
ALPHA_AS_IS 

The alpha channel is rendered 'as-is'.

ALPHA_OPAQUE 

The alpha channel is ignored making the slice opaque.

ALPHA_BINARY 

All alpha values not equal to 0 is threated as value 1.0f.

Member Data Documentation

◆ plane

SoSFPlane SoObliqueSlice::plane

The plane defining the slice.

Default value is an XY plane.

◆ interpolation

SoSFEnum SoObliqueSlice::interpolation

How to interpolate color values when rendering "in between" voxels. See SoObliqueSlice::Interpolation.

Default value is SoObliqueSlice::LINEAR.

◆ alphaUse

SoSFEnum SoObliqueSlice::alphaUse

How the alpha channel should be threated during rendering. See SoObliqueSlice::AlphaUse.

Default value is SoObliqueSlice::ALPHA_AS_IS

◆ alternateRep

SoSFNode SoObliqueSlice::alternateRep

NOTE: support for this field not yet implemented in SIM Voleon.

Since
SIM Voleon 2.0

The documentation for this class was generated from the following files:
SoVolumeRender::MAX_INTENSITY
@ MAX_INTENSITY
Definition: SoVolumeRender.h:57
SoVolumeRender::numSlices
SoSFInt32 numSlices
Definition: SoVolumeRender.h:72
SoVRVolFileReader::setUserData
void setUserData(void *data)
Definition: VRVolFileReader.cpp:282
SoVolumeRender::setAbortCallback
void setAbortCallback(SoVolumeRenderAbortCB *func, void *userdata=NULL)
Definition: VolumeRender.cpp:777
SoTransferFunction::predefColorMap
SoSFEnum predefColorMap
Definition: SoTransferFunction.h:73
SoVolumeData
The main interface for setting up volume data sets.
Definition: SoVolumeData.h:54
SoVolumeData::setVolumeData
void setVolumeData(const SbVec3s &dimension, void *data, SoVolumeData::DataType type=SoVolumeData::UNSIGNED_BYTE, int significantbits=0)
Definition: VolumeData.cpp:410
SoTransferFunction
Contains the transfer function definition.
Definition: SoTransferFunction.h:44
SoVolumeData::setVolumeSize
void setVolumeSize(const SbBox3f &size)
Definition: VolumeData.cpp:335
SoVolumeDetail::getProfileObjectPos
void getProfileObjectPos(SbVec3f profile[2]) const
Definition: VolumeDetail.cpp:152
SoVolumeRender
Render the full volume.
Definition: SoVolumeRender.h:47
SoVolumeRender::AUTOMATIC
@ AUTOMATIC
Definition: SoVolumeRender.h:58
SoVolumeRendering::getDelayedRendering
static SbBool getDelayedRendering(void)
Definition: VolumeRendering.cpp:529
SoVolumeRender::numSlicesControl
SoSFEnum numSlicesControl
Definition: SoVolumeRender.h:71
SoTransferFunction::colorMapType
SoSFEnum colorMapType
Definition: SoTransferFunction.h:74
SoVolumeData::useSharedPalettedTexture
SoSFBool useSharedPalettedTexture
Definition: SoVolumeData.h:81
SoTransferFunction::GRAY
@ GRAY
Definition: SoTransferFunction.h:56
SoVolumeRender::composition
SoSFEnum composition
Definition: SoVolumeRender.h:67
SoVolumeRendering::init
static void init(void)
Definition: VolumeRendering.cpp:324
SoVolumeRender::SUM_INTENSITY
@ SUM_INTENSITY
Definition: SoVolumeRender.h:57
SoVolumeRender::ALL
@ ALL
Definition: SoVolumeRender.h:58
SoVolumeData::getVoxelValue
uint32_t getVoxelValue(const SbVec3s &voxelpos) const
Definition: VolumeData.cpp:486
SoTransferFunction::BLUE_RED
@ BLUE_RED
Definition: SoTransferFunction.h:61
SoVolumeDetail
The SoVolumeDetail stores ray intersection information through a volume.
Definition: SoVolumeDetail.h:45
SoVolumeData::useCompressedTexture
SoSFBool useCompressedTexture
Definition: SoVolumeData.h:82
SoVolumeRender::ALPHA_BLENDING
@ ALPHA_BLENDING
Definition: SoVolumeRender.h:57
SoVolumeRendering::setWriteAlternateRep
static void setWriteAlternateRep(SbBool flag)
Definition: VolumeRendering.cpp:453
SoVRVolFileReader::getDataChar
void getDataChar(SbBox3f &size, SoVolumeData::DataType &type, SbVec3s &dim)
Definition: VRVolFileReader.cpp:211
SoVolumeTriangleStripSet
Render a set of trianglestrips within the volume.
Definition: SoVolumeTriangleStripSet.h:44
SoVolumeReader::getDataChar
virtual void getDataChar(SbBox3f &size, SoVolumeData::DataType &type, SbVec3s &dim)=0
SoTransferFunction::RGBA
@ RGBA
Definition: SoTransferFunction.h:68
SoVolumeDetail::getProfileDataPos
int getProfileDataPos(SbVec3s profile[2]=0) const
Definition: VolumeDetail.cpp:174
SoVolumeRendering::getWriteAlternateRep
static SbBool getWriteAlternateRep(void)
Definition: VolumeRendering.cpp:483
SoVolumeDetail::setDetails
void setDetails(const SbVec3f raystart, const SbVec3f rayend, SoState *state, SoNode *caller)
Definition: VolumeDetail.cpp:262
SoTransferFunction::NONE
@ NONE
Definition: SoTransferFunction.h:54
SoVolumeRender::Composition
Composition
Definition: SoVolumeRender.h:57
SoVolumeSkin
Render just the six sides of the volume data.
Definition: SoVolumeSkin.h:40
SoTransferFunction::ColorMapType
ColorMapType
Definition: SoTransferFunction.h:65
SoVolumeSkinDetail
The SoVolumeSkinDetail stores ray intersection information through a volume.
Definition: SoVolumeSkinDetail.h:45
SoTransferFunction::shift
SoSFInt32 shift
Definition: SoTransferFunction.h:71
SoVolumeData::usePalettedTexture
SoSFBool usePalettedTexture
Definition: SoVolumeData.h:80
SoTransferFunction::LUM_ALPHA
@ LUM_ALPHA
Definition: SoTransferFunction.h:67
SoTransferFunction::colorMap
SoMFFloat colorMap
Definition: SoTransferFunction.h:75
SoVolumeRendering::setDelayedRendering
static void setDelayedRendering(SbBool flag)
Definition: VolumeRendering.cpp:510
SoVRVolFileReader::getSubSlice
virtual void getSubSlice(SbBox2s &subslice, int slicenumber, void *data)
Definition: VRVolFileReader.cpp:244
SoVolumeDetail::getFirstNonTransparentValue
SbBool getFirstNonTransparentValue(unsigned int *value, SbVec3s *pos=0, SbVec3f *objpos=0, SbBool flag=FALSE) const
Definition: VolumeDetail.cpp:235
SoVolumeRendering::setReadAlternateRep
static void setReadAlternateRep(SbBool flag)
Definition: VolumeRendering.cpp:427
SoVolumeRender::SoVolumeRenderAbortCB
AbortCode SoVolumeRenderAbortCB(int totalslices, int thisslice, void *userdata)
Definition: SoVolumeRender.h:61
SoVolumeReader
Abstract superclass for all volume data reader classes.
Definition: SoVolumeReader.h:43
SoVolumeDetail::getProfileValue
unsigned int getProfileValue(int index, SbVec3s *pos=0, SbVec3f *objpos=0, SbBool flag=FALSE) const
Definition: VolumeDetail.cpp:203
SoVolumeRendering::initClass
static void initClass(void)
Definition: VolumeRendering.cpp:370
SoTransferFunction::STANDARD
@ STANDARD
Definition: SoTransferFunction.h:59
SoVolumeRendering::getReadAlternateRep
static SbBool getReadAlternateRep(void)
Definition: VolumeRendering.cpp:471
SoVolumeFaceSet
Render a set of faces within the volume.
Definition: SoVolumeFaceSet.h:44
SoTransferFunction::SEISMIC
@ SEISMIC
Definition: SoTransferFunction.h:62
SoTransferFunction::PHYSICS
@ PHYSICS
Definition: SoTransferFunction.h:58
SoVolumeData::getVolumeSize
SbBox3f getVolumeSize(void) const
Definition: VolumeData.cpp:350
SoVolumeData::getPageSize
const SbVec3s & getPageSize(void) const
Definition: VolumeData.cpp:580
SoVolumeData::setTexMemorySize
void setTexMemorySize(int megatexels)
Definition: VolumeData.cpp:659
SoVRVolFileReader
Loader for files in the VOL data format.
Definition: SoVRVolFileReader.h:39
SoVolumeData::setPageSize
void setPageSize(int size)
Definition: VolumeData.cpp:536
SoVolumeRender::NEAREST
@ NEAREST
Definition: SoVolumeRender.h:56
SoTransferFunction::ALPHA
@ ALPHA
Definition: SoTransferFunction.h:66
SoTransferFunction::GLOW
@ GLOW
Definition: SoTransferFunction.h:60
SoTransferFunction::GREY
@ GREY
Definition: SoTransferFunction.h:55
SoTransferFunction::PredefColorMap
PredefColorMap
Definition: SoTransferFunction.h:53
SoVolumeData::getTexMemorySize
int getTexMemorySize(void) const
Definition: VolumeData.cpp:689
SoVolumeData::loadRegions
void loadRegions(const SbBox3s *region, int num, SoState *state, SoTransferFunction *node)
Definition: VolumeData.cpp:812
SoVolumeRender::LINEAR
@ LINEAR
Definition: SoVolumeRender.h:56
SoVolumeRender::MANUAL
@ MANUAL
Definition: SoVolumeRender.h:58
SoVolumeIndexedTriangleStripSet
Render a set of trianglestrips within the volume.
Definition: SoVolumeIndexedTriangleStripSet.h:44
SoTransferFunction::TEMPERATURE
@ TEMPERATURE
Definition: SoTransferFunction.h:57
SoVolumeRender::NumSlicesControl
NumSlicesControl
Definition: SoVolumeRender.h:58
SoVolumeIndexedFaceSet
Render a set of faces within the volume.
Definition: SoVolumeIndexedFaceSet.h:44
SoVolumeData::getHistogram
SbBool getHistogram(int &length, int *&histogram)
Definition: VolumeData.cpp:726
SoVolumeData::getVolumeData
SbBool getVolumeData(SbVec3s &dimension, void *&data, SoVolumeData::DataType &type, int *significantbits=NULL) const
Definition: VolumeData.cpp:457
SoVolumeRender::interpolation
SoSFEnum interpolation
Definition: SoVolumeRender.h:66
SoVolumeRender::rayPick
virtual void rayPick(SoRayPickAction *action)
Definition: VolumeRender.cpp:693
SoOrthoSlice
Render one orthogonal slice of the volume data.
Definition: SoOrthoSlice.h:46
SoTransferFunction::offset
SoSFInt32 offset
Definition: SoTransferFunction.h:72
SoTransferFunction::reMap
void reMap(int low, int high)
Definition: TransferFunction.cpp:352
SoVolumeRendering
Abstract base class for all nodes related to volume rendering.
Definition: SoVolumeRendering.h:41
SoVolumeRenderDetail
The SoVolumeRenderDetail stores ray intersection information through a volume.
Definition: SoVolumeRenderDetail.h:45
SoVolumeRender::Interpolation
Interpolation
Definition: SoVolumeRender.h:56