Open Inventor Release 2024.1.2
 
Loading...
Searching...
No Matches
SoROI.h
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-2022 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : P. ESTRADE (Mar 2000)
22**=======================================================================*/
23#ifndef _SO_ROI_
24#define _SO_ROI_
25
26#include <Inventor/nodes/SoNode.h>
27#include <Inventor/fields/SoSFInt32.h>
28#include <Inventor/fields/SoSFBox3i32.h>
29#include <Inventor/fields/SoSFBitMask.h>
30#include <Inventor/fields/SoSFBool.h>
31#include <Inventor/sensors/SoNodeSensor.h>
32
33
36class SoWriteAction;
37
320class SoROI : public SoNode {
321 SO_NODE_HEADER( SoROI );
322
323 public:
336
344
350
402
408
416
421
422 private:
424 virtual void doAction( SoAction *action );
426 virtual void callback( SoCallbackAction *action );
428 virtual void GLRender( SoGLRenderAction *action );
430 virtual void getBoundingBox(SoGetBoundingBoxAction *action);
432 virtual void pick(SoPickAction *action) ;
434 virtual void write(SoWriteAction *action);
435
437 virtual SoNode* getAlternateRep( SoAction* action );
438
439 //------------------------------------------------------------------------------
440
441 private:
442 static void initClass();
443 static void exitClass();
444
451 int getVisibleBoxes(SbBox3i32* &boxes, const SbVec3i32 &dim);
452
458 void getVisibleBoundingBox(SbBox3i32& box, const SbVec3i32 &dim);
459
460 private:
461 // Destructor
462 virtual ~SoROI();
463
464 private:
465 SoNodeSensor *m_FiedsNS;
466 int m_NumVisBoxes;
467 SbBox3i32 *m_VisBoxes;
468 SbVec3i32 m_dim;
469 unsigned int getVisibleParts();
470 static void fieldsChangedCB(void *, SoSensor *);
471
472};
473//--------------------------------------------------------------------------------
474
475#endif // _SO_ROI_
476
477
<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
Performs a generic traversal of a scene graph or path.
Renders a scene graph using Open Inventor's Render Engine.
Computes bounding box of a scene.
Abstract base class for all database nodes.
Definition SoNode.h:145
Sensor class that can be attached to Open Inventor nodes.
Abstract base class for picking objects in a scene.
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Region o...
Definition SoROI.h:320
SoSFBitMask flags
Specifies how the bounds of the box are used.
Definition SoROI.h:349
SoSFBox3i32 subVolume
Specifies the bounds of the subvolume that will be rendered.
Definition SoROI.h:407
SoSFBool relative
Specifies whether the box bounds are relative to the subvolume or the full volume (i....
Definition SoROI.h:415
SoROI()
Constructor.
SoSFInt32 dataSetId
Specifies which SoVolumeData node to use.
Definition SoROI.h:335
Flags
Flag value mask.
Definition SoROI.h:354
@ ENABLE_X2
Enable cropping with X slab for term 2 (stage 1)
Definition SoROI.h:374
@ FENCE_INVERT
Definition SoROI.h:400
@ ENABLE_Y0
Enable cropping with Y slab for term 0 (stage 1)
Definition SoROI.h:358
@ ENABLE_Y1
Enable cropping with Y slab for term 1 (stage 1)
Definition SoROI.h:367
@ INVERT_2
Invert result for this term 2 (stage 2)
Definition SoROI.h:380
@ FENCE
Definition SoROI.h:399
@ ENABLE_Z2
Enable cropping with Z slab for term 2 (stage 1)
Definition SoROI.h:378
@ INVERT_1
Invert result for this term 1 (stage 2)
Definition SoROI.h:371
@ OR_SELECT
Stage 3: If set, the result is the union (OR) of term 0, term 1, and term 2.
Definition SoROI.h:386
@ ENABLE_X0
Enable cropping with X slab for term 0 (stage 1)
Definition SoROI.h:356
@ ENABLE_Z1
Enable cropping with Z slab for term 1 (stage 1)
Definition SoROI.h:369
@ SUB_VOLUME
Convenient enums.
Definition SoROI.h:395
@ INVERT_OUTPUT
Stage 4: If enabled, the result of stage 4 (union or intersection) is inverted as the last step in cr...
Definition SoROI.h:392
@ ENABLE_X1
Enable cropping with X slab for term 1 (stage 1)
Definition SoROI.h:365
@ CROSS_INVERT
Definition SoROI.h:398
@ ENABLE_Z0
Enable cropping with Z slab for term 0 (stage 1)
Definition SoROI.h:360
@ ENABLE_Y2
Enable cropping with Y slab for term 2 (stage 1)
Definition SoROI.h:376
@ CROSS
Definition SoROI.h:397
@ INVERT_0
Invert result for this term 0 (stage 2)
Definition SoROI.h:362
@ EXCLUSION_BOX
Definition SoROI.h:396
SoSFBox3i32 box
Specifies the bounds of the region of interest.
Definition SoROI.h:343
Single-value field containing a set of bit flags.
Field containing a single Boolean value.
Definition SoSFBool.h:79
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Field containing...
Definition SoSFBox3i32.h:55
Field containing a int32_t integer.
Definition SoSFInt32.h:80
Abstract base class for Open Inventor sensors.
Definition SoSensor.h:100
Writes a scene graph to a file.