1 #ifndef SIMVOLEON_SOVOLUMEDATA_H 2 #define SIMVOLEON_SOVOLUMEDATA_H 36 #include <Inventor/fields/SoSFString.h> 37 #include <Inventor/fields/SoSFEnum.h> 38 #include <Inventor/fields/SoSFBool.h> 39 #include <Inventor/fields/SoSFVec3f.h> 40 #include <Inventor/SbVec3f.h> 41 #include <Inventor/SbVec3s.h> 42 #include <Inventor/SbBox3f.h> 43 #include <Inventor/SbBox3s.h> 44 #include <Inventor/SbBox2s.h> 45 #include <Inventor/SbBox2f.h> 46 #include <VolumeViz/nodes/SoVolumeRendering.h> 47 #include <Inventor/nodes/SoSubNode.h> 73 enum SubMethod { NEAREST, MAX, AVERAGE };
74 enum OverMethod { NONE, CONSTANT, LINEAR, CUBIC };
76 enum DataType { UNSIGNED_BYTE, UNSIGNED_SHORT };
84 void setVolumeData(
const SbVec3s & dimension,
void * data,
85 SoVolumeData::DataType type = SoVolumeData::UNSIGNED_BYTE,
86 int significantbits = 0);
87 SbBool getVolumeData(SbVec3s & dimension,
void *& data,
88 SoVolumeData::DataType & type,
89 int * significantbits = NULL)
const;
91 uint32_t getVoxelValue(
const SbVec3s & voxelpos)
const;
93 void setVolumeSize(
const SbBox3f & size);
94 SbBox3f getVolumeSize(
void)
const;
96 void setPageSize(
int size);
97 void setPageSize(
const SbVec3s & size);
98 const SbVec3s & getPageSize(
void)
const;
103 void setTexMemorySize(
int megatexels);
104 int getTexMemorySize(
void)
const;
106 SbBool getMinMax(
int & minval,
int & maxval);
107 SbBool getHistogram(
int & length,
int *& histogram);
110 void updateRegions(
const SbBox3s * region,
int num);
111 void loadRegions(
const SbBox3s * region,
int num, SoState * state,
SoTransferFunction * node);
114 SoVolumeData::SubMethod subMethod,
115 SoVolumeData::OverMethod = NONE);
117 void enableSubSampling(SbBool enable);
118 SbBool isSubSamplingEnabled(
void)
const;
120 void enableAutoSubSampling(SbBool enable);
121 SbBool isAutoSubSamplingEnabled(
void)
const;
123 void enableAutoUnSampling(SbBool enable);
124 SbBool isAutoUnSamplingEnabled(
void)
const;
128 void setSubSamplingMethod(SubMethod method);
129 SubMethod getSubSamplingMethod(
void)
const;
131 void setSubSamplingLevel(
const SbVec3s & roi,
const SbVec3s & secondary);
132 void getSubSamplingLevel(SbVec3s & roi, SbVec3s & secondary)
const;
138 virtual void doAction(SoAction * action);
139 virtual void GLRender(SoGLRenderAction * action);
140 virtual void callback(SoCallbackAction * action);
141 virtual void getBoundingBox(SoGetBoundingBoxAction * action);
142 virtual void pick(SoPickAction * action);
145 friend class SoVolumeDataP;
146 class SoVolumeDataP * pimpl;
151 SoSFVec3f volumeboxmin;
152 SoSFVec3f volumeboxmax;
155 #endif // !SIMVOLEON_SOVOLUMEDATA_H SoSFBool usePalettedTexture
Definition: SoVolumeData.h:80
#define SO_NODE_HEADER(classname)
SoSFBool useCompressedTexture
Definition: SoVolumeData.h:82
SoSFBool useSharedPalettedTexture
Definition: SoVolumeData.h:81
The main interface for setting up volume data sets.
Definition: SoVolumeData.h:54
static void initClass(void)
Definition: VolumeRendering.cpp:370
Abstract base class for all nodes related to volume rendering.
Definition: SoVolumeRendering.h:41
Contains the transfer function definition.
Definition: SoTransferFunction.h:44
Abstract superclass for all volume data reader classes.
Definition: SoVolumeReader.h:43