55 #ifndef vtkVolumeProperty_h 56 #define vtkVolumeProperty_h 58 #include "vtkRenderingCoreModule.h" 102 vtkSetClampMacro(IndependentComponents,
int, 0, 1);
103 vtkGetMacro(IndependentComponents,
int);
112 vtkSetClampMacro(InterpolationType,
int,
114 vtkGetMacro(InterpolationType,
int);
119 const char *GetInterpolationTypeAsString(
void);
127 virtual void SetComponentWeight(
int index,
double value);
128 virtual double GetComponentWeight(
int index);
138 { this->SetColor(0,
function); }
148 { this->SetColor(0,
function); }
154 int GetColorChannels(
int index);
156 {
return this->GetColorChannels(0); }
165 {
return this->GetGrayTransferFunction(0); }
174 {
return this->GetRGBTransferFunction(0); }
182 { this->SetScalarOpacity(0,
function); }
191 {
return this->GetScalarOpacity(0); }
200 void SetScalarOpacityUnitDistance(
int index,
double distance);
202 { this->SetScalarOpacityUnitDistance(0, distance); }
203 double GetScalarOpacityUnitDistance(
int index);
205 {
return this->GetScalarOpacityUnitDistance(0); }
215 { this->SetGradientOpacity(0,
function); }
227 this->SetTransferFunction2D(0,
function);
233 return this->GetTransferFunction2D(0);
249 vtkSetClampMacro(TransferFunctionMode,
int, 0, 1)
250 vtkGetMacro(TransferFunctionMode,
int)
263 {
return this->GetGradientOpacity(0); }
273 virtual void SetDisableGradientOpacity(
int index,
int value);
275 { this->SetDisableGradientOpacity(0,
value); }
277 { this->SetDisableGradientOpacity(
index, 1); }
279 { this->DisableGradientOpacityOn(0); }
281 { this->SetDisableGradientOpacity(
index, 0); }
283 { this->DisableGradientOpacityOff(0); }
284 virtual int GetDisableGradientOpacity(
int index);
286 {
return this->GetDisableGradientOpacity(0); }
289 {
return this->GetStoredGradientOpacity(0); }
299 switch(this->TransferFunctionMode) {
300 case TF_1D:
return (this->GradientOpacity[
index] !=
nullptr);
301 case TF_2D:
return true;
329 { this->SetShade(0,
value); }
330 int GetShade(
int index);
332 {
return this->GetShade(0); }
333 void ShadeOn(
int index);
335 { this->ShadeOn(0); }
336 void ShadeOff(
int index);
338 { this->ShadeOff(0); }
347 { this->SetAmbient(0,
value); }
348 double GetAmbient(
int index);
350 {
return this->GetAmbient(0); }
359 { this->SetDiffuse(0,
value); }
360 double GetDiffuse(
int index);
362 {
return this->GetDiffuse(0); }
371 { this->SetSpecular(0,
value); }
372 double GetSpecular(
int index);
374 {
return this->GetSpecular(0); }
381 void SetSpecularPower(
int index,
double value);
383 { this->SetSpecularPower(0,
value); }
384 double GetSpecularPower(
int index);
386 {
return this->GetSpecularPower(0); }
404 {
return this->GetGradientOpacityMTime(0); }
412 {
return this->GetScalarOpacityMTime(0); }
420 {
return this->GetRGBTransferFunctionMTime(0); }
428 {
return this->GetGrayTransferFunctionMTime(0); }
441 return this->GetTransferFunction2DMTime(0);
444 virtual void CreateDefaultGradientOpacity(
int index);
492 return "Nearest Neighbor";
int GetShade()
Set/Get the shading of a volume.
vtkColorTransferFunction * GetRGBTransferFunction()
virtual void DisableGradientOpacityOn()
Enable/Disable the gradient opacity function for the given component.
abstract base class for most VTK objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
double GetDiffuse()
Set/Get the diffuse lighting coefficient.
void SetAmbient(double value)
Set/Get the ambient lighting coefficient.
Defines a 1D piecewise function.
void SetSpecularPower(double value)
Set/Get the specular power.
vtkTypeUInt32 vtkMTimeType
void SetColor(vtkColorTransferFunction *function)
vtkPiecewiseFunction * GetGrayTransferFunction()
record modification and/or execution time
#define VTK_LINEAR_INTERPOLATION
void SetScalarOpacity(vtkPiecewiseFunction *function)
double GetSpecular()
Set/Get the specular lighting coefficient.
vtkImageData * GetTransferFunction2D()
Color-opacity transfer function mode.
void SetGradientOpacity(vtkPiecewiseFunction *function)
void SetColor(vtkPiecewiseFunction *function)
double GetScalarOpacityUnitDistance()
Set/Get the unit distance on which the scalar opacity transfer function is defined.
TransferMode
Color-opacity transfer function mode.
vtkPiecewiseFunction * GetScalarOpacity()
vtkTimeStamp GetRGBTransferFunctionMTime()
const char * GetInterpolationTypeAsString(void)
Return the interpolation type as a descriptive character string.
vtkPiecewiseFunction * GetStoredGradientOpacity()
Enable/Disable the gradient opacity function for the given component.
vtkTimeStamp GetScalarOpacityMTime()
a simple class to control print indentation
topologically and geometrically regular array of data
bool HasGradientOpacity(int index=0)
Check whether or not we have the gradient opacity.
vtkTimeStamp GetGrayTransferFunctionMTime()
void ShadeOff()
Set/Get the shading of a volume.
virtual vtkMTimeType GetMTime()
Return this object's modified time.
void SetInterpolationTypeToNearest()
Set the interpolation type for sampling a volume.
int IndependentComponents
represents the common properties for rendering a volume.
virtual void SetDisableGradientOpacity(int value)
Enable/Disable the gradient opacity function for the given component.
void SetSpecular(double value)
Set/Get the specular lighting coefficient.
void SetShade(int value)
Set/Get the shading of a volume.
Defines a transfer function for mapping a property to an RGB color value.
vtkTimeStamp GetTransferFunction2DMTime()
void SetTransferFunction2D(vtkImageData *function)
Color-opacity transfer function mode.
void SetDiffuse(double value)
Set/Get the diffuse lighting coefficient.
void SetInterpolationTypeToLinear()
Set the interpolation type for sampling a volume.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
virtual int GetDisableGradientOpacity()
Enable/Disable the gradient opacity function for the given component.
vtkTimeStamp GetGradientOpacityMTime()
virtual void DisableGradientOpacityOff(int index)
Enable/Disable the gradient opacity function for the given component.
virtual void DisableGradientOpacityOn(int index)
Enable/Disable the gradient opacity function for the given component.
#define VTK_NEAREST_INTERPOLATION
void ShadeOn()
Set/Get the shading of a volume.
virtual void DisableGradientOpacityOff()
Enable/Disable the gradient opacity function for the given component.
void SetScalarOpacityUnitDistance(double distance)
Set/Get the unit distance on which the scalar opacity transfer function is defined.
double GetAmbient()
Set/Get the ambient lighting coefficient.
double GetSpecularPower()
Set/Get the specular power.