14#ifndef OSGVOLUME_LAYER
15#define OSGVOLUME_LAYER 1
265 if (&cnl==
this)
return *
this;
BoundingSphered BoundingSphere
Definition BoundingSphere:308
Vec4f Vec4
Definition Vec4:21
RefMatrixd RefMatrix
Definition Matrix:28
The osgVolume library is a NodeKit that extends the core scene graph to support volume rendering.
OSGVOLUME_EXPORT osg::Image * createNormalMapTexture(osg::Image *image_3d)
Compute a 3d image that represent the normal map of the specified 3d image.
OSGVOLUME_EXPORT osg::Image * applyTransferFunction(osg::Image *image, osg::TransferFunction1D *transferFunction)
Create an image that has a transfer function applied specified Image.
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
Image class for encapsulating the storage texture image data.
Definition Image:179
Visitor for type safe operations on osg::Nodes.
Definition NodeVisitor:82
Base class/standard interface for objects which require IO support, cloning and reference counting.
Definition Object:61
Smart pointer for handling referenced counted objects.
Definition ref_ptr:32
T * get() const
Definition ref_ptr:117
FilterMode
Definition Texture:499
1D variant of TransferFunction.
Definition TransferFunction:56
const osg::Vec4 & getTexelScale() const
Definition Layer:41
const osg::Vec4 & getTexelOffset() const
Definition Layer:38
const osg::RefMatrix * getMatrix() const
Definition Layer:45
META_Object(osgVolume, ImageDetails)
void setMatrix(osg::RefMatrix *matrix)
Definition Layer:43
osg::ref_ptr< osg::RefMatrix > _matrix
Definition Layer:51
void setTexelScale(const osg::Vec4 &scale)
Definition Layer:40
osg::Vec4 _texelOffset
Definition Layer:49
osg::Vec4 _texelScale
Definition Layer:50
void setTexelOffset(const osg::Vec4 &offset)
Definition Layer:37
osg::RefMatrix * getMatrix()
Definition Layer:44
ImageDetails(const ImageDetails &, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy.
void setProperty(Property *property)
Set the Property (or Properties via the CompositeProperty) that informs the VolumeTechnique how this ...
Definition Layer:103
osg::Texture::FilterMode _minFilter
Definition Layer:142
virtual void update(osg::NodeVisitor &)
Call update on the Layer.
Definition Layer:122
osg::Texture::FilterMode getMagFilter() const
Get the magnification texture filter to use when do texture associated with this layer.
Definition Layer:93
const Property * getProperty() const
Get the const Property that informs the VolumeTechnique how this layer should be rendered.
Definition Layer:111
osg::Vec4 _defaultValue
Definition Layer:141
virtual void setFileName(const std::string &filename)
Set the file name of the data associated with this layer.
Definition Layer:68
const Locator * getLocator() const
Definition Layer:78
virtual bool requiresUpdateTraversal() const
Specify whether ImageLayer requires update traversal.
Definition Layer:119
osg::Texture::FilterMode _magFilter
Definition Layer:143
virtual void setModifiedCount(unsigned int)
Set the modified count value.
Definition Layer:128
osg::ref_ptr< Locator > _locator
Definition Layer:140
Property * getProperty()
Get the Property that informs the VolumeTechnique how this layer should be rendered.
Definition Layer:108
Layer(const Layer &, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy.
std::string _filename
Definition Layer:139
virtual osg::BoundingSphere computeBound() const
void setDefaultValue(const osg::Vec4 &value)
Definition Layer:80
void setMinFilter(osg::Texture::FilterMode filter)
Set the minification texture filter to use when do texture associated with this layer.
Definition Layer:84
virtual const std::string & getFileName() const
Get the file name of the layer.
Definition Layer:71
Locator * getLocator()
Definition Layer:77
void setMagFilter(osg::Texture::FilterMode filter)
Set the magniification texture filter to use when do texture associated with this layer.
Definition Layer:90
void addProperty(Property *property)
Add a property, automatically creating a CompositePorperty if one isn't already assigned.
virtual const osg::Image * getImage() const
Return const image associated with layer if supported.
Definition Layer:99
virtual osg::Image * getImage()
Return image associated with layer if supported.
Definition Layer:96
void setLocator(Locator *locator)
Definition Layer:73
const osg::Vec4 & getDefaultValue() const
Definition Layer:81
virtual void dirty()
increment the modified count.
Definition Layer:125
osg::ref_ptr< Property > _property
Definition Layer:145
virtual unsigned int getModifiedCount() const
Get modified count value.
Definition Layer:131
void addProperty(const osg::ref_ptr< T > &p)
Definition Layer:116
META_Object(osgVolume, Layer)
void setLocator(const osg::ref_ptr< T > &locator)
Definition Layer:75
osg::Texture::FilterMode getMinFilter() const
Get the minification texture filter to use when do texture associated with this layer.
Definition Layer:87
void setProperty(const osg::ref_ptr< T > &p)
Definition Layer:105
const osg::Vec4 & getTexelOffset() const
Definition Layer:175
const osg::Vec4 & getTexelScale() const
Definition Layer:178
virtual void setModifiedCount(unsigned int value)
Set the modified count value.
ImageLayer(osg::Image *image=0)
void rescaleToZeroToOneRange()
Compute the min max range of the image, and then remap this to a 0 to 1 range.
virtual void dirty()
increment the modified count.
ImageLayer(const ImageLayer &imageLayer, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy.
osg::Vec4 _texelOffset
Definition Layer:205
META_Object(osgVolume, ImageLayer)
void setTexelScale(const osg::Vec4 &scale)
Definition Layer:177
virtual ~ImageLayer()
Definition Layer:203
virtual unsigned int getModifiedCount() const
Get modified count value.
void setImage(osg::Image *image)
virtual bool requiresUpdateTraversal() const
Specify whether ImageLayer requires update traversal.
virtual const osg::Image * getImage() const
Return const image associated with layer.
Definition Layer:171
void setTexelOffset(const osg::Vec4 &offset)
Definition Layer:174
void setFileName(const std::string &filename)
Set the file name of the data associated with this layer.
Definition Layer:160
void setImage(const osg::ref_ptr< T > &image)
Definition Layer:165
virtual void update(osg::NodeVisitor &)
Call update on the Layer.
void translateMinToZero()
Compute the min color component of the image and then translate and pixels by this offset to make the...
virtual osg::Image * getImage()
Return image associated with layer.
Definition Layer:168
void offsetAndScaleImage(const osg::Vec4 &offset, const osg::Vec4 &scale)
Apply color transformation to pixels using c' = offset + c * scale .
virtual const std::string & getFileName() const
Get the file name of the layer.
Definition Layer:161
osg::Vec4 _texelScale
Definition Layer:206
bool computeMinMax(osg::Vec4 &min, osg::Vec4 &max)
Compute the min and max pixel colors.
osg::ref_ptr< osg::Image > _image
Definition Layer:207
void setLayer(unsigned int i, Layer *layer)
Definition Layer:227
void setFileName(unsigned int i, const std::string &filename)
Definition Layer:224
CompositeLayer(const CompositeLayer &compositeLayer, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy.
std::vector< NameLayer > Layers
Definition Layer:276
virtual ~CompositeLayer()
Definition Layer:249
const std::string & getFileName(unsigned int i) const
Definition Layer:225
void removeLayer(unsigned int i)
Definition Layer:239
bool requiresUpdateTraversal() const
Specify whether ImageLayer requires update traversal.
const Layer * getLayer(unsigned int i) const
Definition Layer:233
virtual void update(osg::NodeVisitor &)
Call update on the Layer.
void addLayer(const osg::ref_ptr< T > &layer)
Definition Layer:237
META_Object(osgVolume, CompositeLayer)
void addLayer(Layer *layer)
Definition Layer:235
Layer * getLayer(unsigned int i)
Definition Layer:231
unsigned int getNumLayers() const
Definition Layer:241
Layers _layers
Definition Layer:278
void setLayer(unsigned int i, const osg::ref_ptr< T > &layer)
Definition Layer:229
NameLayer(const std::string &fn, Layer *l)
Definition Layer:259
NameLayer(const NameLayer &cnl)
Definition Layer:255
std::string filename
Definition Layer:272
NameLayer()
Definition Layer:253
osg::ref_ptr< Layer > layer
Definition Layer:273
#define OSGVOLUME_EXPORT
Definition Export:39