Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoVolumeMask.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 : VSG (MMM YYYY)
22**=======================================================================*/
23#ifndef SOVOLUMEMASK_H
24#define SOVOLUMEMASK_H
25
26#include <VolumeViz/nodes/SoVolumeData.h>
27#include <Inventor/fields/SoSFBitMask.h>
28#include <Inventor/fields/SoSFVec4f.h>
29#include <Inventor/fields/SoMFVec4f.h>
30
31
32class SoVolumeMaskReader;
35
36SO_PIMPL_PUBLIC_DECLARATION(SoVolumeMask)
37
38
179{
180 SO_NODE_HEADER(SoVolumeMask);
181
182 SO_PIMPL_PUBLIC_HEADER( SoVolumeMask );
183
184public:
189
202 virtual int editSubVolume( const SbBox3i32& subVolume, SoBufferObject* userData );
203
214 virtual int editSubVolume( const SbBox3i32& subVolume, const double& value );
215
227 virtual int editSurfaceShape( const SoNode* surfaceShape, const float& thickness, const double& newValue );
228
250 virtual int editSolidShape( const SoNode* solidShape, const double& value );
251
256 bool saveEditing(SbString filename, bool recomputeLowerResolution = TRUE, const std::vector<char*> = std::vector<char*>(), SaveEditingCB callback = NULL);
257
261 void setDefaultValue( const bool defValue );
262
266 bool getDefaultValue() const;
267
268private:
269 static void initClass();
270 static void exitClass();
271
272 virtual SoLDMReader* getAppropriateLDMReader(const SbString& pathname);
274 virtual SoBufferObject* getTransformedTile(const SoLDMTileID& tile, const SoLDM::DataSetIdPair& pair,
275 SoState * state = NULL, const bool useExtendedData=false);
276
277private:
278 virtual void GLRender(SoGLRenderAction* action);
279
280 inline virtual void setIsReadChar(bool flag);
281
282 // Returns SoVolumeData node that this mask applies to
283 virtual SoVolumeData* getVolumeData();
284
285 // Note: Since OIV 9.0, the border parameter is no longer used.
286 virtual void setProperties( SbVec3i32 dimension, SbVec3i32 tileSize, int border );
287
288private:
290 void readerChanged();
291
292};
293
294void
295SoVolumeMask::setIsReadChar(bool flag)
296{
297 m_dataCharRead = flag;
298}
299
300#endif
301
302
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> 3D box class.
Definition SbBox.h:96
Class for smart character strings.
Definition SbString.h:202
3D vector class.
Definition SbVec.h:1517
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> LDM buff...
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> LDM buff...
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> Base cla...
Definition SoLDMReader.h:98
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Tile ID
Definition SoLDMTileID.h:63
Abstract base class for all database nodes.
Definition SoNode.h:145
Traversal state.
Definition SoState.h:74
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Volume data property ...
<a href="IconLegend.html"><img src="extVR.gif" alt="VolumeViz" border="0"></a> Volume mask.
virtual int editSubVolume(const SbBox3i32 &subVolume, SoBufferObject *userData)
Replace the contents of a subvolume with the given data.
bool saveEditing(SbString filename, bool recomputeLowerResolution=TRUE, const std::vector< char * >=std::vector< char * >(), SaveEditingCB callback=NULL)
Save editing done on the volume mask data.
virtual int editSurfaceShape(const SoNode *surfaceShape, const float &thickness, const double &newValue)
Replace all voxels intersecting the polygons or lines defined by the surfaceShape and given thickness...
bool getDefaultValue() const
Returns default value of the volume mask.
virtual int editSolidShape(const SoNode *solidShape, const double &value)
Replace all voxels inside the given shape with the specified value.
void setDefaultValue(const bool defValue)
Set default value of the volume mask.
virtual int editSubVolume(const SbBox3i32 &subVolume, const double &value)
Replace the contents of a subvolume with the specified value.
SoVolumeMask()
Constructor.
std::pair< SoDataSet *, int > DataSetIdPair
Pair containing an SoDataset and its dataSetId.
Definition SoLDM.h:71