Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SoOffscreenVolumeRender.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-2021 BY FEI S.A.S, ***
17*** BORDEAUX, FRANCE ***
18*** ALL RIGHTS RESERVED ***
19=================================================================================*/
20#ifndef _SO_OFFSCREEN_VOLUME_RENDER_H_
21#define _SO_OFFSCREEN_VOLUME_RENDER_H_
22
23#include <Inventor/SbPImpl.h>
25
33
35
36class SoBufferObject;
37class SoCamera;
38class SoFrameBufferObject;
39class SoSceneManager;
40
42
43
93{
95
96 SO_PIMPL_PUBLIC_HEADER( SoOffscreenVolumeRender )
97
98public:
99
102
105
108
111
116
121
124 {
128 RGBA
129 };
130
136
142
143
147 SbBox3d ijkToXyzBox( const SbBox3i32& ijkBox );
148
190
199
206 virtual SbBool getNextSubBox( SbBox3i32& box ) = 0;
207
214 virtual void boxComputed( SoGLRenderAction* action, SoBufferObject* data, const SbBox3i32& box ) = 0;
215
216private:
217
219 virtual void GLRender( SoGLRenderAction* action );
220
221private:
222
230 SoSFPath volumerenderPath;
231
232 // Internal:
233 static void initClass();
234 static void exitClass();
235
236 SbBox3f getBoundingBox( SoAction* action );
237
238 void setSliceNumber( SoState* state, int slice );
239
244 bool needClearTarget( SoState* state, int slice );
245
246 void beginOffscreenRendering( SoState* state );
247 void endOffscreenRendering( SoState* state );
248 virtual void notify( SoNotList* list );
249
250 // check that the not is OK to do SoVolumeRender offscreen operation
251 bool isReady() const;
252
253private:
255 virtual ~SoOffscreenVolumeRender();
256
259 SbBox3i32 m_currentSubBox;
260
263 int m_currentSliceNumberInSubBox;
264
268 int m_currentSubBoxNumber;
269
270private :
271
272 void commonConstructor();
273
274};
275
276#endif //_SO_OFFSCREEN_VOLUME_RENDER_H_
277
278
#define SoEXTENDER_Documented
SO_PIMPL_PUBLIC_DECLARATION(SoFileDataAdapter)
#define SO_NODE_ABSTRACT_HEADER(className)
Definition SoSubNode.h:118
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> 3D box class.
Definition SbBox.h:972
3D box class.
Definition SbBox.h:649
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> 3D box class.
Definition SbBox.h:96
3D vector class.
Definition SbVec.h:1517
Abstract base class for all actions.
Definition SoAction.h:132
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
Abstract base class for camera nodes.
Definition SoCamera.h:188
Renders a scene graph using Open Inventor's Render Engine.
Abstract base class for all database nodes.
Definition SoNode.h:145
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Extract data from an ...
SoSFEnum components
Components to get back from the offscreen render.
SoSFBool trigger
Setting this field to TRUE will start the off-screen rendering process.
SoSFVec3i32 boxSize
Resolution of the output data in the off-screen box.
SbVec3i32 getMaxBoxSize(SoState *state=NULL)
Returns the maximum boxSize that can be extract in one boxComputed for the current state.
bool synchronousExtraction(SoSceneManager *sceneManager)
Does extraction synchronously, whereas using trigger field will execute extraction on next redraw.
SoSFFloat opacityThreshold
During extraction, voxels with an opacity less than the specified value will be ignored Default is 0.
SoSFNode volumerenderSceneGraph
Head of the scene graph that contains one or multiple VolumeRender node to render in 3D off-screen cu...
SbBox3d ijkToXyzBox(const SbBox3i32 &ijkBox)
Convert ijk box coordinates returned by boxComputed method to the bboxSceneGraph space.
SoSFMatrix dataSpaceMatrix
This transformation is applied on the volume render texture coordinate during the extraction.
SoOffscreenVolumeRender()
Default constructor.
SoSFNode bboxSceneGraph
Head of the scene graph that defines the 3D off-screen scene cube to consider in world coordinates.
Field containing a single Boolean value.
Definition SoSFBool.h:79
Field containing an enumerated value.
Definition SoSFEnum.h:89
Field containing a floating-point value.
Definition SoSFFloat.h:78
Field containing a 4x4 matrix.
Definition SoSFMatrix.h:86
Field containing a a node.
Definition SoSFNode.h:97
Field containing an SoPath.
Definition SoSFPath.h:89
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Field containing...
Definition SoSFVec3i32.h:48
Manages scene graph rendering and event handling.
Traversal state.
Definition SoState.h:74
int SbBool
Boolean type.
Definition SbBase.h:87
void notify(SoNotList *list)