Open Inventor Release 2024.1.0
 
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
327
329
330public:
333 {
339 LOW = 0,
340
347
354#ifndef HIDDEN_FROM_DOC
355 LAST_GRADIENT_QUALITY
356#endif
357 };
358
367
369 DEPTH = 1 << 1,
370
374 GRADIENT = 1 << 2
375 };
376
381
411
431
445
455
468
476
486
499
507
516
525
534
543
555
565
580
592
607
614
622
634
651
661
669
677
695
739
740#if 1 SoDEPRECATED
751
752#endif
754#if 1 SoDEPRECATED enum LightingModel
758 {
760 OPENGL
761 };
762SoDEPRECATED
773
774#endif
776#ifndef HIDDEN_FROM_DOC
777 private:
778
780 SoSFFloat AORadius;
782 SoSFFloat AONumSample;
784 SoSFFloat AOKernelSize;
786 SoSFBool AOUseNormal;
788 SoSFBool AOShowAO;
790 SoSFBool AOShowNormal;
791
792 void GLRender(SoGLRenderAction *action);
793 virtual void doAction(SoAction *action);
794 virtual void notify(SoNotList* list);
795
796 // Initializes the classes.
797 static void initClass();
798 static void exitClass();
799
801 GradientQuality getGradientMethod(SoState* state) const;
802
804 SbBool hasEdgeDetect2d(SoState* state) const;
805
807 SbBool hasAmbientOcclusion(SoState* state) const;
808
810 SbBool hasDeferredLighting(SoState* state) const;
811
813 SbBool hasCubicInterpolation(SoState* state) const;
814
816 SbBool hasBoundaryOpacity(SoState* state) const;
817
819 virtual void installTextures(SoGLRenderAction* action);
820
822 virtual SbBool isRaycastingEnabled(SoState* state) const;
823
825 virtual void allocateTextureUnit(SoGLRenderAction *action) const;
826
828 SbBool isVoxelizedRenderingEnabled(SoState* state) const;
829
831 virtual bool isInterpolationActive(SoGLRenderAction* action);
832
834 virtual bool isColorInterpolationEnabled(SoState* state);
835
837 bool isPreintegratedEnabled(SoState* state) const;
838
840 void setRemovePhysicalQuality( bool removePhysicalQuality );
841
843 void setRenderMode( SoVolumeRender::RenderMode renderMode ) { m_renderMode = renderMode; }
844private:
845
847
848#endif
849
850private:
851
852 static const float DEFAULT_INNER_EDGE_THRESHOLD;
853 static const float DEFAULT_OUTTER_EDGE_THRESHOLD;
854
856 void checkAndUpdateEdge2DSupport(SoGLRenderAction* action);
857
859 SbBool hasEdgeColoring(SoState* state) const;
860
865 void clampEdgeDetect2dFields();
866
867 SoNodeDependencies* m_transferFunctionCache;
868
872 SoRef<SoGroup> m_preIntegratedScene;
873 SoGroup* m_preIntegratedTexPlaceHolder;
874 SoTextureUnit* m_preIntegratedTexUnit;
875
877 bool m_removePhysicalQuality;
878
880 SoVolumeRender::RenderMode m_renderMode;
881};
882/*----------------------------------------------------------------------------*/
883
884#endif /*_SO_VOLUME_QUALITY_H_*/
885
886
#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)