23#ifndef _SO_VOLUME_RENDER_
24#define _SO_VOLUME_RENDER_
26#include <Inventor/caches/SoCache.h>
27#include <Inventor/nodes/SoShape.h>
28#include <Inventor/nodes/SoShaderParameter.h>
29#include <Inventor/nodes/SoGroup.h>
30#include <Inventor/nodes/SoTextureUnit.h>
31#include <Inventor/fields/SoSFBool.h>
32#include <Inventor/fields/SoSFBitMask.h>
33#include <Inventor/fields/SoSFEnum.h>
34#include <Inventor/fields/SoSFFloat.h>
35#include <Inventor/fields/SoSFVec3f.h>
36#include <Inventor/fields/SoSFInt32.h>
37#include <Inventor/SbBox.h>
39#include <Inventor/STL/vector>
40#include <Inventor/STL/map>
42#include <VolumeViz/nodes/SoVolumeShape.h>
44#include <VolumeViz/LDM/SoLDMTileID.h>
47class SoFrameBufferObject;
50class SoVRImageSpaceEffects;
52class SoLdmSubDivisionIsosurfacePolicy;
53class SoLdmSubDivisionPolicy;
54class SoLdmSubDivisionTransferFunctionPolicy;
58class SoVolumeRenderInterface;
59class SoVolumeRenderRaycast;
60class SoVolumeRenderLdm;
61class SoVolumeRenderLdm;
62class SoVolumeRenderPaging;
67class SoVolumeOffscreenImpl;
70#pragma warning( push )
71#pragma warning(disable:4251)
1257 static void initClass();
1260 static void exitClass();
1270 SoVolumeOffscreenImpl* getVolumeOffscreenImpl()
const;
1280 bool needOivDepth(
SoState* state);
1286 bool needRttColor(
SoState* state)
const;
1290 bool needRttEdgeDetect(
SoState* state)
const;
1294 bool needRttBoundaryDepth(
SoState* state)
const;
1298 bool needRttBoundaryColor(
SoState* state)
const;
1304 void removeDsFromRegList(
SoDataSet* pDs);
1307 virtual void notify(SoNotList *list);
1312 void onUserInteractionChange(
SoState*state,
bool stopMoving);
1319 void createVolumeRender(
SoState* state );
1321 void generatePrimitives(
SoAction *action);
1325 void setupVolumeRenderInterface(
SoState* state);
1348 void setupFrontToBackGlState(
SoState* state);
1380 bool canSubdivideTiles(
SoState* state);
1383 bool isRaycastingEnabled(
SoState* state)
const;
1386 void *m_abortCBuserData;
1397 void initInternalShaders();
1404 SoVRImageSpaceEffects* m_imageSpaceEffects;
1416 int m_lowScreenResScale;
1419 SoGLProgramGLSL* m_binaryOpacityComposeShader;
1428 void deleteShadersFboTextures();
1433 void updateLowResScale(
SoState* state );
1446 bool m_useLowResMove;
1449 bool m_useLowNumSliceMove;
1453 SoVolumeRenderInterface* m_vri;
1455 bool m_frontToBackComposition;
1461 static void volDataDeleteCB(
void* data,
SoSensor *sensor);
1464 int m_prevRegisteredCtxId;
1466 SoVolumeStateVr* m_vs;
1468 SoVolumeOffscreenImpl* m_volumeOffscreenImpl;
1471 std::map<SoDataSet*, SoNodeSensor*> m_mapDsSensor;
1484#pragma warning( pop )
Base class for coordinate projection classes.
Abstract base class for all actions.
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Data set...
Base class for describing detail information about a shape node.
Renders a scene graph using Open Inventor's Render Engine.
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Tile ID
friend class SoLdmValuationAction
Multiple-value field containing any number of int32_t integers.
Sensor class that can be attached to Open Inventor nodes.
Represents point on surface of picked object.
Represents a vertex of a generated primitive.
Intersects objects with a ray cast into scene.
Smart pointer for any class inheriting SoRefCounter.
Single-value field containing a set of bit flags.
Field containing a single Boolean value.
Field containing an enumerated value.
Field containing a floating-point value.
Field containing a int32_t integer.
Field containing a three-dimensional vector.
Abstract base class for Open Inventor sensors.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Uniform shader p...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Shader program p...
Groups multiple volumes to be volume rendered in the same scene.
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Isosurface property n...
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Stores detail informa...
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Renders data volumes ...
SoSFEnum renderMode
Specifies how the voxels along each sampling ray are combined to form the final image.
SoSFInt32 numSlices
Specifies the number of samples along each ray.
SoVolumeRender()
Constructor.
SoSFBool subdivideTile
If true, LDM tiles will be subdivided for rendering.
NumSlicesControl
Number of samples control mode.
@ MANUAL
Use the number of samples specified by the numSlices field.
@ MAIN_AXIS
Use a number of samples computed as follows: n = complexity * 2 * volumeDataDimension[mainVisibl...
@ AUTOMATIC
(Recommended) Use a number of samples computed as follows: If numSlices is greater than zero,...
SoSFEnum samplingAlignment
Specifies which technique to use to align rayCast samples.
friend class SoVolumeRenderLdm
AbortCode
Abort code for callback.
@ SKIP
The current slice is not drawn.
@ ABORT
The render action of the SoVolumeRender node is aborted.
@ CONTINUE
Continue rendering as usual.
SoDEPRECATED SoSFBool lighting
Indicates if lighting is required.
SoSFBool fixedNumSlicesInRoi
When this field is set to FALSE (the default), the number of samples set by numSlices is the number o...
SoDEPRECATED SoSFFloat lightIntensity
Light intensity in the range [0-1].
SoSFFloat opacityThreshold
Specifies a threshold opacity (alpha) value that defines voxels considered to be "solid" (non-transpa...
SoDEPRECATED SoSFBool viewAlignedSlices
Indicates if samples should be computed in a view-aligned manner.
SamplingAlignment
Sampling alignment.
@ VIEW_ALIGNED
Samples are located on planes perpendicular to the view direction.
@ BOUNDARY_ALIGNED
Samples are located on shells aligned with the volume's internal "boundary".
@ DATA_ALIGNED
Samples are located on planes perpendicular to one axis of the volume.
@ SMOOTH_BOUNDARY_ALIGNED
Similar to BOUNDARY_ALIGNED but uses a cubic interpolation to compute the boundary,...
SoSFBitMask lowResMode
Sets the method to use when moving in low resolution.
SoSFBool opacityCorrection
Controls whether opacity correction is done.
SoSFEnum numSlicesControl
Controls how the number of samples along each ray is determined.
LowResMode
Method to use when moving in low resolution.
@ DECREASE_SCREEN_RESOLUTION
Downscale the screen resolution of the volume when moving by the factor defined in lowScreenResolutio...
@ DECREASE_NONE
No low resolution mode when moving.
@ DECREASE_SLICES
Decrease the number of samples according to SoComplexity::value when moving.
SoSFInt32 projectedTileSubdivision
When doing volume projection (see SoProjection), only the geometry (corner vertices) of the LDM tiles...
void setAbortCallback(SoVolumeRenderAbortCB *func, void *userData=NULL)
Sets callback to call during texture map rendering to test for an abort condition.
friend class SoVolumeRenderRaycast
RenderMode
Composition mode.
@ MAX_INTENSITY_PROJECTION
Maximum intensity projection (MIP).
@ MAX_INTENSITY_DIFFERENCE_ACCUMULATION
Maximum Intensity Difference Accumulation (MIDA).
@ INTENSITY_DIFFERENCE_ACCUMULATION
Intensity Difference Accumulation.
@ MIN_INTENSITY_PROJECTION
Minimum intensity projection (MinIP).
@ AVERAGE_INTENSITY_PROJECTION
Average Intensity projection (AIP).
@ VOLUME_RENDERING
Alpha compositing (Default).
@ MAX_GRADIENT_DIFFERENCE_ACCUMULATION
Maximum Gradient Difference Accumulation.
@ SUM_INTENSITY_PROJECTION
Ray sum intensity projection (RSP).
@ GRADIENT_DIFFERENCE_ACCUMULATION
Gradient Difference Accumulation.
SoSFInt32 lowScreenResolutionScale
If lowResMode is DECREASE_SCREEN_RESOLUTION, render the volume at a lower screen resolution.
AbortCode SoVolumeRenderAbortCB(int totalElems, int thisElem, void *userData)
SoDEPRECATED SoSFVec3f lightDirection
Light direction (relative to the volume).
SoMFInt32 dataSetIds
Specifies the list of volumes on which volume rendering is applied.
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Volume rendering qual...
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Abstract base class f...
std::pair< SoDataSet *, int > DataSetIdPair
Pair containing an SoDataset and its dataSetId.
std::vector< SoDataSet * > DsVector
Vector of SoDataSet.