31#pragma warning( push )
32#pragma warning(disable:4251)
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>
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>
64#include <Inventor/devices/SoCpuBufferObject.h>
71class SoLDMGeomElement;
89class SoLdmValuationAction;
504 const std::vector<SbVec3i32>& boxCenters,
506 const double& newValue
595 const std::vector<char*> conversionParameters = std::vector<char*>(), SaveEditingCB* callback = NULL );
648 return const_cast<const SoDataSet*
>(
this)->getReader();
865 void* bufferToTransform,
894SoEXTENDER_Documented
public:
932 virtual void doAction(
SoAction *action );
944 typedef std::map<SoLDMTileID, uint64_t> tileSigInCacheMap;
946 static void initClass();
947 static void exitClass();
950 bool isReallyOfType(
const SoType& type,
bool derived);
957 bool isGPUDataRange(
SoState* state );
973 const bool useExtendedData =
false);
977 static int getNumInstance();
980 SB_THREAD_TLS_HEADER();
988 virtual void notify(SoNotList *list);
993 void sendParametersToLDM(SoLdmValuationAction* action);
996 void ignoredByMultiDataSeparator(
bool state);
997 bool isIgnoredByMultiDataSeparator();
1000 virtual bool getDataCharRead() {
return m_dataCharRead;};
1003 int getIndTexPrec()
const;
1004 bool loadInMemory(
SoState* s = NULL);
1005 void setListChange(
bool val);
1006 bool getListChange();
1014 unsigned short getResourcesState()
const;
1020 void setResourcesState(
const SoLDMResourceManager::State flag,
bool value );
1023 bool isAccumulated();
1028 void lookForSceneGraphChange(
SoAction* action);
1032 virtual void releaseDataOneSlice(
SoBufferObject *sliceDataBuffer);
1043 SoLDMMediator* getMediator()
const
1047 void setMediator(SoLDMMediator* m);
1054 void* getTexData(
const void* tileBuffer,
1059 void *textureBuffer,
1083 virtual int getTexPrec(
SoState*);
1090 void getTextureFormat(SoTransferFunction::GLColorMapType colorMapType,
1091 SbEnums::ImageDataFormat& format,
1100 void copyLDMParameters(SoLDMMediator *mediator);
1107 virtual bool isMultidataEnabled()
const {
return m_multidataEnabled; }
1123 unsigned short getId()
const
1129 bool hasReadError();
1134 inline bool isEmpty()
1137 return ( dim[0] == 0 || dim[1] == 0 || dim[2] == 0 );
1144 struct DatumElement{
1155 float convertToNormalizedTextureSpace(
SoState *state,
const float data);
1160 void setFirstTraversalDone(
bool flag);
1165 bool isFirstTraversalDone()
const;
1167 virtual bool isPalettedTexture(
SoState*);
1172 virtual uint64_t getTileSignature(
const SoLDMTileID& tileId);
1180 { setReader( reader, TRUE ); };
1187 void refVolRender(
int contextId );
1188 void unrefVolRender(
int contextId );
1191 void invalidateHistogram();
1194 SbVec2f getDataTypeMinMax()
const;
1208 bool supportUndefinedVoxel(
SoState* state);
1213 int getTexelSizeBits(
SoState* state =
nullptr);
1228 virtual void setElement(
SoState* state);
1233 bool isUsingUserExtent();
1242 virtual bool enableMultidata(
SoState* state);
1248 bool m_forcePow2TileDim;
1254 virtual void unload();
1255 virtual void releaseMemory();
1258 bool m_multidataEnabled;
1267 bool m_dataCharRead;
1270 virtual void updateFilename();
1273 unsigned short m_id;
1279 virtual void readerChanged();
1283 virtual SoLDMMediator *createMediator();
1284 SoLDMMediator* m_mediator;
1291 int &shift,
int &offset,
int &nrgba,
unsigned int * &rgba);
1301 virtual void ldmAction(SoLdmValuationAction* action);
1306 virtual SbBool isRGBAData();
1314 virtual SoLDMGeomElement* getAppropriateElement( SoLDMGeometry* SO_UNUSED_PARAM(v) )
1322 virtual unsigned short getMaxTexturePrecisionBits()
const {
return 16; }
1336 void commonConstructor();
1348#ifndef HIDDEN_FROM_DOC
1349 friend class SoVolumeState;
1350 friend class SoLDMMediator;
1351 friend class SoCpuBufferFromVolumeReaderImpl;
1352 friend class SoObliqueSliceLdm;
1354 friend class SoLdmValuationAction;
1355 friend class SoLDMGeometry;
1359#pragma warning( pop )
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> 3D box class.
Class encoding a data type.
DataType
Supported Data type.
@ UNSIGNED_INT32
unsigned int (32bits)
@ UNSIGNED_BYTE
unsigned byte
@ SIGNED_SHORT
signed short
@ UNSIGNED_SHORT
unsigned short
@ SIGNED_INT32
signed int (32bits)
Class for smart character strings.
Abstract base class for all actions.
<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> Data set...
<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...
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...
SoSFBool useCompressedTexture
Controls use of OpenGL lossy texture compression for RGBA data (if available).
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.
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.
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)
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.
SoSFLDMDataTransform dataTransform
If set to an appropriate SoLDMDataTransform object, the object's transformFunction method is called a...
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.
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.
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...
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.
SoSFEnum valueInterpretation
Specifies if this dataset corresponds or does not correspond to a segmented image.
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.
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.
SoSFBox3f extent
The real size (extent) of the volume in modeling coordinates.
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...
<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
<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.
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.
Field containing a single Boolean value.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Field containing...
Field containing a floating-point value.
Field containing an enumerated value.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Field containing...
Field containing a int32_t integer.
Field containing an SoLDMResourceParameters object.
Field containing an unsigned short integer.
InternalFormat
Texture internal storage format.
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Describe...
Stores runtime type information.
<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.
std::pair< SoDataSet *, int > DataSetIdPair
Pair containing an SoDataset and its dataSetId.