Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# vtkVolumeProperty Class Reference

`#include <vtkVolumeProperty.h>`

Inheritance diagram for vtkVolumeProperty:

[legend]
Collaboration diagram for vtkVolumeProperty:

[legend]
List of all members.

## Detailed Description

represents the common properties for rendering a volume.

Date:
  2002/08/28 19:01:17

Revision:
  1.38

vtkVolumeProperty is used to represent common properties associated with volume rendering. This includes properties for determining the type of interpolation to use when sampling a volume, the color of a volume, the scalar opacity of a volume, the gradient opacity of a volume, and the shading parameters of a volume.

When the scalar opacity or the gradient opacity of a volume is not set, then the function is defined to be a constant value of 1.0. When a scalar and gradient opacity are both set simultaneously, then the opacity is defined to be the product of the scalar opacity and gradient opacity transfer functions.

Most properties can be set per "component" for volume mappers that support multiple independent components. If you are using 2 component data as LV or 4 component data as RGBV (as specified in the mapper) only the first scalar opacity and gradient opacity transfer functions will be used (and all color functions will be ignored). Omitting the index parameter on the Set/Get methods will access index = 0.

See also:
  vtkPiecewiseFunction vtkColorTransferFunction

Created by:
  - Avila, Lisa

CVS contributions (if > 5%):
  - Avila, Lisa (81%)
  - Law, Charles (5%)
  - Martin, Ken (5%)

