Added support for volume tags with properties:
dragger="box" or dragger="trackball"
and
technique="light" or technique="isosurface" or technique="iso" or technique="mip"
and
tf="transferfunctionfile.tf"
i.e.
<volume dragger="box">CardiacCT</volume>
<volume tf="colour.tf">CardiacCT</volume>
<volume technique="isosurface">CardiacCT</volume>
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include <osg/ClearNode>
|
||||
#include <osg/Switch>
|
||||
#include <osg/AnimationPath>
|
||||
#include <osg/TransferFunction>
|
||||
#include <osg/ImageStream>
|
||||
#include <osgText/Text>
|
||||
#include <osgGA/GUIEventAdapter>
|
||||
@@ -204,6 +205,28 @@ public:
|
||||
osg::Vec4 backgroundColor;
|
||||
};
|
||||
|
||||
struct VolumeData
|
||||
{
|
||||
enum ShadingModel
|
||||
{
|
||||
Standard,
|
||||
Light,
|
||||
Isosurface,
|
||||
MaximumIntensityProjection
|
||||
};
|
||||
|
||||
VolumeData():
|
||||
shadingModel(Standard),
|
||||
useTabbedDragger(false),
|
||||
useTrackballDragger(false) {}
|
||||
|
||||
ShadingModel shadingModel;
|
||||
osg::ref_ptr<osg::TransferFunction1D> transferFunction;
|
||||
bool useTabbedDragger;
|
||||
bool useTrackballDragger;
|
||||
};
|
||||
|
||||
|
||||
struct FontData
|
||||
{
|
||||
FontData():
|
||||
@@ -316,7 +339,7 @@ public:
|
||||
|
||||
void addModel(const std::string& filename, const PositionData& positionData, const ModelData& modelData);
|
||||
|
||||
void addVolume(const std::string& filename, const PositionData& positionData);
|
||||
void addVolume(const std::string& filename, const PositionData& positionData, const VolumeData& volumeData);
|
||||
|
||||
osg::Group* takePresentation() { return _root.release(); }
|
||||
|
||||
@@ -334,6 +357,7 @@ public:
|
||||
void setAutoSteppingActive(bool flag = true) { _autoSteppingActive = flag; }
|
||||
bool getAutoSteppingActive() const { return _autoSteppingActive; }
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
void findImageStreamsAndAddCallbacks(osg::Node* node);
|
||||
|
||||
Reference in New Issue
Block a user