1 #ifndef SIMVOLEON_SOVOLUMEDATA_H
2 #define SIMVOLEON_SOVOLUMEDATA_H
27 #include <Inventor/fields/SoSFString.h>
28 #include <Inventor/fields/SoSFEnum.h>
29 #include <Inventor/fields/SoSFBool.h>
30 #include <Inventor/fields/SoSFVec3f.h>
31 #include <Inventor/SbVec3f.h>
32 #include <Inventor/SbVec3s.h>
33 #include <Inventor/SbBox3f.h>
34 #include <Inventor/SbBox3s.h>
35 #include <Inventor/SbBox2s.h>
36 #include <Inventor/SbBox2f.h>
37 #include <VolumeViz/nodes/SoVolumeRendering.h>
38 #include <Inventor/nodes/SoSubNode.h>
64 enum SubMethod { NEAREST, MAX, AVERAGE };
65 enum OverMethod { NONE, CONSTANT, LINEAR, CUBIC };
67 enum DataType { UNSIGNED_BYTE, UNSIGNED_SHORT };
75 void setVolumeData(
const SbVec3s & dimension,
void * data,
76 SoVolumeData::DataType type = SoVolumeData::UNSIGNED_BYTE,
77 int significantbits = 0);
78 SbBool getVolumeData(SbVec3s & dimension,
void *& data,
79 SoVolumeData::DataType & type,
80 int * significantbits = NULL)
const;
82 uint32_t getVoxelValue(
const SbVec3s & voxelpos)
const;
84 void setVolumeSize(
const SbBox3f & size);
85 SbBox3f getVolumeSize(
void)
const;
87 void setPageSize(
int size);
88 void setPageSize(
const SbVec3s & size);
89 const SbVec3s & getPageSize(
void)
const;
94 void setTexMemorySize(
int megatexels);
95 int getTexMemorySize(
void)
const;
97 SbBool getMinMax(
int & minval,
int & maxval);
98 SbBool getHistogram(
int & length,
int *& histogram);
101 void updateRegions(
const SbBox3s * region,
int num);
102 void loadRegions(
const SbBox3s * region,
int num, SoState * state,
SoTransferFunction * node);
105 SoVolumeData::SubMethod subMethod,
106 SoVolumeData::OverMethod = NONE);
108 void enableSubSampling(SbBool enable);
109 SbBool isSubSamplingEnabled(
void)
const;
111 void enableAutoSubSampling(SbBool enable);
112 SbBool isAutoSubSamplingEnabled(
void)
const;
114 void enableAutoUnSampling(SbBool enable);
115 SbBool isAutoUnSamplingEnabled(
void)
const;
119 void setSubSamplingMethod(SubMethod method);
120 SubMethod getSubSamplingMethod(
void)
const;
122 void setSubSamplingLevel(
const SbVec3s & roi,
const SbVec3s & secondary);
123 void getSubSamplingLevel(SbVec3s & roi, SbVec3s & secondary)
const;
129 virtual void doAction(SoAction * action);
130 virtual void GLRender(SoGLRenderAction * action);
131 virtual void callback(SoCallbackAction * action);
132 virtual void getBoundingBox(SoGetBoundingBoxAction * action);
133 virtual void pick(SoPickAction * action);
136 friend class SoVolumeDataP;
137 class SoVolumeDataP * pimpl;
142 SoSFVec3f volumeboxmin;
143 SoSFVec3f volumeboxmax;
146 #endif // !SIMVOLEON_SOVOLUMEDATA_H
SoSFBool usePalettedTexture
Definition: SoVolumeData.h:71
SoSFBool useCompressedTexture
Definition: SoVolumeData.h:73
SoSFBool useSharedPalettedTexture
Definition: SoVolumeData.h:72
The main interface for setting up volume data sets.
Definition: SoVolumeData.h:45
static void initClass(void)
Definition: VolumeRendering.cpp:364
Abstract base class for all nodes related to volume rendering.
Definition: SoVolumeRendering.h:32
Contains the transfer function definition.
Definition: SoTransferFunction.h:35
Abstract superclass for all volume data reader classes.
Definition: SoVolumeReader.h:34