Open Inventor Release 2024.2.0
 
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
297 {
305 CONTINUOUS = 0,
313 DISCRETE = 1
314 };
315
330
335
340
344 unsigned int getDatumSize();
345
353 virtual size_t readTile( SoBufferObject*& bufferObject, SoLDMTileID tileID, bool transform );
354
360 virtual void readTile(SoLDMTileID tileID, SoBufferObject* buffer, bool transform);
361
370 virtual void writeTile( SoLDMTileID tileID, SoBufferObject* buffer, SoVolumeWriter* writer );
371
376 bool isInMemory( SoLDMTileID tileID ) const;
377
387 bool isDataInMemory( const SoLDMTileID& tileID ) const;
388
393 void getTileIDInMemory( std::vector<LDM_TILE_ID_TYPE>& tilesInMemory ) const;
394
400
406
414 virtual SbBool startEditing( int& transactionId );
415
424 virtual SbBool finishEditing( int transactionId );
425
434 virtual int editTile( const SoLDMTileID& tileId, SoBufferObject* userData );
435
445 virtual int editSubVolume( const SbBox3i32& subVolume, SoBufferObject* userData );
446
451 virtual int editTile( const SoLDMTileID& tileId, const double& value );
452
458 virtual int editSubVolume( const SbBox3i32& subVolume, const double& value );
459
472 virtual int editSurfaceShape( const SoNode* surfaceShape, const float& thickness, const double& value );
473
493 virtual int editSolidShape( const SoNode* solidShape, const double& value );
494
503 virtual int editBoxes(
504 const std::vector<SbVec3i32>& boxCenters,
505 const int& boxSize,
506 const double& newValue
507 );
508
520 virtual SbBool undoEditing( int transactionId );
521
533 virtual SbBool redoEditing( int transactionId );
534
535
551 typedef SbBool SaveEditingCB( SoDataSet* dataSet,
552 SoVolumeWriter* writer,
553 int tilesRemaining,
554 int totalTiles );
594 virtual SbBool saveEditing( bool recomputeLowerResolution,
595 const std::vector<char*> conversionParameters = std::vector<char*>(), SaveEditingCB* callback = NULL );
596
616
620 virtual bool hasEditedTile();
621
629
637
647 {
648 return const_cast<const SoDataSet*>(this)->getReader();
649 }
650
660
682
683
688
693
698
702 int numSigBits() const;
703
716 virtual SbBool getMinMax( int64_t &min, int64_t &max);
717
731 virtual SbBool getMinMax( double &min, double &max);
732
737
742
762 void setReader( SoVolumeReader &reader, SbBool takeOwnership = FALSE );
763
768 static int getMaxNumDataSets() ;
769
784 virtual SbVec3f voxelToXYZ( const SbVec3f& dataPosition ) const;
785
799 virtual SbBox3f voxelToXYZ( const SbBox3f& box ) const;
800
814 virtual SbVec3f XYZToVoxel( const SbVec3f& dataPosition ) const;
815
829 virtual SbBox3f XYZToVoxel( const SbBox3f& xyzBox ) const;
830
831#if 1 SoDEPRECATED
834 virtual void readTile(SoLDMTileID tileID, unsigned char* buffer, bool transform);
835
864 const SbVec3i32& bufferDimension, //tile dim
865 void* bufferToTransform,
866 const SbBox3i32& dataBox, //position of tile in data space
867 int resolutionLevel, //resolution level of the tile
868 void* userData);
869SoDEPRECATED
879 void setLDMDataTransformFunction(SoLDMDataTransformFunction* func, void* userData = NULL);
880
881#endif
883#if 1 SoDEPRECATED
891
892#endif
894SoEXTENDER_Documented public:
895
910
916
917private:
918
920 virtual void callback( SoCallbackAction *action );
922 virtual void GLRender( SoGLRenderAction *action );
924 virtual void getBoundingBox(SoGetBoundingBoxAction *action);
926 virtual void handleEvent(SoHandleEventAction* action);
928 virtual void pick(SoPickAction *action) ;
930 virtual void write(SoWriteAction *action);
932 virtual void doAction( SoAction *action );
933
937 inline virtual void useFakeData(SoLDMTileID /* tileID */, SoBufferObject* /* buffer */) {};
938
939private:
940
941 // This map is used to maintain signature of each tile in cache
942 // It's used to be able to find an uncompressed version of a given tile in the cache
943 // when already uncompressed tile are reloaded.
944 typedef std::map<SoLDMTileID, uint64_t> tileSigInCacheMap;
945
946 static void initClass();
947 static void exitClass();
948
950 bool isReallyOfType(const SoType& type, bool derived);
951
957 bool isGPUDataRange( SoState* state );
958
964 SoBufferObject* getEditedTile( SoBufferObject* tileBuffer, const SoLDMTileID& tileId );
965
970 virtual SoBufferObject *getTransformedTile(const SoLDMTileID& tile,
971 const SoLDM::DataSetIdPair& p,
972 SoState * state=NULL,
973 const bool useExtendedData = false);
974
975 // return the number of SoDataSet instance created
976 // this is usefull to optimize SoLdmValuationAction
977 static int getNumInstance();
978
980 SB_THREAD_TLS_HEADER();
981
982 SoMultiDataSeparator *getMultiDataSeparator() { return m_MultiDataSeparator; }
983 void setMultiDataSeparator(SoMultiDataSeparator *mds, SoLDMMediator* mediator = nullptr);
984
988 virtual void notify(SoNotList *list);
989
993 void sendParametersToLDM(SoLdmValuationAction* action);
994
995 //When true data set won't be used for rendering
996 void ignoredByMultiDataSeparator(bool state);
997 bool isIgnoredByMultiDataSeparator();
998
999 // have the properties read ?
1000 virtual bool getDataCharRead() { return m_dataCharRead;};
1001
1002 /* @return texture precision in Bits */
1003 int getIndTexPrec() const;
1004 bool loadInMemory(SoState* s = NULL);
1005 void setListChange(bool val);
1006 bool getListChange();
1007
1008 /*
1009 * Return internal state of resources. Dirty state means
1010 * resource field has been changed by application / user.
1011 * Can be cumulative value defined in
1012 * See enum definition made in SoLDMResourceManager::State
1013 */
1014 unsigned short getResourcesState() const;
1015
1016 /*
1017 * Set internal state of resources. State set to true means
1018 * resource field have been changed by application / user.
1019 */
1020 void setResourcesState( const SoLDMResourceManager::State flag, bool value );
1021
1022 //shall we accumulate the node in state?
1023 bool isAccumulated();
1024
1025 static SbBool getCurrentMatrixDifference(SoState* state, const SoLDM::DataSetIdPair& idPair, SbMatrix& geomMatrix);
1026
1027 //multi-data
1028 void lookForSceneGraphChange(SoAction* action);
1029
1030 // extract slice data
1031 virtual SoBufferObject* getDataOneSlice( const SbVec3i32& tileSize, SoBufferObject* tileData, int Zaxis, int slice);
1032 virtual void releaseDataOneSlice(SoBufferObject *sliceDataBuffer);
1033
1034 //***** factory methods ****
1035
1036 virtual LDMSliceAccessor* getAppropriateSliceAccessor(const SoLDM::DataSetIdPair& p);
1037 virtual SoLDMReader* getAppropriateLDMReader( const SbString& )
1038 { return NULL; };
1039
1040 // logical center per id
1041 bool getCenter(SoLDMTileID tileID, SbVec3f& center)const;
1042
1043 SoLDMMediator* getMediator() const
1044 {
1045 return m_mediator;
1046 };
1047 void setMediator(SoLDMMediator* m);
1048
1049 virtual bool createTex(int Zaxis, SoState *state, const SbVec3i32 &tileSize, SoBufferObject *tileDataBuffer, SoTransferFunction *transferFunction,
1050 SoBufferObject*& textureBufferObject, int alphaUse = 0);
1051
1052 // TODO FIXME : should cleanup this call.
1054 void* getTexData(const void* tileBuffer,
1055 int numElem,
1056 SoTransferFunction* transferFunction,
1057 int alphaUse,
1058 int texPrec,
1059 void *textureBuffer,
1060 SoDataRange* datarange,
1061 SoDataCompositor* dataCompositor);
1062
1063 // allocate ( if needed ) and initialize the texture buffer, according to the input buffer and the transfer function.
1064 // The texture buffer can be given with the tex_data argument. In this case no allocation is done and tex_data is returned.
1065 // Otherwise returns the initialized texture buffer.
1066 // Returned pointer does not need to be deleted, but reference to this buffer will be valid only until the next getTexData call.
1067 SoBufferObject* getTexData(SoBufferObject* tileBufferObject,
1068 SoTransferFunction* transferFunction,
1069 int alphaUse,
1070 int texPrec,
1071 SoBufferObject* textureBufferObject,
1072 SoDataRange* dataRange,
1073 SoDataCompositor* dataCompositor);
1074
1075 SoTexture::InternalFormat getRGBAInternalFormat() const;
1076
1077 SoLDMResourceManager& getResourceManager() { return *m_resourceManager; }
1078
1083 virtual int getTexPrec(SoState*);
1084
1090 void getTextureFormat(SoTransferFunction::GLColorMapType colorMapType,
1091 SbEnums::ImageDataFormat& format,
1093 SoTexture::InternalFormat& internalFormat) const;
1094
1095 //Display loaded tiles
1096 virtual void drawTilesInMainMemory(SoGLRenderAction* action, const SoLDM::DataSetIdPair& idPair);
1097
1098 //Copy dataset's fields if needed into the given mediator
1099 // Notifications are disabled on #ldmResourceParameters during the process
1100 void copyLDMParameters(SoLDMMediator *mediator);
1101
1107 virtual bool isMultidataEnabled() const { return m_multidataEnabled; }
1108
1109 // draw a colored Box
1110 enum BoxColor {
1111 GREY,
1112 RED,
1113 BLUE,
1114 GREEN,
1115 FULL_RES_GREY,
1116 FULL_RES_GREEN
1117 };
1118
1123 unsigned short getId() const
1124 { return m_id; }
1125
1129 bool hasReadError();
1130
1134 inline bool isEmpty()
1135 {
1136 const SbVec3i32& dim = getDimension();
1137 return ( dim[0] == 0 || dim[1] == 0 || dim[2] == 0 );
1138 };
1139
1144 struct DatumElement{
1146 int num;
1147 };
1148
1155 float convertToNormalizedTextureSpace(SoState *state, const float data);
1156
1160 void setFirstTraversalDone(bool flag);
1161
1165 bool isFirstTraversalDone() const;
1166
1167 virtual bool isPalettedTexture(SoState*);
1168
1169 // Get a unique signature for a given tile. If tile already loaded, return the
1170 // previously generated signature. Otherwise, generate a new one. Each dataset
1171 // manages its signature list.
1172 virtual uint64_t getTileSignature(const SoLDMTileID& tileId);
1173
1179 inline void setOwnedReader( SoVolumeReader &reader )
1180 { setReader( reader, TRUE ); };
1181
1182 /*
1183 Ref/unref mechanism on volume render used to manage
1184 GPU resources. Allow SoDataSet to free GPU resources when
1185 texture are not needed
1186 */
1187 void refVolRender( int contextId );
1188 void unrefVolRender( int contextId );
1189
1191 void invalidateHistogram();
1192
1194 SbVec2f getDataTypeMinMax() const;
1195
1203 SoLDMTileID getTileCharacteristics(const SoLDMTileID& tile, SbBox3i32& tileBox, SbVec3i32& tileDim) const;
1204
1208 bool supportUndefinedVoxel(SoState* state);
1209
1211 SoVolumeReader* getInternalReader() const;
1212
1213 int getTexelSizeBits(SoState* state = nullptr);
1214
1215private:
1216
1218 SoDataSet();
1219
1221 virtual ~SoDataSet();
1222
1223 inline virtual void computeLighting( const SbVec3i32& /* tileSize */, SoBufferObject* /* rgbaBuffer */ ) {};
1224
1228 virtual void setElement(SoState* state);
1229
1233 bool isUsingUserExtent();
1234
1235 /*
1236 Allows a class inheriting from SoDataSet to decide whether multiple data should be allowed or not.
1237 If it is the SoDataSet will assign one mediator for all dataset.
1238 Else one mediator is assigned for all dataset (one LDM core per dataset).
1239 In vviz this method checks whether a compositor or a shader is present in the state.
1240 If not then multidata is not allowed.
1241 */
1242 virtual bool enableMultidata(SoState* state);
1243
1244 //Return a reader according to m_filename and m_data
1245 virtual SoVolumeReader* getAppropriateReader();
1246
1248 bool m_forcePow2TileDim;
1249
1250 //LDM reader
1251 SoRef<SoFieldContainer> m_reader;
1252
1253 bool load(SoState*);
1254 virtual void unload();
1255 virtual void releaseMemory();
1256
1257
1258 bool m_multidataEnabled;
1259
1260 SbVec3i32 m_dimension;
1261 bool m_initialized;
1262
1263 SbDataType m_type;
1264 int m_numBits;
1265
1266 //True if data header has already been read
1267 bool m_dataCharRead;
1268
1269 SbString m_filename;
1270 virtual void updateFilename();
1271
1272
1273 unsigned short m_id;
1274
1275
1279 virtual void readerChanged();
1280
1281 void initReader();
1282
1283 virtual SoLDMMediator *createMediator();
1284 SoLDMMediator* m_mediator;
1285
1286 SoMultiDataSeparator *m_MultiDataSeparator;
1287
1288 SoLDMResourceManager* m_resourceManager;
1289
1290 void getTransferFunction(SoTransferFunction *transferFunction, int alphaUse,
1291 int &shift, int &offset, int &nrgba, unsigned int * &rgba);
1292
1293 //Build a tile out of the original full resolution data.
1294 //The data is taken out from disk by the reader (vol, am,..)
1295 //and subsampled until the desired level.
1296 virtual void buildTile(SoLDMTileID tileID, SoBufferObject* buffer);
1297
1298 SoVolumeHistogram *m_histogram;
1299
1301 virtual void ldmAction(SoLdmValuationAction* action);
1302
1306 virtual SbBool isRGBAData();
1307
1308SoINTERNAL private:
1309
1314 virtual SoLDMGeomElement* getAppropriateElement( SoLDMGeometry* SO_UNUSED_PARAM(v) )
1315 {
1316 return NULL;
1317 }
1318
1322 virtual unsigned short getMaxTexturePrecisionBits() const { return 16; }
1323
1324 SoSFFieldContainer customReader;
1325 SoSFBool customReaderOwnerShip;
1326
1331 SoSFLDMDataTransform editingStack;
1332
1333private:
1334
1336 void commonConstructor();
1337
1341 struct MTstruct {
1342 SoBufferObject *tmpTexture;
1343 SoCpuBufferUniform *tmpTextureUniform;
1344 SoBufferObject *tmpColormap;
1345 SoBufferObject *tmpTexturePermute;
1346 };
1347
1348#ifndef HIDDEN_FROM_DOC
1349 friend class SoVolumeState;
1350 friend class SoLDMMediator;
1351 friend class SoCpuBufferFromVolumeReaderImpl;
1352 friend class SoObliqueSliceLdm;
1353#endif
1354 friend class SoLdmValuationAction;
1355 friend class SoLDMGeometry;
1356};
1357
1358#ifdef _MSC_VER
1359#pragma warning( pop )
1360#endif
1361
1362#endif // _SO_DATA_SET_
1363
1364
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.
ValueInterpretation
Specifies an image type: segmented or not segmented.
Definition SoDataSet.h:297
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:863
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:646
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:664
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
SoSFEnum valueInterpretation
Specifies if this dataset corresponds or does not correspond to a segmented image.
Definition SoDataSet.h:329
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:399
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:551
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
Field containing an enumerated value.
Definition SoSFEnum.h:89
<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