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);
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;
145 friend class SoVolumeDataP;
146 class SoVolumeDataP * pimpl;
155 #endif // !SIMVOLEON_SOVOLUMEDATA_H