Go to the documentation of this file.
55 #ifndef vtkVolumeProperty_h
56 #define vtkVolumeProperty_h
59 #include "vtkRenderingCoreModule.h"
114 vtkSetClampMacro(InterpolationType,
int,
116 vtkGetMacro(InterpolationType,
int);
121 const char *GetInterpolationTypeAsString(
void);
140 { this->SetColor(0,
function); }
150 { this->SetColor(0,
function); }
158 {
return this->GetColorChannels(0); }
167 {
return this->GetGrayTransferFunction(0); }
176 {
return this->GetRGBTransferFunction(0); }
184 { this->SetScalarOpacity(0,
function); }
193 {
return this->GetScalarOpacity(0); }
204 { this->SetScalarOpacityUnitDistance(0, distance); }
207 {
return this->GetScalarOpacityUnitDistance(0); }
217 { this->SetGradientOpacity(0,
function); }
229 this->SetTransferFunction2D(0,
function);
235 return this->GetTransferFunction2D(0);
251 vtkSetClampMacro(TransferFunctionMode,
int, 0, 1)
252 vtkGetMacro(TransferFunctionMode,
int)
265 {
return this->GetGradientOpacity(0); }
277 { this->SetDisableGradientOpacity(0,
value); }
279 { this->SetDisableGradientOpacity(
index, 1); }
281 { this->DisableGradientOpacityOn(0); }
283 { this->SetDisableGradientOpacity(
index, 0); }
285 { this->DisableGradientOpacityOff(0); }
288 {
return this->GetDisableGradientOpacity(0); }
291 {
return this->GetStoredGradientOpacity(0); }
301 switch(this->TransferFunctionMode) {
302 case TF_1D:
return (this->GradientOpacity[
index] !=
nullptr);
303 case TF_2D:
return true;
331 { this->SetShade(0,
value); }
334 {
return this->GetShade(0); }
337 { this->ShadeOn(0); }
340 { this->ShadeOff(0); }
349 { this->SetAmbient(0,
value); }
352 {
return this->GetAmbient(0); }
361 { this->SetDiffuse(0,
value); }
364 {
return this->GetDiffuse(0); }
373 { this->SetSpecular(0,
value); }
376 {
return this->GetSpecular(0); }
385 { this->SetSpecularPower(0,
value); }
388 {
return this->GetSpecularPower(0); }
412 {
return this->GetGradientOpacityMTime(0); }
420 {
return this->GetScalarOpacityMTime(0); }
428 {
return this->GetRGBTransferFunctionMTime(0); }
436 {
return this->GetGrayTransferFunctionMTime(0); }
448 vtkSetMacro(UseClippedVoxelIntensity,
int);
449 vtkGetMacro(UseClippedVoxelIntensity,
int);
450 vtkBooleanMacro(UseClippedVoxelIntensity,
int);
463 vtkSetMacro(ClippedVoxelIntensity,
double);
464 vtkGetMacro(ClippedVoxelIntensity,
double);
479 return this->GetTransferFunction2DMTime(0);
538 return "Nearest Neighbor";
void SetTransferFunction2D(int index, vtkImageData *function)
Set/Get a 2D transfer function.
void SetScalarOpacityUnitDistance(int index, double distance)
Set/Get the unit distance on which the scalar opacity transfer function is defined.
double GetSpecular(int index)
vtkPiecewiseFunction * GetScalarOpacity(int index)
Get the scalar opacity transfer function for the given component.
virtual void DisableGradientOpacityOn(int index)
virtual void DisableGradientOpacityOff()
void SetScalarOpacityUnitDistance(double distance)
void SetDiffuse(int index, double value)
Set/Get the diffuse lighting coefficient.
void SetGradientOpacity(int index, vtkPiecewiseFunction *function)
Set the opacity of a volume to an opacity transfer function based on gradient magnitude for the given...
vtkContourValues * GetIsoSurfaceValues()
Get contour values for isosurface blending mode.
vtkPiecewiseFunction * GetGrayTransferFunction()
virtual double GetComponentWeight(int index)
double GetScalarOpacityUnitDistance(int index)
static vtkVolumeProperty * New()
void SetAmbient(int index, double value)
Set/Get the ambient lighting coefficient.
record modification and/or execution time
vtkColorTransferFunction * GetRGBTransferFunction()
void SetSpecularPower(double value)
vtkMTimeType GetMTime() override
Get the modified time for this object (or the properties registered with this object).
void SetColor(vtkColorTransferFunction *function)
virtual void DisableGradientOpacityOn()
abstract base class for most VTK objects
void SetShade(int index, int value)
Set/Get the shading of a volume.
double ClippedVoxelIntensity
vtkTimeStamp GetRGBTransferFunctionMTime()
void SetScalarOpacity(vtkPiecewiseFunction *function)
virtual void SetComponentWeight(int index, double value)
Set/Get the scalar component weights.
vtkImageData * GetTransferFunction2D()
vtkTypeBool IndependentComponents
#define VTK_NEAREST_INTERPOLATION
Defines a transfer function for mapping a property to an RGB color value.
void SetGradientOpacity(vtkPiecewiseFunction *function)
vtkTimeStamp GetScalarOpacityMTime(int index)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Get the time that the scalar opacity transfer...
vtkTimeStamp GetRGBTransferFunctionMTime(int index)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Get the time that the RGBTransferFunction was...
vtkPiecewiseFunction * GetScalarOpacity()
double GetScalarOpacityUnitDistance()
vtkColorTransferFunction * GetRGBTransferFunction(int index)
Get the RGB transfer function for the given component.
vtkTimeStamp GetScalarOpacityMTime()
void SetColor(vtkPiecewiseFunction *function)
void DeepCopy(vtkVolumeProperty *p)
double GetSpecularPower(int index)
bool HasGradientOpacity(int index=0)
Check whether or not we have the gradient opacity.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageData * GetTransferFunction2D(int index)
vtkPiecewiseFunction * GetGrayTransferFunction(int index)
Get the gray transfer function.
helper object to manage setting and generating contour values
TransferMode
Color-opacity transfer function mode.
void SetSpecular(int index, double value)
Set/Get the specular lighting coefficient.
vtkPiecewiseFunction * GetStoredGradientOpacity()
topologically and geometrically regular array of data
a simple class to control print indentation
void SetColor(int index, vtkColorTransferFunction *function)
Set the color of a volume to an RGB transfer function for the component indicated by index.
vtkTimeStamp GetGrayTransferFunctionMTime()
void SetColor(int index, vtkPiecewiseFunction *function)
Set the color of a volume to a gray level transfer function for the component indicated by index.
~vtkVolumeProperty() override
#define VTK_LINEAR_INTERPOLATION
virtual void SetDisableGradientOpacity(int value)
virtual int GetDisableGradientOpacity(int index)
void SetSpecular(double value)
int UseClippedVoxelIntensity
const char * GetInterpolationTypeAsString(void)
Return the interpolation type as a descriptive character string.
Defines a 1D piecewise function.
void SetScalarOpacity(int index, vtkPiecewiseFunction *function)
Set the opacity of a volume to an opacity transfer function based on scalar value for the component i...
int GetColorChannels(int index)
Get the number of color channels in the transfer function for the given component.
void SetSpecularPower(int index, double value)
Set/Get the specular power.
vtkTimeStamp GetTransferFunction2DMTime()
vtkTimeStamp GetGradientOpacityMTime()
vtkTimeStamp GetTransferFunction2DMTime(int index)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Get the time when the TransferFunction2D was ...
virtual void DisableGradientOpacityOff(int index)
vtkTimeStamp GetGradientOpacityMTime(int index)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Get the time that the gradient opacity transf...
vtkPiecewiseFunction * GetStoredGradientOpacity(int index)
void SetInterpolationTypeToNearest()
vtkTimeStamp GetGrayTransferFunctionMTime(int index)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Get the time that the GrayTransferFunction wa...
virtual int GetDisableGradientOpacity()
void UpdateMTimes()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE UpdateMTimes performs a Modified() on all Tim...
virtual void CreateDefaultGradientOpacity(int index)
vtkNew< vtkContourValues > IsoSurfaceValues
Contour values for isosurface blend mode.
void SetInterpolationTypeToLinear()
void SetTransferFunction2D(vtkImageData *function)
double GetDiffuse(int index)
double GetSpecularPower()
virtual void SetDisableGradientOpacity(int index, int value)
Enable/Disable the gradient opacity function for the given component.
represents the common properties for rendering a volume.
double GetAmbient(int index)
vtkTypeUInt32 vtkMTimeType
void SetAmbient(double value)
void SetDiffuse(double value)