SurgSim::Graphics::OsgTexture3d Class Reference

OSG implementation of a 3D Texture. More...

`#include <SurgSim/Graphics/OsgTexture3d.h>`

Inheritance diagram for SurgSim::Graphics::OsgTexture3d:

## Public Member Functions

| OsgTexture3d ()
| Constructor. More...
virtual void | setSize (int width, int height, int depth)
| Sets the size of the texture. More...
virtual void | getSize (int *width, int *height, int *depth) const
| Gets the size of the texture. More...
virtual bool | loadImageSlices (const std::vector< std::string > &filePaths)
| Loads images slices from files into the 3D texture. More...
osg::ref_ptr< osg::Texture3D > | getOsgTexture3d () const
| Returns the osg::Texture3D. More...
Public Member Functions inherited from SurgSim::Graphics::OsgTexture
virtual bool | loadImage (const std::string &filePath)
| Loads an image into the texture from a file. More...
virtual void | clearImage ()
| Removes the image from the texture. More...
osg::ref_ptr< osg::Texture > | getOsgTexture () const
| Returns the osg::Texture1D. More...
Public Member Functions inherited from SurgSim::Graphics::Texture
| Texture ()
virtual | ~Texture ()
| Destructor. More...
void | setIsPointSprite (bool value)
| Set point sprite flag on/off. More...
bool | isPointSprite () const
| Get point sprite flag state. More...

## Additional Inherited Members

Protected Member Functions inherited from SurgSim::Graphics::OsgTexture
| OsgTexture (osg::Texture *texture)
| Constructor. More...

## Detailed Description

OSG implementation of a 3D Texture.

Wraps an osg::Texture3d

## Constructor & Destructor Documentation

## OsgTexture3d()

OsgTexture3d::OsgTexture3d | ( |  | ) |

Constructor.

Postcondition
  No image is loaded in the texture.

## Member Function Documentation

## getOsgTexture3d()

osg::ref_ptr<osg::Texture3D> SurgSim::Graphics::OsgTexture3d::getOsgTexture3d | ( |  | ) | const

inline

Returns the osg::Texture3D.

## getSize()

void OsgTexture3d::getSize | ( | int * | width,
|  | int * | height,
|  | int * | depth
| ) |  | const

virtual

Gets the size of the texture.

Parameters

  [out] | width | Width of the texture
  [out] | height | Height of the texture
  [out] | depth | Depth of the texture

Implements SurgSim::Graphics::Texture3d.

## loadImageSlices()

bool OsgTexture3d::loadImageSlices | ( | const std::vector< std::string > & | filePaths | ) |

virtual

Loads images slices from files into the 3D texture.

Parameters

  filePaths | Paths to the image files

Returns
  True if the image is successfully loaded, otherwise false

Note
  The slices are stacked in the order provided to create the depth of the 3D texture.

Load first slice, all others should have same properties

Load the remaining slices

Copy the slices into the 3D image, starting at depth 0

Implements SurgSim::Graphics::Texture3d.

## setSize()

void OsgTexture3d::setSize | ( | int | width,
|  | int | height,
|  | int | depth
| ) |  |

virtual

Sets the size of the texture.

Parameters

  width | Width of the texture
  height | Height of the texture
  depth | Depth of the texture

Note
  Use this to setup a texture as a render target rather than loading from file.

Implements SurgSim::Graphics::Texture3d.

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

- SurgSim/Graphics/OsgTexture3d.h
- SurgSim/Graphics/OsgTexture3d.cpp