Open Inventor Release 2024.1.2
 
Loading...
Searching...
No Matches
SoDataSet.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-2024 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>
38#include <Inventor/fields/SoSFBool.h>
39#include <Inventor/fields/SoSFBox3f.h>
40#include <Inventor/fields/SoSFEnum.h>
41#include <Inventor/fields/SoSFFieldContainer.h>
42#include <Inventor/fields/SoSFFilePathString.h>
43#include <Inventor/fields/SoSFFloat.h>
44#include <Inventor/fields/SoSFDouble.h>
45#include <Inventor/SbDataType.h>
46#include <Inventor/fields/SoSFInt32.h>
47#include <Inventor/fields/SoSFNode.h>
48#include <Inventor/fields/SoSFString.h>
49#include <Inventor/fields/SoSFUShort.h>
50#include <Inventor/misc/SoMemoryObject.h>
51#include <Inventor/misc/SoRef.h>
52#include <Inventor/nodes/SoNode.h>
53#include <LDM/SoLDM.h>
54#include <LDM/SoLDMMediator.h>
55#include <LDM/SoLDMTileID.h>
56#include <LDM/fields/SoSFLDMResourceParameters.h>
57#include <LDM/fields/SoSFLDMDataTransform.h>
58#include <LDM/nodes/SoLDMResourceParameters.h>
59#include <LDM/nodes/SoTransferFunction.h>
60#include <LDM/tiles/SoCpuBufferUniform.h>
61#include <Inventor/sys/SoGLType.h>
62
63// TODO: Should be removed : For compatibility only
64#include <Inventor/devices/SoCpuBufferObject.h>
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
94SO_PIMPL_PUBLIC_DECLARATION(SoDataSet)
95
96
97
138class SoDataSet : public SoNode
139{
140 SO_NODE_ABSTRACT_HEADER( SoDataSet );
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,
555 const std::vector<char*> conversionParameters = std::vector<char*>(), SaveEditingCB* callback = NULL );
556
576
580 virtual bool hasEditedTile();
581
589
597
607 {
608 return const_cast<const SoDataSet*>(this)->getReader();
609 }
610
620
642
643
648
653
658
662 int numSigBits() const;
663
676 virtual SbBool getMinMax( int64_t &min, int64_t &max);
677
691 virtual SbBool getMinMax( double &min, double &max);
692
697
702
722 void setReader( SoVolumeReader &reader, SbBool takeOwnership = FALSE );
723
728 static int getMaxNumDataSets() ;
729
744 virtual SbVec3f voxelToXYZ( const SbVec3f& dataPosition ) const;
745
759 virtual SbBox3f voxelToXYZ( const SbBox3f& box ) const;
760
774 virtual SbVec3f XYZToVoxel( const SbVec3f& dataPosition ) const;
775
789 virtual SbBox3f XYZToVoxel( const SbBox3f& xyzBox ) const;
790
791#if 1 SoDEPRECATED
794 virtual void readTile(SoLDMTileID tileID, unsigned char* buffer, bool transform);
795
824 const SbVec3i32& bufferDimension, //tile dim
825 void* bufferToTransform,
826 const SbBox3i32& dataBox, //position of tile in data space
827 int resolutionLevel, //resolution level of the tile
828 void* userData);
829SoDEPRECATED
839 void setLDMDataTransformFunction(SoLDMDataTransformFunction* func, void* userData = NULL);
840
841#endif
843#if 1 SoDEPRECATED
851
852#endif
854SoEXTENDER_Documented public:
855
870
876
877private:
878
880 virtual void callback( SoCallbackAction *action );
882 virtual void GLRender( SoGLRenderAction *action );
884 virtual void getBoundingBox(SoGetBoundingBoxAction *action);
886 virtual void handleEvent(SoHandleEventAction* action);
888 virtual void pick(SoPickAction *action) ;
890 virtual void write(SoWriteAction *action);
892 virtual void doAction( SoAction *action );
893
897 inline virtual void useFakeData(SoLDMTileID /* tileID */, SoBufferObject* /* buffer */) {};
898
899private:
900
901 // This map is used to maintain signature of each tile in cache
902 // It's used to be able to find an uncompressed version of a given tile in the cache
903 // when already uncompressed tile are reloaded.
904 typedef std::map<SoLDMTileID, uint64_t> tileSigInCacheMap;
905
906 static void initClass();
907 static void exitClass();
908
910 bool isReallyOfType(const SoType& type, bool derived);
911
917 bool isGPUDataRange( SoState* state );
918
924 SoBufferObject* getEditedTile( SoBufferObject* tileBuffer, const SoLDMTileID& tileId );
925
930 virtual SoBufferObject *getTransformedTile(const SoLDMTileID& tile,
931 const SoLDM::DataSetIdPair& p,
932 SoState * state=NULL,
933 const bool useExtendedData = false);
934
935 // return the number of SoDataSet instance created
936 // this is usefull to optimize SoLdmValuationAction
937 static int getNumInstance();
938
940 SB_THREAD_TLS_HEADER();
941
942 SoMultiDataSeparator *getMultiDataSeparator() { return m_MultiDataSeparator; }
943 void setMultiDataSeparator(SoMultiDataSeparator *mds, SoLDMMediator* mediator = nullptr);
944
948 virtual void notify(SoNotList *list);
949
953 void sendParametersToLDM(SoLdmValuationAction* action);
954
955 //When true data set won't be used for rendering
956 void ignoredByMultiDataSeparator(bool state);
957 bool isIgnoredByMultiDataSeparator();
958
959 // have the properties read ?
960 virtual bool getDataCharRead() { return m_dataCharRead;};
961
962 /* @return texture precision in Bits */
963 int getIndTexPrec() const;
964 bool loadInMemory(SoState* s = NULL);
965 void setListChange(bool val);
966 bool getListChange();
967
968 /*
969 * Return internal state of resources. Dirty state means
970 * resource field has been changed by application / user.
971 * Can be cumulative value defined in
972 * See enum definition made in SoLDMResourceManager::State
973 */
974 unsigned short getResourcesState() const;
975
976 /*
977 * Set internal state of resources. State set to true means
978 * resource field have been changed by application / user.
979 */
980 void setResourcesState( const SoLDMResourceManager::State flag, bool value );
981
982 //shall we accumulate the node in state?
983 bool isAccumulated();
984
985 static SbBool getCurrentMatrixDifference(SoState* state, const SoLDM::DataSetIdPair& idPair, SbMatrix& geomMatrix);
986
987 //multi-data
988 void lookForSceneGraphChange(SoAction* action);
989
990 // extract slice data
991 virtual SoBufferObject* getDataOneSlice( const SbVec3i32& tileSize, SoBufferObject* tileData, int Zaxis, int slice);
992 virtual void releaseDataOneSlice(SoBufferObject *sliceDataBuffer);
993
994 //***** factory methods ****
995
996 virtual LDMSliceAccessor* getAppropriateSliceAccessor(const SoLDM::DataSetIdPair& p);
997 virtual SoLDMReader* getAppropriateLDMReader( const SbString& )
998 { return NULL; };
999
1000 // logical center per id
1001 bool getCenter(SoLDMTileID tileID, SbVec3f& center)const;
1002
1003 SoLDMMediator* getMediator() const
1004 {
1005 return m_mediator;
1006 };
1007 void setMediator(SoLDMMediator* m);
1008
1009 virtual bool createTex(int Zaxis, SoState *state, const SbVec3i32 &tileSize, SoBufferObject *tileDataBuffer, SoTransferFunction *transferFunction,
1010 SoBufferObject*& textureBufferObject, int alphaUse = 0);
1011
1012 // TODO FIXME : should cleanup this call.
1014 void* getTexData(const void* tileBuffer,
1015 int numElem,
1016 SoTransferFunction* transferFunction,
1017 int alphaUse,
1018 int texPrec,
1019 void *textureBuffer,
1020 SoDataRange* datarange,
1021 SoDataCompositor* dataCompositor);
1022
1023 // allocate ( if needed ) and initialize the texture buffer, according to the input buffer and the transfer function.
1024 // The texture buffer can be given with the tex_data argument. In this case no allocation is done and tex_data is returned.
1025 // Otherwise returns the initialized texture buffer.
1026 // Returned pointer does not need to be deleted, but reference to this buffer will be valid only until the next getTexData call.
1027 SoBufferObject* getTexData(SoBufferObject* tileBufferObject,
1028 SoTransferFunction* transferFunction,
1029 int alphaUse,
1030 int texPrec,
1031 SoBufferObject* textureBufferObject,
1032 SoDataRange* dataRange,
1033 SoDataCompositor* dataCompositor);
1034
1035 SoTexture::InternalFormat getRGBAInternalFormat() const;
1036
1037 SoLDMResourceManager& getResourceManager() { return *m_resourceManager; }
1038
1043 virtual int getTexPrec(SoState*);
1044
1050 void getTextureFormat(SoTransferFunction::GLColorMapType colorMapType,
1051 SbEnums::ImageDataFormat& format,
1053 SoTexture::InternalFormat& internalFormat) const;
1054
1055 //Display loaded tiles
1056 virtual void drawTilesInMainMemory(SoGLRenderAction* action, const SoLDM::DataSetIdPair& idPair);
1057
1058 //Copy dataset's fields if needed into the given mediator
1059 // Notifications are disabled on #ldmResourceParameters during the process
1060 void copyLDMParameters(SoLDMMediator *mediator);
1061
1067 virtual bool isMultidataEnabled() const { return m_multidataEnabled; }
1068
1069 // draw a colored Box
1070 enum BoxColor {
1071 GREY,
1072 RED,
1073 BLUE,
1074 GREEN,
1075 FULL_RES_GREY,
1076 FULL_RES_GREEN
1077 };
1078
1083 unsigned short getId() const
1084 { return m_id; }
1085
1089 bool hasReadError();
1090
1094 inline bool isEmpty()
1095 {
1096 const SbVec3i32& dim = getDimension();
1097 return ( dim[0] == 0 || dim[1] == 0 || dim[2] == 0 );
1098 };
1099
1104 struct DatumElement{
1106 int num;
1107 };
1108
1115 float convertToNormalizedTextureSpace(SoState *state, const float data);
1116
1120 void setFirstTraversalDone(bool flag);
1121
1125 bool isFirstTraversalDone() const;
1126
1127 virtual bool isPalettedTexture(SoState*);
1128
1129 // Get a unique signature for a given tile. If tile already loaded, return the
1130 // previously generated signature. Otherwise, generate a new one. Each dataset
1131 // manages its signature list.
1132 virtual uint64_t getTileSignature(const SoLDMTileID& tileId);
1133
1139 inline void setOwnedReader( SoVolumeReader &reader )
1140 { setReader( reader, TRUE ); };
1141
1142 /*
1143 Ref/unref mechanism on volume render used to manage
1144 GPU resources. Allow SoDataSet to free GPU resources when
1145 texture are not needed
1146 */
1147 void refVolRender( int contextId );
1148 void unrefVolRender( int contextId );
1149
1156 int getBestEqualResolution() const;
1157
1159 void invalidateHistogram();
1160
1162 SbVec2f getDataTypeMinMax() const;
1163
1171 SoLDMTileID getTileCharacteristics(const SoLDMTileID& tile, SbBox3i32& tileBox, SbVec3i32& tileDim) const;
1172
1176 bool supportUndefinedVoxel(SoState* state);
1177
1179 SoVolumeReader* getInternalReader() const;
1180
1181 int getTexelSizeBits(SoState* state = nullptr);
1182
1183private:
1184
1186 SoDataSet();
1187
1189 virtual ~SoDataSet();
1190
1191 inline virtual void computeLighting( const SbVec3i32& /* tileSize */, SoBufferObject* /* rgbaBuffer */ ) {};
1192
1196 virtual void setElement(SoState* state);
1197
1201 bool isUsingUserExtent();
1202
1203 /*
1204 Allows a class inheriting from SoDataSet to decide whether multiple data should be allowed or not.
1205 If it is the SoDataSet will assign one mediator for all dataset.
1206 Else one mediator is assigned for all dataset (one LDM core per dataset).
1207 In vviz this method checks whether a compositor or a shader is present in the state.
1208 If not then multidata is not allowed.
1209 */
1210 virtual bool enableMultidata(SoState* state);
1211
1212 //Return a reader according to m_filename and m_data
1213 virtual SoVolumeReader* getAppropriateReader();
1214
1216 bool m_forcePow2TileDim;
1217
1218 //LDM reader
1219 SoRef<SoFieldContainer> m_reader;
1220
1221 bool load(SoState*);
1222 virtual void unload();
1223 virtual void releaseMemory();
1224
1225
1226 bool m_multidataEnabled;
1227
1228 SbVec3i32 m_dimension;
1229 bool m_initialized;
1230
1231 SbDataType m_type;
1232 int m_numBits;
1233
1234 //True if data header has already been read
1235 bool m_dataCharRead;
1236
1237 SbString m_filename;
1238 virtual void updateFilename();
1239
1240
1241 unsigned short m_id;
1242
1243
1247 virtual void readerChanged();
1248
1249 void initReader();
1250
1251 virtual SoLDMMediator *createMediator();
1252 SoLDMMediator* m_mediator;
1253
1254 SoMultiDataSeparator *m_MultiDataSeparator;
1255
1256 SoLDMResourceManager* m_resourceManager;
1257
1258 void getTransferFunction(SoTransferFunction *transferFunction, int alphaUse,
1259 int &shift, int &offset, int &nrgba, unsigned int * &rgba);
1260
1261 //Build a tile out of the original full resolution data.
1262 //The data is taken out from disk by the reader (vol, am,..)
1263 //and subsampled until the desired level.
1264 virtual void buildTile(SoLDMTileID tileID, SoBufferObject* buffer);
1265
1266 SoVolumeHistogram *m_histogram;
1267
1269 virtual void ldmAction(SoLdmValuationAction* action);
1270
1274 virtual SbBool isRGBAData();
1275
1276SoINTERNAL private:
1277
1282 virtual SoLDMGeomElement* getAppropriateElement( SoLDMGeometry* SO_UNUSED_PARAM(v) )
1283 {
1284 return NULL;
1285 }
1286
1290 virtual unsigned short getMaxTexturePrecisionBits() const { return 16; }
1291
1292 SoSFFieldContainer customReader;
1293 SoSFBool customReaderOwnerShip;
1294
1299 SoSFLDMDataTransform editingStack;
1300
1301private:
1302
1304 void commonConstructor();
1305
1310 bool computeBestEqualResolution(const std::vector<size_t>& tilesByLvlVec);
1311
1315 struct MTstruct {
1316 SoBufferObject *tmpTexture;
1317 SoCpuBufferUniform *tmpTextureUniform;
1318 SoBufferObject *tmpColormap;
1319 SoBufferObject *tmpTexturePermute;
1320 };
1321
1322#ifndef HIDDEN_FROM_DOC
1323 friend class SoVolumeState;
1324 friend class SoLDMMediator;
1325 friend class SoCpuBufferFromVolumeReaderImpl;
1326#endif
1327 friend class SoLdmValuationAction;
1328 friend class SoLDMGeometry;
1329};
1330
1331#ifdef _MSC_VER
1332#pragma warning( pop )
1333#endif
1334
1335#endif // _SO_DATA_SET_
1336
1337
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
DataType
Supported Data type.
Definition SbDataType.h:64
@ 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
virtual SbBool saveEditing(bool recomputeLowerResolution, const std::vector< char * > conversionParameters=std::vector< char * >(), SaveEditingCB *callback=NULL)
Commit all transactions.
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:823
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:606
virtual SbVec3f voxelToXYZ(const SbVec3f &dataPosition) const
Converts the specified point in voxel coordinates (I,J,K) to geometric coordinates (X,...
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.
SbBool saveEditing()
Commit all transactions.
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:624
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.
DataType getDataType() const
Returns the data type.
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.
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
InternalFormat
Texture internal storage format.
Definition SoTexture.h:165
<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
std::pair< SoDataSet *, int > DataSetIdPair
Pair containing an SoDataset and its dataSetId.
Definition SoLDM.h:71