55 #ifndef vtkVolumeProperty_h 56 #define vtkVolumeProperty_h 59 #include "vtkRenderingCoreModule.h" 104 vtkSetClampMacro(IndependentComponents,
vtkTypeBool, 0, 1);
106 vtkBooleanMacro(IndependentComponents,
vtkTypeBool);
114 vtkSetClampMacro(InterpolationType,
int,
116 vtkGetMacro(InterpolationType,
int);
121 const char *GetInterpolationTypeAsString(
void);
129 virtual void SetComponentWeight(
int index,
double value);
130 virtual double GetComponentWeight(
int index);
140 { this->SetColor(0,
function); }
150 { this->SetColor(0,
function); }
156 int GetColorChannels(
int index);
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); }
202 void SetScalarOpacityUnitDistance(
int index,
double distance);
204 { this->SetScalarOpacityUnitDistance(0, distance); }
205 double GetScalarOpacityUnitDistance(
int index);
207 {
return this->GetScalarOpacityUnitDistance(0); }
217 { this->SetGradientOpacity(0,
function); }
226 void SetTransferFunction2D(
int index,
vtkImageData*
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); }
275 virtual void SetDisableGradientOpacity(
int index,
int value);
277 { this->SetDisableGradientOpacity(0, value); }
279 { this->SetDisableGradientOpacity(index, 1); }
281 { this->DisableGradientOpacityOn(0); }
283 { this->SetDisableGradientOpacity(index, 0); }
285 { this->DisableGradientOpacityOff(0); }
286 virtual int GetDisableGradientOpacity(
int index);
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;
329 void SetShade(
int index,
int value);
331 { this->SetShade(0,value); }
332 int GetShade(
int index);
334 {
return this->GetShade(0); }
335 void ShadeOn(
int index);
337 { this->ShadeOn(0); }
338 void ShadeOff(
int index);
340 { this->ShadeOff(0); }
347 void SetAmbient(
int index,
double value);
349 { this->SetAmbient(0, value); }
350 double GetAmbient(
int index);
352 {
return this->GetAmbient(0); }
359 void SetDiffuse(
int index,
double value);
361 { this->SetDiffuse(0, value); }
362 double GetDiffuse(
int index);
364 {
return this->GetDiffuse(0); }
371 void SetSpecular(
int index,
double value);
373 { this->SetSpecular(0, value); }
374 double GetSpecular(
int index);
376 {
return this->GetSpecular(0); }
383 void SetSpecularPower(
int index,
double value);
385 { this->SetSpecularPower(0, value); }
386 double GetSpecularPower(
int index);
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);
482 virtual void CreateDefaultGradientOpacity(
int index);
538 return "Nearest Neighbor";
int GetShade()
Set/Get the shading of a volume.
vtkColorTransferFunction * GetRGBTransferFunction()
helper object to manage setting and generating contour values
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
vtkTypeBool IndependentComponents
void SetColor(vtkColorTransferFunction *function)
vtkPiecewiseFunction * GetGrayTransferFunction()
record modification and/or execution time
#define VTK_LINEAR_INTERPOLATION
double ClippedVoxelIntensity
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.
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.
int UseClippedVoxelIntensity
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.
vtkNew< vtkContourValues > IsoSurfaceValues
Contour values for isosurface blend mode.
void SetDiffuse(double value)
Set/Get the diffuse lighting coefficient.
void SetInterpolationTypeToLinear()
Set the interpolation type for sampling a volume.
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.