openscenegraph
osgVolume::ImageLayer Class Reference

#include <Layer>

Inheritance diagram for osgVolume::ImageLayer:
osgVolume::Layer osg::Object osg::Referenced

Public Member Functions

 ImageLayer (osg::Image *image=0)
 ImageLayer (const ImageLayer &imageLayer, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 META_Object (osgVolume, ImageLayer)
void setFileName (const std::string &filename)
virtual const std::string & getFileName () const
void setImage (osg::Image *image)
template<class T>
void setImage (const osg::ref_ptr< T > &image)
virtual osg::ImagegetImage ()
virtual const osg::ImagegetImage () const
void setTexelOffset (const osg::Vec4 &offset)
const osg::Vec4getTexelOffset () const
void setTexelScale (const osg::Vec4 &scale)
const osg::Vec4getTexelScale () const
bool computeMinMax (osg::Vec4 &min, osg::Vec4 &max)
void offsetAndScaleImage (const osg::Vec4 &offset, const osg::Vec4 &scale)
void rescaleToZeroToOneRange ()
void translateMinToZero ()
virtual bool requiresUpdateTraversal () const
virtual void update (osg::NodeVisitor &)
virtual void dirty ()
virtual void setModifiedCount (unsigned int value)
virtual unsigned int getModifiedCount () const
Public Member Functions inherited from osgVolume::Layer
 Layer ()
 Layer (const Layer &, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 META_Object (osgVolume, Layer)
void setLocator (Locator *locator)
template<class T>
void setLocator (const osg::ref_ptr< T > &locator)
LocatorgetLocator ()
const LocatorgetLocator () const
void setDefaultValue (const osg::Vec4 &value)
const osg::Vec4getDefaultValue () const
void setMinFilter (osg::Texture::FilterMode filter)
osg::Texture::FilterMode getMinFilter () const
void setMagFilter (osg::Texture::FilterMode filter)
osg::Texture::FilterMode getMagFilter () const
void setProperty (Property *property)
template<class T>
void setProperty (const osg::ref_ptr< T > &p)
PropertygetProperty ()
const PropertygetProperty () const
void addProperty (Property *property)
template<class T>
void addProperty (const osg::ref_ptr< T > &p)
virtual osg::BoundingSphere computeBound () const
Public Member Functions inherited from osg::Object
 Object ()
 Object (bool threadSafeRefUnref)
 Object (const Object &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
virtual ObjectcloneType () const =0
virtual Objectclone (const CopyOp &) const =0
virtual bool isSameKindAs (const Object *) const
virtual const char * libraryName () const =0
virtual const char * className () const =0
std::string getCompoundClassName () const
virtual NodeasNode ()
virtual const NodeasNode () const
virtual NodeVisitorasNodeVisitor ()
virtual const NodeVisitorasNodeVisitor () const
virtual StateSetasStateSet ()
virtual const StateSetasStateSet () const
virtual StateAttributeasStateAttribute ()
virtual const StateAttributeasStateAttribute () const
virtual UniformasUniform ()
virtual const UniformasUniform () const
virtual CameraasCamera ()
virtual const CameraasCamera () const
virtual DrawableasDrawable ()
virtual const DrawableasDrawable () const
virtual CallbackasCallback ()
virtual const CallbackasCallback () const
virtual CallbackObjectasCallbackObject ()
virtual const CallbackObjectasCallbackObject () const
virtual UserDataContainerasUserDataContainer ()
virtual const UserDataContainerasUserDataContainer () const
virtual ValueObjectasValueObject ()
virtual const ValueObjectasValueObject () const
virtual ImageasImage ()
virtual const ImageasImage () const
virtual void setThreadSafeRefUnref (bool threadSafe)
virtual void setName (const std::string &name)
void setName (const char *name)
const std::string & getName () const
void setDataVariance (DataVariance dv)
DataVariance getDataVariance () const
virtual void computeDataVariance ()
void setUserDataContainer (osg::UserDataContainer *udc)
template<class T>
void setUserDataContainer (const ref_ptr< T > &udc)
osg::UserDataContainergetUserDataContainer ()
const osg::UserDataContainergetUserDataContainer () const
osg::UserDataContainergetOrCreateUserDataContainer ()
virtual void setUserData (Referenced *obj)
template<class T>
void setUserData (const ref_ptr< T > &ud)
virtual ReferencedgetUserData ()
virtual const ReferencedgetUserData () const
template<typename T>
bool getUserValue (const std::string &name, T &value) const
template<typename T>
void setUserValue (const std::string &name, const T &value)
virtual void resizeGLObjectBuffers (unsigned int)
virtual void releaseGLObjects (osg::State *=0) const
template<typename T>
BoolValueObject UCharValueObject UShortValueObject UIntValueObject DoubleValueObject Vec3fValueObject Vec2dValueObject Vec4dValueObject PlaneValueObject MatrixdValueObject BoundingBoxdValueObject BoundingSpheredValueObject bool getUserValue (const std::string &name, T &value) const
Public Member Functions inherited from osg::Referenced
 Referenced ()
 Referenced (bool threadSafeRefUnref)
 Referenced (const Referenced &)
Referencedoperator= (const Referenced &)
bool getThreadSafeRefUnref () const
OpenThreads::MutexgetRefMutex () const
int ref () const
int unref () const
int unref_nodelete () const
int referenceCount () const
ObserverSetgetObserverSet () const
ObserverSetgetOrCreateObserverSet () const
void addObserver (Observer *observer) const
void removeObserver (Observer *observer) const

Protected Member Functions

virtual ~ImageLayer ()
Protected Member Functions inherited from osgVolume::Layer
virtual ~Layer ()
Protected Member Functions inherited from osg::Object
virtual ~Object ()
Protected Member Functions inherited from osg::Referenced
virtual ~Referenced ()
void signalObserversAndDelete (bool signalDelete, bool doDelete) const
void deleteUsingDeleteHandler () const

Protected Attributes

osg::Vec4 _texelOffset
osg::Vec4 _texelScale
osg::ref_ptr< osg::Image_image
Protected Attributes inherited from osgVolume::Layer
std::string _filename
osg::ref_ptr< Locator_locator
osg::Vec4 _defaultValue
osg::Texture::FilterMode _minFilter
osg::Texture::FilterMode _magFilter
osg::ref_ptr< Property_property
Protected Attributes inherited from osg::Object
std::string _name
DataVariance _dataVariance
osg::UserDataContainer_userDataContainer
Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr _observerSet
OpenThreads::Atomic _refCount

Additional Inherited Members

Public Types inherited from osg::Object
enum  DataVariance { DYNAMIC , STATIC , UNSPECIFIED }
Static Public Member Functions inherited from osg::Referenced
static OpenThreads::MutexgetGlobalReferencedMutex ()
static void setDeleteHandler (DeleteHandler *handler)
static DeleteHandlergetDeleteHandler ()

Constructor & Destructor Documentation

◆ ImageLayer() [1/2]

osgVolume::ImageLayer::ImageLayer ( osg::Image * image = 0)

Referenced by ImageLayer(), and META_Object().

◆ ImageLayer() [2/2]

osgVolume::ImageLayer::ImageLayer ( const ImageLayer & imageLayer,
const osg::CopyOp & copyop = osg::CopyOp::SHALLOW_COPY )

Copy constructor using CopyOp to manage deep vs shallow copy.

References ImageLayer(), and osg::CopyOp::SHALLOW_COPY.

◆ ~ImageLayer()

virtual osgVolume::ImageLayer::~ImageLayer ( )
inlineprotectedvirtual

Member Function Documentation

◆ computeMinMax()

bool osgVolume::ImageLayer::computeMinMax ( osg::Vec4 & min,
osg::Vec4 & max )

Compute the min and max pixel colors.

◆ dirty()

virtual void osgVolume::ImageLayer::dirty ( )
virtual

increment the modified count."

Reimplemented from osgVolume::Layer.

◆ getFileName()

virtual const std::string & osgVolume::ImageLayer::getFileName ( ) const
inlinevirtual

Get the file name of the layer.

Reimplemented from osgVolume::Layer.

References osgVolume::Layer::_filename, and _image.

◆ getImage() [1/2]

virtual osg::Image * osgVolume::ImageLayer::getImage ( )
inlinevirtual

Return image associated with layer.

Reimplemented from osgVolume::Layer.

References _image.

◆ getImage() [2/2]

virtual const osg::Image * osgVolume::ImageLayer::getImage ( ) const
inlinevirtual

Return const image associated with layer.

Reimplemented from osgVolume::Layer.

References _image.

◆ getModifiedCount()

virtual unsigned int osgVolume::ImageLayer::getModifiedCount ( ) const
virtual

Get modified count value.

Reimplemented from osgVolume::Layer.

◆ getTexelOffset()

const osg::Vec4 & osgVolume::ImageLayer::getTexelOffset ( ) const
inline

References _texelOffset.

◆ getTexelScale()

const osg::Vec4 & osgVolume::ImageLayer::getTexelScale ( ) const
inline

References _texelScale.

◆ META_Object()

osgVolume::ImageLayer::META_Object ( osgVolume ,
ImageLayer  )

References ImageLayer().

◆ offsetAndScaleImage()

void osgVolume::ImageLayer::offsetAndScaleImage ( const osg::Vec4 & offset,
const osg::Vec4 & scale )

Apply color transformation to pixels using c' = offset + c * scale .

◆ requiresUpdateTraversal()

virtual bool osgVolume::ImageLayer::requiresUpdateTraversal ( ) const
virtual

Specify whether ImageLayer requires update traversal.

Reimplemented from osgVolume::Layer.

◆ rescaleToZeroToOneRange()

void osgVolume::ImageLayer::rescaleToZeroToOneRange ( )

Compute the min max range of the image, and then remap this to a 0 to 1 range.

◆ setFileName()

void osgVolume::ImageLayer::setFileName ( const std::string & filename)
inlinevirtual

Set the file name of the data associated with this layer.

Reimplemented from osgVolume::Layer.

References osgVolume::Layer::_filename, and _image.

◆ setImage() [1/2]

template<class T>
void osgVolume::ImageLayer::setImage ( const osg::ref_ptr< T > & image)
inline

References osg::ref_ptr< T >::get(), and setImage().

Referenced by setImage().

◆ setImage() [2/2]

void osgVolume::ImageLayer::setImage ( osg::Image * image)

◆ setModifiedCount()

virtual void osgVolume::ImageLayer::setModifiedCount ( unsigned int )
virtual

Set the modified count value.

Reimplemented from osgVolume::Layer.

◆ setTexelOffset()

void osgVolume::ImageLayer::setTexelOffset ( const osg::Vec4 & offset)
inline

References _texelOffset.

◆ setTexelScale()

void osgVolume::ImageLayer::setTexelScale ( const osg::Vec4 & scale)
inline

References _texelScale.

◆ translateMinToZero()

void osgVolume::ImageLayer::translateMinToZero ( )

Compute the min color component of the image and then translate and pixels by this offset to make the new min component 0.

◆ update()

virtual void osgVolume::ImageLayer::update ( osg::NodeVisitor & )
virtual

Call update on the Layer.

Reimplemented from osgVolume::Layer.

Member Data Documentation

◆ _image

osg::ref_ptr<osg::Image> osgVolume::ImageLayer::_image
protected

◆ _texelOffset

osg::Vec4 osgVolume::ImageLayer::_texelOffset
protected

Referenced by getTexelOffset(), and setTexelOffset().

◆ _texelScale

osg::Vec4 osgVolume::ImageLayer::_texelScale
protected

Referenced by getTexelScale(), and setTexelScale().


The documentation for this class was generated from the following file: