Open Inventor Release 2024.1.0
 
Loading...
Searching...
No Matches
SoDataSet.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-2023 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : Jerome Hummel (Mar 2006)
22** Modified by : Benjamin Grange (MMM yyyy)
23** Modified by : Jean-Michel Godinaud. (MMM yyyy)
24**=======================================================================*/
25
26
27#ifndef _SO_DATA_SET_
28#define _SO_DATA_SET_
29
30#ifdef _MSC_VER
31#pragma warning( push )
32#pragma warning(disable:4251)
33#endif
34
35//includes
36#include <Inventor/SbBox.h>
37#include <Inventor/SbLinear.h>
45#include <Inventor/SbDataType.h>
51#include <Inventor/misc/SoRef.h>
53#include <LDM/SoLDM.h>
54#include <LDM/SoLDMMediator.h>
55#include <LDM/SoLDMTileID.h>
62
63// TODO: Should be removed : For compatibility only
65
69class SoWriteAction;
70class SoState;
71class SoLDMGeomElement;
72class SoLDMGeometry;
73class SoLDMReader;
77class SoVolumeReader;
79class SoPerfCounter;
80class SoBufferObject;
82class SoGLTexture;
83class SoCache;
84
85class SoDataExtract;
86class SoConversion;
87class SoAlgorithms;
88class SoLDMAlgorithms;
89class SoLdmValuationAction;
90class SoDataRange;
91
92class SoVolumeWriter;
93
95
96
97
138class SoDataSet : public SoNode
139{
141
142 SO_PIMPL_PUBLIC_HEADER( SoDataSet );
143
144public:
145
162
188
203
229
240
262
271
290
295
300
304 unsigned int getDatumSize();
305
313 virtual size_t readTile( SoBufferObject*& bufferObject, SoLDMTileID tileID, bool transform );
314
320 virtual void readTile(SoLDMTileID tileID, SoBufferObject* buffer, bool transform);
321
330 virtual void writeTile( SoLDMTileID tileID, SoBufferObject* buffer, SoVolumeWriter* writer );
331
336 bool isInMemory( SoLDMTileID tileID ) const;
337
347 bool isDataInMemory( const SoLDMTileID& tileID ) const;
348
353 void getTileIDInMemory( std::vector<LDM_TILE_ID_TYPE>& tilesInMemory ) const;
354
360
366
374 virtual SbBool startEditing( int& transactionId );
375
384 virtual SbBool finishEditing( int transactionId );
385
394 virtual int editTile( const SoLDMTileID& tileId, SoBufferObject* userData );
395
405 virtual int editSubVolume( const SbBox3i32& subVolume, SoBufferObject* userData );
406
411 virtual int editTile( const SoLDMTileID& tileId, const double& value );
412
418 virtual int editSubVolume( const SbBox3i32& subVolume, const double& value );
419
432 virtual int editSurfaceShape( const SoNode* surfaceShape, const float& thickness, const double& value );
433
453 virtual int editSolidShape( const SoNode* solidShape, const double& value );
454
463 virtual int editBoxes(
464 const std::vector<SbVec3i32>& boxCenters,
465 const int& boxSize,
466 const double& newValue
467 );
468
480 virtual SbBool undoEditing( int transactionId );
481
493 virtual SbBool redoEditing( int transactionId );
494
495
511 typedef SbBool SaveEditingCB( SoDataSet* dataSet,
512 SoVolumeWriter* writer,
513 int tilesRemaining,
514 int totalTiles );
554 virtual SbBool saveEditing( bool recomputeLowerResolution = TRUE,
555 const std::vector<char*> conversionParameters = std::vector<char*>(), SaveEditingCB* callback = NULL );
556
560 virtual bool hasEditedTile();
561
569
577
587 {
588 return const_cast<const SoDataSet*>(this)->getReader();
589 }
590
600
622
623
628
633
638
642 int numSigBits() const;
643
656 virtual SbBool getMinMax( int64_t &min, int64_t &max);
657
671 virtual SbBool getMinMax( double &min, double &max);
672
677
682
702 void setReader( SoVolumeReader &reader, SbBool takeOwnership = FALSE );
703
708 static int getMaxNumDataSets() ;
709
724 virtual SbVec3f voxelToXYZ( const SbVec3f& dataPosition ) const;
725
739 virtual SbBox3f voxelToXYZ( const SbBox3f& box ) const;
740
754 virtual SbVec3f XYZToVoxel( const SbVec3f& dataPosition ) const;
755
769 virtual SbBox3f XYZToVoxel( const SbBox3f& xyzBox ) const;
770
771#if 1 SoDEPRECATED
774 virtual void readTile(SoLDMTileID tileID, unsigned char* buffer, bool transform);
775
804 const SbVec3i32& bufferDimension, //tile dim
805 void* bufferToTransform,
806 const SbBox3i32& dataBox, //position of tile in data space
807 int resolutionLevel, //resolution level of the tile
808 void* userData);
809SoDEPRECATED
819 void setLDMDataTransformFunction(SoLDMDataTransformFunction* func, void* userData = NULL);
820
821#endif
823#if 1 SoDEPRECATED
831
832#endif
835
850
856
857private:
858
860 virtual void callback( SoCallbackAction *action );
862 virtual void GLRender( SoGLRenderAction *action );
864 virtual void getBoundingBox(SoGetBoundingBoxAction *action);
866 virtual void handleEvent(SoHandleEventAction* action);
868 virtual void pick(SoPickAction *action) ;
870 virtual void write(SoWriteAction *action);
872 virtual void doAction( SoAction *action );
873
877 inline virtual void useFakeData(SoLDMTileID /* tileID */, SoBufferObject* /* buffer */) {};
878
879private:
880
881 // This map is used to maintain signature of each tile in cache
882 // It's used to be able to find an uncompressed version of a given tile in the cache
883 // when already uncompressed tile are reloaded.
884 typedef std::map<SoLDMTileID, uint64_t> tileSigInCacheMap;
885
886 static void initClass();
887 static void exitClass();
888
890 bool isReallyOfType(const SoType& type, bool derived);
891
897 bool isGPUDataRange( SoState* state );
898
904 SoBufferObject* getEditedTile( SoBufferObject* tileBuffer, const SoLDMTileID& tileId );
905
910 virtual SoBufferObject *getTransformedTile(const SoLDMTileID& tile,
911 const SoLDM::DataSetIdPair& p,
912 SoState * state=NULL,
913 const bool useExtendedData = false);
914
915 // return the number of SoDataSet instance created
916 // this is usefull to optimize SoLdmValuationAction
917 static int getNumInstance();
918
921
922 SoMultiDataSeparator *getMultiDataSeparator() { return m_MultiDataSeparator; }
923 void setMultiDataSeparator(SoMultiDataSeparator *mds, SoLDMMediator* mediator = nullptr);
924
928 virtual void notify(SoNotList *list);
929
933 void sendParametersToLDM(SoLdmValuationAction* action);
934
935 //When true data set won't be used for rendering
936 void ignoredByMultiDataSeparator(bool state);
937 bool isIgnoredByMultiDataSeparator();
938
939 // have the properties read ?
940 virtual bool getDataCharRead() { return m_dataCharRead;};
941
942 /* @return texture precision in Bits */
943 int getIndTexPrec() const;
944 bool loadInMemory(SoState* s = NULL);
945 void setListChange(bool val);
946 bool getListChange();
947
948 /*
949 * Return internal state of resources. Dirty state means
950 * resource field has been changed by application / user.
951 * Can be cumulative value defined in
952 * See enum definition made in SoLDMResourceManager::State
953 */
954 unsigned short getResourcesState() const;
955
956 /*
957 * Set internal state of resources. State set to true means
958 * resource field have been changed by application / user.
959 */
960 void setResourcesState( const SoLDMResourceManager::State flag, bool value );
961
962 //shall we accumulate the node in state?
963 bool isAccumulated();
964
965 static SbBool getCurrentMatrixDifference(SoState* state, const SoLDM::DataSetIdPair& idPair, SbMatrix& geomMatrix);
966
967 //multi-data
968 void lookForSceneGraphChange(SoAction* action);
969
970 // extract slice data
971 virtual SoBufferObject* getDataOneSlice( const SbVec3i32& tileSize, SoBufferObject* tileData, int Zaxis, int slice);
972 virtual void releaseDataOneSlice(SoBufferObject *sliceDataBuffer);
973
974 //***** factory methods ****
975
976 virtual LDMSliceAccessor* getAppropriateSliceAccessor(const SoLDM::DataSetIdPair& p);
977 virtual SoLDMReader* getAppropriateLDMReader( const SbString& )
978 { return NULL; };
979
980 // logical center per id
981 bool getCenter(SoLDMTileID tileID, SbVec3f& center)const;
982
983 SoLDMMediator* getMediator() const
984 {
985 return m_mediator;
986 };
987 void setMediator(SoLDMMediator* m);
988
989 virtual bool createTex(int Zaxis, SoState *state, const SbVec3i32 &tileSize, SoBufferObject *tileDataBuffer, SoTransferFunction *transferFunction,
990 SoBufferObject*& textureBufferObject, int alphaUse = 0);
991
992 // TODO FIXME : should cleanup this call.
994 void* getTexData(const void* tileBuffer,
995 int numElem,
996 SoTransferFunction* transferFunction,
997 int alphaUse,
998 int texPrec,
999 void *textureBuffer,
1000 SoDataRange* datarange,
1001 SoDataCompositor* dataCompositor);
1002
1003 // allocate ( if needed ) and initialize the texture buffer, according to the input buffer and the transfer function.
1004 // The texture buffer can be given with the tex_data argument. In this case no allocation is done and tex_data is returned.
1005 // Otherwise returns the initialized texture buffer.
1006 // Returned pointer does not need to be deleted, but reference to this buffer will be valid only until the next getTexData call.
1007 SoBufferObject* getTexData(SoBufferObject* tileBufferObject,
1008 SoTransferFunction* transferFunction,
1009 int alphaUse,
1010 int texPrec,
1011 SoBufferObject* textureBufferObject,
1012 SoDataRange* dataRange,
1013 SoDataCompositor* dataCompositor);
1014
1015 int getRGBAInternalFormat() const;
1016
1017 virtual void updateColorTable(SoState *, SoTransferFunction *);
1018
1019 SoLDMResourceManager& getResourceManager() { return *m_resourceManager; }
1020
1025 virtual int getTexPrec(SoState*);
1026
1032 void getTextureFormat(SoTransferFunction::GLColorMapType colorMapType,
1033 GLenum& format,
1035 GLint& internalFormat) const;
1036
1037 //Display loaded tiles
1038 virtual void drawTilesInMainMemory(SoGLRenderAction* action, const SoLDM::DataSetIdPair& idPair);
1039
1040 //Copy dataset's fields if needed into the given mediator
1041 // Notifications are disabled on #ldmResourceParameters during the process
1042 void copyLDMParameters(SoLDMMediator *mediator);
1043
1049 virtual bool isMultidataEnabled() const { return m_multidataEnabled; }
1050
1051 // draw a colored Box
1052 enum BoxColor {
1053 GREY,
1054 RED,
1055 BLUE,
1056 GREEN,
1057 FULL_RES_GREY,
1058 FULL_RES_GREEN
1059 };
1060
1065 unsigned short getId() const
1066 { return m_id; }
1067
1071 bool hasReadError();
1072
1076 inline bool isEmpty()
1077 {
1078 const SbVec3i32& dim = getDimension();
1079 return ( dim[0] == 0 || dim[1] == 0 || dim[2] == 0 );
1080 };
1081
1086 struct DatumElement{
1088 int num;
1089 };
1090
1097 float convertToNormalizedTextureSpace(SoState *state, const float data);
1098
1102 void setFirstTraversalDone(bool flag);
1103
1107 bool isFirstTraversalDone() const;
1108
1109 virtual bool isPalettedTexture(SoState*);
1110
1111 // Get a unique signature for a given tile. If tile already loaded, return the
1112 // previously generated signature. Otherwise, generate a new one. Each dataset
1113 // manages its signature list.
1114 virtual uint64_t getTileSignature(const SoLDMTileID& tileId);
1115
1121 inline void setOwnedReader( SoVolumeReader &reader )
1122 { setReader( reader, TRUE ); };
1123
1124 /*
1125 Ref/unref mechanism on volume render used to manage
1126 GPU resources. Allow SoDataSet to free GPU resources when
1127 texture are not needed
1128 */
1129 void refVolRender( int contextId );
1130 void unrefVolRender( int contextId );
1131
1138 int getBestEqualResolution() const;
1139
1141 void invalidateHistogram();
1142
1144 SbVec2f getDataTypeMinMax() const;
1145
1153 SoLDMTileID getTileCharacteristics(const SoLDMTileID& tile, SbBox3i32& tileBox, SbVec3i32& tileDim) const;
1154
1158 bool supportUndefinedVoxel(SoState* state);
1159
1161 SoVolumeReader* getInternalReader() const;
1162
1163 int getTexelSizeBits(SoState* state = nullptr);
1164
1165private:
1166
1168 SoDataSet();
1169
1171 virtual ~SoDataSet();
1172
1173 inline virtual void computeLighting( const SbVec3i32& /* tileSize */, SoBufferObject* /* rgbaBuffer */ ) {};
1174
1178 virtual void setElement(SoState* state);
1179
1183 bool isUsingUserExtent();
1184
1185 /*
1186 Allows a class inheriting from SoDataSet to decide whether multiple data should be allowed or not.
1187 If it is the SoDataSet will assign one mediator for all dataset.
1188 Else one mediator is assigned for all dataset (one LDM core per dataset).
1189 In vviz this method checks whether a compositor or a shader is present in the state.
1190 If not then multidata is not allowed.
1191 */
1192 virtual bool enableMultidata(SoState* state);
1193
1194 //Return a reader according to m_filename and m_data
1195 virtual SoVolumeReader* getAppropriateReader();
1196
1198 bool m_forcePow2TileDim;
1199
1200 //LDM reader
1201 SoRef<SoFieldContainer> m_reader;
1202
1203 bool load(SoState*);
1204 virtual void unload();
1205 virtual void releaseMemory();
1206
1207
1208 bool m_multidataEnabled;
1209
1210 SbVec3i32 m_dimension;
1211 bool m_initialized;
1212
1213 SbDataType m_type;
1214 int m_numBits;
1215
1216 //True if data header has already been read
1217 bool m_dataCharRead;
1218
1219 SbString m_filename;
1220 virtual void updateFilename();
1221
1222
1223 unsigned short m_id;
1224
1225
1229 virtual void readerChanged();
1230
1231 void initReader();
1232
1233 virtual SoLDMMediator *createMediator();
1234 SoLDMMediator* m_mediator;
1235
1236 SoMultiDataSeparator *m_MultiDataSeparator;
1237
1238 SoLDMResourceManager* m_resourceManager;
1239
1240 void getTransferFunction(SoTransferFunction *transferFunction, int alphaUse,
1241 int &shift, int &offset, int &nrgba, unsigned int * &rgba);
1242
1243 //Build a tile out of the original full resolution data.
1244 //The data is taken out from disk by the reader (vol, am,..)
1245 //and subsampled until the desired level.
1246 virtual void buildTile(SoLDMTileID tileID, SoBufferObject* buffer);
1247
1248 SoVolumeHistogram *m_histogram;
1249
1251 virtual void ldmAction(SoLdmValuationAction* action);
1252
1256 virtual SbBool isRGBAData();
1257
1258SoINTERNAL private:
1259
1264 virtual SoLDMGeomElement* getAppropriateElement( SoLDMGeometry* SO_UNUSED_PARAM(v) )
1265 {
1266 return NULL;
1267 }
1268
1272 virtual unsigned short getMaxTexturePrecisionBits() const { return 16; }
1273
1274 SoSFFieldContainer customReader;
1275 SoSFBool customReaderOwnerShip;
1276
1281 SoSFLDMDataTransform editingStack;
1282
1283private:
1284
1286 void commonConstructor();
1287
1292 bool computeBestEqualResolution(const std::vector<size_t>& tilesByLvlVec);
1293
1297 struct MTstruct {
1298 SoBufferObject *tmpTexture;
1299 SoCpuBufferUniform *tmpTextureUniform;
1300 SoBufferObject *tmpColormap;
1301 SoBufferObject *tmpTexturePermute;
1302 };
1303
1304#ifndef HIDDEN_FROM_DOC
1305 friend class SoVolumeState;
1306 friend class SoLDMMediator;
1307 friend class SoCpuBufferFromVolumeReaderImpl;
1308#endif
1309 friend class SoLdmValuationAction;
1310 friend class SoLDMGeometry;
1311};
1312
1313#ifdef _MSC_VER
1314#pragma warning( pop )
1315#endif
1316
1317#endif // _SO_DATA_SET_
1318
1319
#define SoEXTENDER_Documented
#define SoINTERNAL
#define TRUE
Possible value of SbBool.
Definition SbBase.h:77
#define FALSE
Possible value of SbBool.
Definition SbBase.h:75
#define SB_THREAD_TLS_HEADER()
Defines headers for required member variables in thread storage management.
SO_PIMPL_PUBLIC_DECLARATION(SoBMPImageRW)
int GLint
Definition SoGLType.h:29
unsigned int GLenum
bool isEmpty() const
#define SO_NODE_ABSTRACT_HEADER(className)
Definition SoSubNode.h:118
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
Class encoding a data type.
Definition SbDataType.h:58
@ FLOAT
float
Definition SbDataType.h:78
@ SIGNED_BYTE
signed byte
Definition SbDataType.h:72
@ UNSIGNED_INT32
unsigned int (32bits)
Definition SbDataType.h:70
@ DOUBLE
Double.
Definition SbDataType.h:80
@ UNSIGNED_BYTE
unsigned byte
Definition SbDataType.h:66
@ SIGNED_SHORT
signed short
Definition SbDataType.h:74
@ UNSIGNED_SHORT
unsigned short
Definition SbDataType.h:68
@ SIGNED_INT32
signed int (32bits)
Definition SbDataType.h:76
4x4 matrix class.
Definition SbMatrix.h:309
Class for smart character strings.
Definition SbString.h:202
2D vector class.
Definition SbVec.h:76
3D vector class.
Definition SbVec.h:932
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> Utility function...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
Performs a generic traversal of a scene graph or path.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Type conversion ...
<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> Data set...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Data extraction ...
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Range of...
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Data set...
Definition SoDataSet.h:139
SoSFBool allocateResourceOnRender
Indicates if resource allocation is done only on first render traversal or as soon as the node is cre...
Definition SoDataSet.h:270
SoSFBool useCompressedTexture
Controls use of OpenGL lossy texture compression for RGBA data (if available).
Definition SoDataSet.h:202
SoDEPRECATED void setLDMDataTransformFunction(SoLDMDataTransformFunction *func, void *userData=NULL)
If set, the user-defined function is called after each tile is loaded, but before it is stored in mai...
bool isInMemory(SoLDMTileID tileID) const
Indicates whether a tile is in main memory.
static int dataSize(DataType dataType)
Returns the number of bytes per voxel of the specified data type.
virtual SbBool getMinMax(double &min, double &max)
Returns min and max values of the data set.
SoSFUShort texturePrecision
For scalar (non-RGBA) data, specifies the size of voxel values on the GPU in bits.
Definition SoDataSet.h:228
virtual int editSolidShape(const SoNode *solidShape, const double &value)
Replaces all voxels intersecting the given shape with the specified value.
SoLDMDataAccess & getLdmDataAccess()
Returns a reference to the SoLDMDataAccess object.
virtual void readTile(SoLDMTileID tileID, SoBufferObject *buffer, bool transform)
Copies the specified tile into the provided buffer.
bool isDataInMemory(const SoLDMTileID &tileID) const
Indicates whether the data attached to a tile is in main memory.
void SoLDMDataTransformFunction(SoDataSet *ds, const SbVec3i32 &bufferDimension, void *bufferToTransform, const SbBox3i32 &dataBox, int resolutionLevel, void *userData)
Definition SoDataSet.h:803
virtual SbBox3f voxelToXYZ(const SbBox3f &box) const
Converts the specified box in voxel coordinates (I,J,K) to geometric coordinates (X,...
SoVolumeReader * getReader() const
Returns the current data set reader object.
virtual int editBoxes(const std::vector< SbVec3i32 > &boxCenters, const int &boxSize, const double &newValue)
Replace all voxels in the region defined by a list of boxes with the specified value.
virtual void writeTile(SoLDMTileID tileID, SoBufferObject *buffer, SoVolumeWriter *writer)
Write the specified tile using the specified writer.
void getTileIDInMemory(std::vector< LDM_TILE_ID_TYPE > &tilesInMemory) const
Debug purpose only.
virtual int editSurfaceShape(const SoNode *surfaceShape, const float &thickness, const double &value)
Replaces all voxels intersecting the polygons or lines defined by the surfaceShape and given thicknes...
SoSFFilePathString fileName
Indicates the file location containing the data set.
Definition SoDataSet.h:187
SoSFLDMDataTransform dataTransform
If set to an appropriate SoLDMDataTransform object, the object's transformFunction method is called a...
Definition SoDataSet.h:261
virtual SbBool undoEditing(int transactionId)
Undo all modifications associated with the specified transaction id.
void setLDMReader(SoLDMReader *reader)
Sets the LDM volume reader object to use.
static int getMaxNumDataSets()
Returns the maximum number of data sets that can be render composited on the current hardware (essent...
SoVolumeReader * getReader()
Returns the current data set reader object.
Definition SoDataSet.h:586
virtual SbVec3f voxelToXYZ(const SbVec3f &dataPosition) const
Converts the specified point in voxel coordinates (I,J,K) to geometric coordinates (X,...
virtual SbBool saveEditing(bool recomputeLowerResolution=TRUE, const std::vector< char * > conversionParameters=std::vector< char * >(), SaveEditingCB *callback=NULL)
Commit all transactions.
int numSigBits() const
Returns the number of significant bits.
virtual SbBool redoEditing(int transactionId)
Redo all modifications associated with the specified transaction id.
virtual SoDEPRECATED void readTile(SoLDMTileID tileID, unsigned char *buffer, bool transform)
SbVec3i32 getTileDimension()
Returns the tile dimension.
virtual SbVec3f XYZToVoxel(const SbVec3f &dataPosition) const
Converts the specified point in geometric coordinates (X,Y,Z) to voxel coordinates (I,...
void resetReader()
Resets previously set custom reader setup by setReader call.
virtual SbBool getMinMax(int64_t &min, int64_t &max)
Returns min and max values of the data set data.
const SoLDMTopoOctree * getLDMTopoOctree() const
Returns the LDMTopoOctree used by this SoDataSet.
DataType
Supported data type.
Definition SoDataSet.h:604
virtual SbBox3f XYZToVoxel(const SbBox3f &xyzBox) const
Converts the specified box in geometric coordinates to voxel coordinates.
const SbVec3i32 & getDimension()
Returns the data set dimension.
virtual int editSubVolume(const SbBox3i32 &subVolume, SoBufferObject *userData)
Replaces the contents of a subvolume with the given data.
unsigned int getDatumSize()
Returns the number of bytes per voxel.
static SbBool isDataSigned(DataType dataType)
Returns TRUE if the given data type is a signed integer data type.
virtual bool hasEditedTile()
Returns true if DataSet has edited tiles.
void setReader(SoVolumeReader &reader, SbBool takeOwnership=FALSE)
This method allows the data to be read directly from the disk using the specified subclass of SoVolum...
int getDataSize()
Returns the number of bytes per voxel in VolumeViz.
SoLDMReader * getLDMReader()
Returns a pointer to the current data set reader object.
virtual SbBool finishEditing(int transactionId)
Terminates an editing transaction.
virtual int editSubVolume(const SbBox3i32 &subVolume, const double &value)
Replaces the contents of a subvolume with the specified value.
SoSFInt32 dataSetId
When using multiple SoDataSet nodes, the dataSetId field uniquely identifies each data set used in th...
Definition SoDataSet.h:161
virtual int editTile(const SoLDMTileID &tileId, SoBufferObject *userData)
Replaces the contents of a tile with the given data.
virtual SbBool startEditing(int &transactionId)
Initiate an editing transaction.
SoSFDouble undefinedValue
Data with this value won't be rendered.
Definition SoDataSet.h:289
virtual size_t readTile(SoBufferObject *&bufferObject, SoLDMTileID tileID, bool transform)
Copies the specified tile into the provided buffer.
SoSFLDMResourceParameters ldmResourceParameters
Contains an SoLDMResourceParameters object which allows you to set LDM resource parameters.
Definition SoDataSet.h:359
virtual int editTile(const SoLDMTileID &tileId, const double &value)
Replaces the contents of a tile with the specified value.
SbBool SaveEditingCB(SoDataSet *dataSet, SoVolumeWriter *writer, int tilesRemaining, int totalTiles)
This is the declaration to use for saveEditing callback functions.
Definition SoDataSet.h:511
SoSFBox3f extent
The real size (extent) of the volume in modeling coordinates.
Definition SoDataSet.h:239
SoDEPRECATED int getOverlapping()
Returns the tile border (overlap) in voxels.
static SbBool isDataFloat(DataType dataType)
Returns TRUE if the given data type is a float data type.
DataType getDataType()
Returns the data type.
Renders a scene graph using Open Inventor's Render Engine.
Computes bounding box of a scene.
Allows nodes in a graph to receive input events.
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Volume d...
<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> Resource...
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Tile ID
Definition SoLDMTileID.h:63
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Octree t...
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Separato...
Abstract base class for all database nodes.
Definition SoNode.h:145
Abstract base class for Performance Counter.
Performance Counter Manager.
Abstract base class for picking objects in a scene.
Smart pointer for any class inheriting SoRefCounter.
Definition SoRef.h:90
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 SoSFBox3f.h:55
Field containing a floating-point value.
Definition SoSFDouble.h:53
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Field containing...
Field containing a int32_t integer.
Definition SoSFInt32.h:80
Field containing an SoLDMDataTransform object.
Field containing an SoLDMResourceParameters object.
Field containing an unsigned short integer.
Definition SoSFUShort.h:79
Traversal state.
Definition SoState.h:74
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Describe...
Stores runtime type information.
Definition SoType.h:98
Volume Data Histogram.
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Abstract...
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Abstract...
SoSFEnum dataType
Type of input data (that will be given in the writeXXX method) Use enum SoDataSet::DataType.
Writes a scene graph to a file.
int SbBool
Boolean type.
Definition SbBase.h:87
void notify(SoNotList *list)
std::pair< SoDataSet *, int > DataSetIdPair
Pair containing an SoDataset and its dataSetId.
Definition SoLDM.h:71