00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _SO_VOLUME_DETAIL_
00026 #define _SO_VOLUME_DETAIL_
00027
00028 #include <Inventor/details/SoSubDetail.h>
00029 #include <Inventor/SbPImpl.h>
00030 #include <VolumeViz/nodes/SoVolumeDataDrawStyle.h>
00031 #include <LDM/elements/SoDataRangeElement.h>
00032
00033 class SoVolumeData;
00034 class SoROI;
00035 class SbLine;
00036 class SoTransferFunction;
00037
00038 SO_PIMPL_BASE_PUBLIC_DECLARATION(SoVolumeDetail)
00039
00040
00041
00042
00043
00044
00045
00047
00123 class SoVolumeDetail : public SoDetail {
00124
00125 SO_DETAIL_HEADER(SoVolumeDetail);
00126 SO_PIMPL_BASE_PUBLIC_HEADER(SoVolumeDetail);
00127
00128 public:
00132 SoVolumeDetail();
00136 virtual ~SoVolumeDetail();
00137
00144 void getProfileObjectPos(SbVec3f profile[2]) const;
00145
00157 int getProfileDataPos(SbVec3i32 profile[2]) const;
00158
00176 int64_t getProfileValue(int index, SbVec3i32& pos, SbVec3f* objPos = 0, SbBool realValue = FALSE) const;
00177
00195 double getProfileValueD(int index, SbVec3i32& pos, SbVec3f* objPos, SbBool realValue = FALSE) const;
00196
00210 virtual SbBool getFirstNonTransparentValue(int64_t& value, SbVec3i32& pos, SbVec3f* objPos = 0, SbBool realValue = FALSE) const;
00211
00225 virtual SbBool getFirstNonTransparentValue(double& value, SbVec3i32& pos, SbVec3f* objPos = 0, SbBool realValue = FALSE) const;
00226
00228 virtual SoDetail* copy() const;
00229
00230 private:
00231 void setDetails(SbLine line, SoVolumeData* vd, SoTransferFunction* tf, SoROI* r);
00232
00233 private:
00234 static void initClass();
00235 static void exitClass();
00236
00238 void setDataSetIdPairList(const SoLDM::DataSetIdPairList& dsPairList);
00239
00241 void setDrawStyleMap(const SoVolumeDataDrawStyle::MaskDrawStyleValueMap& styleMap);
00242
00244 void setTransferFunctionList(const std::vector<SoTransferFunction*>& tfList, int intersectionTfId);
00245
00247 void setIsovalueMap(const SoVolumeDataDrawStyle::IsovalueMap& isomap);
00248
00250 void setDataRangeMap(const SoDataRangeElement::DataRangeIdMap& dataRangeMap);
00251
00253 void setVolumeRenderTransparency(float transparency);
00254
00255 private:
00257 SoVolumeDetail(const SoVolumeDetail& detail);
00258 };
00259
00260 #endif
00261
00262
00263