Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SoVolumeRenderingQuality.h
Go to the documentation of this file.
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2024 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : Benjamin GRANGE (Aug 2005)
22**=======================================================================*/
23
24
25#ifndef _SO_VOLUME_QUALITY_H_
26#define _SO_VOLUME_QUALITY_H_
27
28
29#include <Inventor/SbBasic.h>
38
39/*----------------------------------------------------------------------------*/
41class SoVertexShader;
43class SoVolumeShader;
45
320
322
323public:
326 {
332 LOW = 0,
333
340
347#ifndef HIDDEN_FROM_DOC
348 LAST_GRADIENT_QUALITY
349#endif
350 };
351
360
362 DEPTH = 1 << 1,
363
367 GRADIENT = 1 << 2
368 };
369
374
404
424
438
448
461
469
479
492
500
509
518
527
536
548
558
573
585
600
607
615
627
644
654
662
670
688
732
733#if 1 SoDEPRECATED
744
745#endif
747#if 1 SoDEPRECATED enum LightingModel
751 {
753 OPENGL
754 };
755SoDEPRECATED
766
767#endif
769#ifndef HIDDEN_FROM_DOC
770 private:
771
773 SoSFFloat AORadius;
775 SoSFFloat AONumSample;
777 SoSFFloat AOKernelSize;
779 SoSFBool AOUseNormal;
781 SoSFBool AOShowAO;
783 SoSFBool AOShowNormal;
784
785 void GLRender(SoGLRenderAction *action);
786 virtual void doAction(SoAction *action);
787 virtual void notify(SoNotList* list);
788
789 // Initializes the classes.
790 static void initClass();
791 static void exitClass();
792
794 GradientQuality getGradientMethod(SoState* state) const;
795
797 SbBool hasEdgeDetect2d(SoState* state) const;
798
800 SbBool hasAmbientOcclusion(SoState* state) const;
801
803 SbBool hasDeferredLighting(SoState* state) const;
804
806 SbBool hasCubicInterpolation(SoState* state) const;
807
809 SbBool hasBoundaryOpacity(SoState* state) const;
810
812 virtual void installTextures(SoGLRenderAction* action);
813
815 virtual SbBool isRaycastingEnabled(SoState* state) const;
816
818 virtual void allocateTextureUnit(SoGLRenderAction *action) const;
819
821 SbBool isVoxelizedRenderingEnabled(SoState* state) const;
822
824 virtual bool isInterpolationActive(SoGLRenderAction* action);
825
827 virtual bool isColorInterpolationEnabled(SoState* state);
828
830 bool isPreintegratedEnabled(SoState* state) const;
831
833 void setRemovePhysicalQuality( bool removePhysicalQuality );
834
836 void setRenderMode( SoVolumeRender::RenderMode renderMode ) { m_renderMode = renderMode; }
837private:
838
840
841#endif
842
843private:
844
845 static const float DEFAULT_INNER_EDGE_THRESHOLD;
846 static const float DEFAULT_OUTTER_EDGE_THRESHOLD;
847
849 void checkAndUpdateEdge2DSupport(SoGLRenderAction* action);
850
852 SbBool hasEdgeColoring(SoState* state) const;
853
858 void clampEdgeDetect2dFields();
859
860 SoNodeDependencies* m_transferFunctionCache;
861
865 SoRef<SoGroup> m_preIntegratedScene;
866 SoGroup* m_preIntegratedTexPlaceHolder;
867 SoTextureUnit* m_preIntegratedTexUnit;
868
870 bool m_removePhysicalQuality;
871
873 SoVolumeRender::RenderMode m_renderMode;
874};
875/*----------------------------------------------------------------------------*/
876
877#endif /*_SO_VOLUME_QUALITY_H_*/
878
879
#define SO_NODE_HEADER(className)
Definition SoSubNode.h:151
Abstract base class for all actions.
Definition SoAction.h:132
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Node that define...
Renders a scene graph using Open Inventor's Render Engine.
Base class for all group nodes.
Definition SoGroup.h:122
This class is a cache handler that can be used to monitor the modifications made to elements or field...
Smart pointer for any class inheriting SoRefCounter.
Definition SoRef.h:90
Single-value field containing a set of bit flags.
Field containing a single Boolean value.
Definition SoSFBool.h:79
Field containing an RGB color.
Definition SoSFColor.h:82
Field containing an enumerated value.
Definition SoSFEnum.h:89
Field containing a floating-point value.
Definition SoSFFloat.h:78
Traversal state.
Definition SoState.h:74
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Node that specif...
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Describe...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Node that define...
RenderMode
Composition mode.
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Volume rendering qual...
SoSFColor voxelOutlineColor
When voxelOutline is TRUE, this value specifies the voxel outline color.
SoSFBool edgeColoring
Enable edge coloring.
SoSFBool preIntegrated
Enable pre-integrated volume rendering.
SoSFBool jittering
Enable jittering.
SoSFBool voxelizedRendering
If true, SoVolumeRender displays voxels as individual cubes.
SoSFFloat voxelOutlineThreshold
When voxelOutline is TRUE, this threshold specifies the minimum size of a voxel, in screen pixels,...
SoSFFloat edgeThreshold
If this value is low, more edges will be detected.
SoSFFloat unnormalizedGradientExponent
When unnormalizedGradientExponent is not 0, surfaces with high gradients will be more lighted than su...
SoSFBool ambientOcclusion
If true, apply an ambient occlusion effect (default is FALSE).
SoSFBool boundaryOpacity
Enable boundary opacity.
SoSFFloat edgeDetect2DOuterThreshold
Increase this value to decrease noise on edges in the volume.
SoDEPRECATED SoSFBool cubicInterpolation
Enable cubic interpolation of data values.
SoSFBool lighting
Enable gradient based lighting (computed on the GPU).
SoDEPRECATED SoSFEnum lightingModel
Sets the lighting model.
SoSFBool edgeDetect2D
Enable 2D edge detection.
SoSFBitMask edgeDetect2DMethod
Method used for 2D edge detection.
SoSFFloat boundaryOpacityThreshold
Applies when boundaryOpacity is TRUE.
SoSFFloat segmentedInterpolationThreshold
Defines the iso distance used when segmentedInterpolation is true.
SoSFColor edgeColor
Color used to draw edges when edgeColoring or edgeDetect2D is TRUE.
SoVolumeRenderingQuality()
Constructor.
SoSFFloat gradientThreshold
Ignore all gradients with a magnitude less than the specified threshold.
SoSFFloat boundaryOpacityIntensity
Applies when boundaryOpacity is TRUE.
SoSFBool deferredLighting
Enable screen space lighting (computed on the GPU).
SoSFFloat edgeDetect2DInnerThreshold
Increase this value to decrease noise on silhouette edges.
SoSFFloat surfaceScalarExponent
If this field is greater than or equal to 1, a surface with a small gradient will be less lighted tha...
SoSFFloat voxelOutlineWidth
When voxelOutline is TRUE, this value specifies the voxel outline width in pixels.
SoSFBool colorInterpolation
Controls interpolation of data values used for color lookup.
SoSFBool voxelOutline
If true, draw the outline of voxels (default is false).
SoSFBool segmentedInterpolation
Allow correct interpolation when rendering segmented data.
GradientQuality
Gradient Quality mode.
@ MEDIUM
Use the central difference technique to compute the gradient.
@ HIGH
Use a Sobel filter to compute the gradient.
@ LOW
Use the forward difference technique to compute the gradient.
EdgeDetect2DMethod
The edge detection algorithm used when edgeDetect2D is TRUE, can work on the image luminance,...
@ DEPTH
Edge detection will use the image's depth buffer.
@ LUMINANCE
Edge detection will use the image's luminance.
@ GRADIENT
Edge detection will use the volume's gradient.
SoSFEnum gradientQuality
Specifies the algorithm used to compute gradients, for example, normals for lighting.
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Shader node for volum...
int SbBool
Boolean type.
Definition SbBase.h:87
void notify(SoNotList *list)