CVS logs (CVSweb):
  - .`cxx` (`/Rendering/vtkVolumeProperty.cxx)`
  - .`h` (`/Rendering/vtkVolumeProperty.h)`

Examples:
  vtkVolumeProperty (Examples)

Tests:
  vtkVolumeProperty (Tests)

Definition at line 74 of file vtkVolumeProperty.h.

## Public Types
typedef vtkObject | Superclass
## Public Methods
virtual const char * | GetClassName ()
virtual int | IsA (const char *type)
void | PrintSelf (ostream &os, vtkIndent indent)
unsigned long | GetMTime ()
void | UpdateMTimes ()
virtual void | SetInterpolationType (int)
virtual int | GetInterpolationType ()
void | SetInterpolationTypeToNearest ()
void | SetInterpolationTypeToLinear ()
const char * | GetInterpolationTypeAsString (void)
void | SetColor (int index, vtkPiecewiseFunction *function)
void | SetColor (vtkPiecewiseFunction *f)
void | SetColor (int index, vtkColorTransferFunction *function)
void | SetColor (vtkColorTransferFunction *f)
int | GetColorChannels (int index)
int | GetColorChannels ()
vtkPiecewiseFunction * | GetGrayTransferFunction (int index)
vtkPiecewiseFunction * | GetGrayTransferFunction ()
vtkColorTransferFunction * | GetRGBTransferFunction (int index)
vtkColorTransferFunction * | GetRGBTransferFunction ()
void | SetScalarOpacity (int index, vtkPiecewiseFunction *function)
void | SetScalarOpacity (vtkPiecewiseFunction *f)
vtkPiecewiseFunction * | GetScalarOpacity (int index)
vtkPiecewiseFunction * | GetScalarOpacity ()
void | SetGradientOpacity (int index, vtkPiecewiseFunction *function)
void | SetGradientOpacity (vtkPiecewiseFunction *function)
vtkPiecewiseFunction * | GetGradientOpacity (int index)
vtkPiecewiseFunction * | GetGradientOpacity ()
void | SetShade (int index, int value)
void | SetShade (int value)
int | GetShade (int index)
int | GetShade ()
void | ShadeOn (int index)
void | ShadeOn ()
void | ShadeOff (int index)
void | ShadeOff ()
void | SetAmbient (int index, float value)
void | SetAmbient (float value)
float | GetAmbient (int index)
float | GetAmbient ()
void | SetDiffuse (int index, float value)
void | SetDiffuse (float value)
float | GetDiffuse (int index)
float | GetDiffuse ()
void | SetSpecular (int index, float value)
void | SetSpecular (float value)
float | GetSpecular (int index)
float | GetSpecular ()
void | SetSpecularPower (int index, float value)
void | SetSpecularPower (float value)
float | GetSpecularPower (int index)
float | GetSpecularPower ()
vtkTimeStamp | GetGradientOpacityMTime (int index)
vtkTimeStamp | GetGradientOpacityMTime ()
vtkTimeStamp | GetScalarOpacityMTime (int index)
vtkTimeStamp | GetScalarOpacityMTime ()
vtkTimeStamp | GetRGBTransferFunctionMTime (int index)
vtkTimeStamp | GetRGBTransferFunctionMTime ()
vtkTimeStamp | GetGrayTransferFunctionMTime (int index)
vtkTimeStamp | GetGrayTransferFunctionMTime ()
## Static Public Methods
vtkVolumeProperty * | New ()
int | IsTypeOf (const char *type)
vtkVolumeProperty * | SafeDownCast (vtkObject *o)
## Protected Methods
| vtkVolumeProperty ()
| ~vtkVolumeProperty ()
## Protected Attributes
int | InterpolationType
int | ColorChannels [VTK_MAX_VRCOMP]
vtkPiecewiseFunction * | GrayTransferFunction [VTK_MAX_VRCOMP]
vtkTimeStamp | GrayTransferFunctionMTime [VTK_MAX_VRCOMP]
vtkColorTransferFunction * | RGBTransferFunction [VTK_MAX_VRCOMP]
vtkTimeStamp | RGBTransferFunctionMTime [VTK_MAX_VRCOMP]
vtkPiecewiseFunction * | ScalarOpacity [VTK_MAX_VRCOMP]
vtkTimeStamp | ScalarOpacityMTime [VTK_MAX_VRCOMP]
vtkPiecewiseFunction * | GradientOpacity [VTK_MAX_VRCOMP]
vtkTimeStamp | GradientOpacityMTime [VTK_MAX_VRCOMP]
int | Shade [VTK_MAX_VRCOMP]
float | Ambient [VTK_MAX_VRCOMP]
float | Diffuse [VTK_MAX_VRCOMP]
float | Specular [VTK_MAX_VRCOMP]
float | SpecularPower [VTK_MAX_VRCOMP]

## Member Typedef Documentation

typedef vtkObject vtkVolumeProperty::Superclass

| Reimplemented from vtkObject. Definition at line 78 of file vtkVolumeProperty.h.

## Constructor & Destructor Documentation

vtkVolumeProperty::vtkVolumeProperty | ( |  | ) | `[protected]`

vtkVolumeProperty::~vtkVolumeProperty | ( |  | ) | `[protected]`

## Member Function Documentation

vtkVolumeProperty* vtkVolumeProperty::New | ( |  | ) | `[static]`

| Create an object with Debug turned off, modified time initialized to zero, and reference counting on. Reimplemented from vtkObject.

virtual const char* vtkVolumeProperty::GetClassName | ( |  | ) | `[virtual]`

| Reimplemented from vtkObject.

int vtkVolumeProperty::IsTypeOf | ( | const char * | type | ) | `[static]`

| Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkObject.

virtual int vtkVolumeProperty::IsA | ( | const char * | type | ) | `[virtual]`

| Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkObject.

vtkVolumeProperty* vtkVolumeProperty::SafeDownCast | ( | vtkObject * | o | ) | `[static]`

| Reimplemented from vtkObject.

void vtkVolumeProperty::PrintSelf | ( | ostream & | os,
|  | vtkIndent | indent
| ) | `[virtual]`

| Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. Reimplemented from vtkObject.

unsigned long vtkVolumeProperty::GetMTime | ( |  | ) | `[virtual]`

| Get the modified time for this object (or the properties registered with this object). Reimplemented from vtkObject.

virtual void vtkVolumeProperty::SetInterpolationType | ( | int |  | ) | `[virtual]`

| Set the interpolation type for sampling a volume.

virtual int vtkVolumeProperty::GetInterpolationType | ( |  | ) | `[virtual]`

| Set the interpolation type for sampling a volume.

void vtkVolumeProperty::SetInterpolationTypeToNearest | ( |  | ) | `[inline]`

| Set the interpolation type for sampling a volume. Definition at line 91 of file vtkVolumeProperty.h. References VTK_NEAREST_INTERPOLATION.

void vtkVolumeProperty::SetInterpolationTypeToLinear | ( |  | ) | `[inline]`

| Set the interpolation type for sampling a volume. Definition at line 93 of file vtkVolumeProperty.h. References VTK_LINEAR_INTERPOLATION.

const char * vtkVolumeProperty::GetInterpolationTypeAsString | ( | void |  | ) | `[inline]`

| Return the interpolation type as a descriptive character string. Definition at line 294 of file vtkVolumeProperty.h. References InterpolationType, VTK_LINEAR_INTERPOLATION, and VTK_NEAREST_INTERPOLATION.

void vtkVolumeProperty::SetColor | ( | int | index,
|  | vtkPiecewiseFunction * | function
| ) |

| Set the color of a volume to a gray level transfer function for the component indicated by index. This will set the color channels for this component to 1.

void vtkVolumeProperty::SetColor | ( | vtkPiecewiseFunction * | f | ) | `[inline]`

| Set the color of a volume to a gray level transfer function for the component indicated by index. This will set the color channels for this component to 1. Definition at line 103 of file vtkVolumeProperty.h.

void vtkVolumeProperty::SetColor | ( | int | index,
|  | vtkColorTransferFunction * | function
| ) |

| Set the color of a volume to an RGB transfer function for the component indicated by index. This will set the color channels for this component to 3. This will also recompute the color channels

void vtkVolumeProperty::SetColor | ( | vtkColorTransferFunction * | f | ) | `[inline]`

| Set the color of a volume to an RGB transfer function for the component indicated by index. This will set the color channels for this component to 3. This will also recompute the color channels Definition at line 112 of file vtkVolumeProperty.h.

int vtkVolumeProperty::GetColorChannels | ( | int | index | ) |

| Get the number of color channels in the transfer function for the given component.

int vtkVolumeProperty::GetColorChannels | ( |  | ) | `[inline]`

| Get the number of color channels in the transfer function for the given component. Definition at line 119 of file vtkVolumeProperty.h.

vtkPiecewiseFunction* vtkVolumeProperty::GetGrayTransferFunction | ( | int | index | ) |

| Get the gray transfer function.

vtkPiecewiseFunction* vtkVolumeProperty::GetGrayTransferFunction | ( |  | ) | `[inline]`

| Get the gray transfer function. Definition at line 125 of file vtkVolumeProperty.h.

vtkColorTransferFunction* vtkVolumeProperty::GetRGBTransferFunction | ( | int | index | ) |

| Get the RGB transfer function for the given component.

vtkColorTransferFunction* vtkVolumeProperty::GetRGBTransferFunction | ( |  | ) | `[inline]`

| Get the RGB transfer function for the given component. Definition at line 132 of file vtkVolumeProperty.h.

void vtkVolumeProperty::SetScalarOpacity | ( | int | index,
|  | vtkPiecewiseFunction * | function
| ) |

| Set the opacity of a volume to an opacity transfer function based on scalar value for the component indicated by index.

void vtkVolumeProperty::SetScalarOpacity | ( | vtkPiecewiseFunction * | f | ) | `[inline]`

| Set the opacity of a volume to an opacity transfer function based on scalar value for the component indicated by index. Definition at line 140 of file vtkVolumeProperty.h.

vtkPiecewiseFunction* vtkVolumeProperty::GetScalarOpacity | ( | int | index | ) |

| Get the scalar opacity transfer function for the given component.

vtkPiecewiseFunction* vtkVolumeProperty::GetScalarOpacity | ( |  | ) | `[inline]`

| Get the scalar opacity transfer function for the given component. Definition at line 147 of file vtkVolumeProperty.h.

void vtkVolumeProperty::SetGradientOpacity | ( | int | index,
|  | vtkPiecewiseFunction * | function
| ) |

| Set the opacity of a volume to an opacity transfer function based on gradient magnitude for the given component.

void vtkVolumeProperty::SetGradientOpacity | ( | vtkPiecewiseFunction * | function | ) | `[inline]`

| Set the opacity of a volume to an opacity transfer function based on gradient magnitude for the given component. Definition at line 156 of file vtkVolumeProperty.h.

vtkPiecewiseFunction* vtkVolumeProperty::GetGradientOpacity | ( | int | index | ) |

| Get the gradient magnitude opacity transfer function for the given component.

vtkPiecewiseFunction* vtkVolumeProperty::GetGradientOpacity | ( |  | ) | `[inline]`

| Get the gradient magnitude opacity transfer function for the given component. Definition at line 164 of file vtkVolumeProperty.h.

void vtkVolumeProperty::SetShade | ( | int | index,
|  | int | value
| ) |

| Set/Get the shading of a volume. If shading is turned off, then the mapper for the volume will not perform shading calculations. If shading is turned on, the mapper may perform shading calculations - in some cases shading does not apply (for example, in a maximum intensity projection) and therefore shading will not be performed even if this flag is on. For a compositing type of mapper, turning shading off is generally the same as setting ambient=1, diffuse=0, specular=0. Shading can be independently turned on/off per component.

void vtkVolumeProperty::SetShade | ( | int | value | ) | `[inline]`

| Set/Get the shading of a volume. If shading is turned off, then the mapper for the volume will not perform shading calculations. If shading is turned on, the mapper may perform shading calculations - in some cases shading does not apply (for example, in a maximum intensity projection) and therefore shading will not be performed even if this flag is on. For a compositing type of mapper, turning shading off is generally the same as setting ambient=1, diffuse=0, specular=0. Shading can be independently turned on/off per component. Definition at line 178 of file vtkVolumeProperty.h.

int vtkVolumeProperty::GetShade | ( | int | index | ) |

| Set/Get the shading of a volume. If shading is turned off, then the mapper for the volume will not perform shading calculations. If shading is turned on, the mapper may perform shading calculations - in some cases shading does not apply (for example, in a maximum intensity projection) and therefore shading will not be performed even if this flag is on. For a compositing type of mapper, turning shading off is generally the same as setting ambient=1, diffuse=0, specular=0. Shading can be independently turned on/off per component.

int vtkVolumeProperty::GetShade | ( |  | ) | `[inline]`

| Set/Get the shading of a volume. If shading is turned off, then the mapper for the volume will not perform shading calculations. If shading is turned on, the mapper may perform shading calculations - in some cases shading does not apply (for example, in a maximum intensity projection) and therefore shading will not be performed even if this flag is on. For a compositing type of mapper, turning shading off is generally the same as setting ambient=1, diffuse=0, specular=0. Shading can be independently turned on/off per component. Definition at line 180 of file vtkVolumeProperty.h.

void vtkVolumeProperty::ShadeOn | ( | int | index | ) |

| Set/Get the shading of a volume. If shading is turned off, then the mapper for the volume will not perform shading calculations. If shading is turned on, the mapper may perform shading calculations - in some cases shading does not apply (for example, in a maximum intensity projection) and therefore shading will not be performed even if this flag is on. For a compositing type of mapper, turning shading off is generally the same as setting ambient=1, diffuse=0, specular=0. Shading can be independently turned on/off per component.

void vtkVolumeProperty::ShadeOn | ( |  | ) | `[inline]`

| Set/Get the shading of a volume. If shading is turned off, then the mapper for the volume will not perform shading calculations. If shading is turned on, the mapper may perform shading calculations - in some cases shading does not apply (for example, in a maximum intensity projection) and therefore shading will not be performed even if this flag is on. For a compositing type of mapper, turning shading off is generally the same as setting ambient=1, diffuse=0, specular=0. Shading can be independently turned on/off per component. Definition at line 182 of file vtkVolumeProperty.h.

void vtkVolumeProperty::ShadeOff | ( | int | index | ) |

| Set/Get the shading of a volume. If shading is turned off, then the mapper for the volume will not perform shading calculations. If shading is turned on, the mapper may perform shading calculations - in some cases shading does not apply (for example, in a maximum intensity projection) and therefore shading will not be performed even if this flag is on. For a compositing type of mapper, turning shading off is generally the same as setting ambient=1, diffuse=0, specular=0. Shading can be independently turned on/off per component.

void vtkVolumeProperty::ShadeOff | ( |  | ) | `[inline]`

| Set/Get the shading of a volume. If shading is turned off, then the mapper for the volume will not perform shading calculations. If shading is turned on, the mapper may perform shading calculations - in some cases shading does not apply (for example, in a maximum intensity projection) and therefore shading will not be performed even if this flag is on. For a compositing type of mapper, turning shading off is generally the same as setting ambient=1, diffuse=0, specular=0. Shading can be independently turned on/off per component. Definition at line 184 of file vtkVolumeProperty.h.

void vtkVolumeProperty::SetAmbient | ( | int | index,
|  | float | value
| ) |

| Set/Get the ambient lighting coefficient.

void vtkVolumeProperty::SetAmbient | ( | float | value | ) | `[inline]`

| Set/Get the ambient lighting coefficient. Definition at line 191 of file vtkVolumeProperty.h.

float vtkVolumeProperty::GetAmbient | ( | int | index | ) |

| Set/Get the ambient lighting coefficient.

float vtkVolumeProperty::GetAmbient | ( |  | ) | `[inline]`

| Set/Get the ambient lighting coefficient. Definition at line 193 of file vtkVolumeProperty.h.

void vtkVolumeProperty::SetDiffuse | ( | int | index,
|  | float | value
| ) |

| Set/Get the diffuse lighting coefficient.

void vtkVolumeProperty::SetDiffuse | ( | float | value | ) | `[inline]`

| Set/Get the diffuse lighting coefficient. Definition at line 200 of file vtkVolumeProperty.h.

float vtkVolumeProperty::GetDiffuse | ( | int | index | ) |

| Set/Get the diffuse lighting coefficient.

float vtkVolumeProperty::GetDiffuse | ( |  | ) | `[inline]`

| Set/Get the diffuse lighting coefficient. Definition at line 202 of file vtkVolumeProperty.h.

void vtkVolumeProperty::SetSpecular | ( | int | index,
|  | float | value
| ) |

| Set/Get the specular lighting coefficient.

void vtkVolumeProperty::SetSpecular | ( | float | value | ) | `[inline]`

| Set/Get the specular lighting coefficient. Definition at line 208 of file vtkVolumeProperty.h.

float vtkVolumeProperty::GetSpecular | ( | int | index | ) |

| Set/Get the specular lighting coefficient.

float vtkVolumeProperty::GetSpecular | ( |  | ) | `[inline]`

| Set/Get the specular lighting coefficient. Definition at line 210 of file vtkVolumeProperty.h.

void vtkVolumeProperty::SetSpecularPower | ( | int | index,
|  | float | value
| ) |

| Set/Get the specular power.

void vtkVolumeProperty::SetSpecularPower | ( | float | value | ) | `[inline]`

| Set/Get the specular power. Definition at line 216 of file vtkVolumeProperty.h.

float vtkVolumeProperty::GetSpecularPower | ( | int | index | ) |

| Set/Get the specular power.

float vtkVolumeProperty::GetSpecularPower | ( |  | ) | `[inline]`

| Set/Get the specular power. Definition at line 218 of file vtkVolumeProperty.h.

void vtkVolumeProperty::UpdateMTimes | ( |  | ) |

| WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE UpdateMTimes performs a Modified() on all TimeStamps. This is used by vtkVolume when the property is set, so that any other object that might have been caching information for the property will rebuild.

vtkTimeStamp vtkVolumeProperty::GetGradientOpacityMTime | ( | int | index | ) |

| WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Get the time that the gradient opacity transfer function was set

vtkTimeStamp vtkVolumeProperty::GetGradientOpacityMTime | ( |  | ) | `[inline]`

| WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Get the time that the gradient opacity transfer function was set Definition at line 232 of file vtkVolumeProperty.h.

vtkTimeStamp vtkVolumeProperty::GetScalarOpacityMTime | ( | int | index | ) |

| WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Get the time that the scalar opacity transfer function was set.

vtkTimeStamp vtkVolumeProperty::GetScalarOpacityMTime | ( |  | ) | `[inline]`

| WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Get the time that the scalar opacity transfer function was set. Definition at line 240 of file vtkVolumeProperty.h.

vtkTimeStamp vtkVolumeProperty::GetRGBTransferFunctionMTime | ( | int | index | ) |

| WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Get the time that the RGBTransferFunction was set

vtkTimeStamp vtkVolumeProperty::GetRGBTransferFunctionMTime | ( |  | ) | `[inline]`

| WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Get the time that the RGBTransferFunction was set Definition at line 248 of file vtkVolumeProperty.h.

vtkTimeStamp vtkVolumeProperty::GetGrayTransferFunctionMTime | ( | int | index | ) |

| WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Get the time that the GrayTransferFunction was set

vtkTimeStamp vtkVolumeProperty::GetGrayTransferFunctionMTime | ( |  | ) | `[inline]`

| WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Get the time that the GrayTransferFunction was set Definition at line 256 of file vtkVolumeProperty.h.

## Member Data Documentation

int vtkVolumeProperty::InterpolationType`[protected]`

| Definition at line 266 of file vtkVolumeProperty.h. Referenced by GetInterpolationTypeAsString().

int vtkVolumeProperty::ColorChannels[VTK_MAX_VRCOMP]`[protected]`

| Definition at line 268 of file vtkVolumeProperty.h.

vtkPiecewiseFunction* vtkVolumeProperty::GrayTransferFunction[VTK_MAX_VRCOMP]`[protected]`

| Definition at line 270 of file vtkVolumeProperty.h.

vtkTimeStamp vtkVolumeProperty::GrayTransferFunctionMTime[VTK_MAX_VRCOMP]`[protected]`

| Definition at line 271 of file vtkVolumeProperty.h.

vtkColorTransferFunction* vtkVolumeProperty::RGBTransferFunction[VTK_MAX_VRCOMP]`[protected]`

| Definition at line 273 of file vtkVolumeProperty.h.

vtkTimeStamp vtkVolumeProperty::RGBTransferFunctionMTime[VTK_MAX_VRCOMP]`[protected]`

| Definition at line 274 of file vtkVolumeProperty.h.

vtkPiecewiseFunction* vtkVolumeProperty::ScalarOpacity[VTK_MAX_VRCOMP]`[protected]`

| Definition at line 276 of file vtkVolumeProperty.h.

vtkTimeStamp vtkVolumeProperty::ScalarOpacityMTime[VTK_MAX_VRCOMP]`[protected]`

| Definition at line 277 of file vtkVolumeProperty.h.

vtkPiecewiseFunction* vtkVolumeProperty::GradientOpacity[VTK_MAX_VRCOMP]`[protected]`

| Definition at line 279 of file vtkVolumeProperty.h.

vtkTimeStamp vtkVolumeProperty::GradientOpacityMTime[VTK_MAX_VRCOMP]`[protected]`

| Definition at line 280 of file vtkVolumeProperty.h.

int vtkVolumeProperty::Shade[VTK_MAX_VRCOMP]`[protected]`

| Definition at line 282 of file vtkVolumeProperty.h.

float vtkVolumeProperty::Ambient[VTK_MAX_VRCOMP]`[protected]`

| Definition at line 283 of file vtkVolumeProperty.h.

float vtkVolumeProperty::Diffuse[VTK_MAX_VRCOMP]`[protected]`

| Definition at line 284 of file vtkVolumeProperty.h.

float vtkVolumeProperty::Specular[VTK_MAX_VRCOMP]`[protected]`

| Definition at line 285 of file vtkVolumeProperty.h.

float vtkVolumeProperty::SpecularPower[VTK_MAX_VRCOMP]`[protected]`

| Definition at line 286 of file vtkVolumeProperty.h.

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

- Rendering/vtkVolumeProperty.h