49 #ifndef vtkVolumeProperty_h
50 #define vtkVolumeProperty_h
55 #include "vtkRenderingCoreModule.h"
61 #include <unordered_map>
63 VTK_ABI_NAMESPACE_BEGIN
106 vtkSetClampMacro(IndependentComponents,
vtkTypeBool, 0, 1);
108 vtkBooleanMacro(IndependentComponents,
vtkTypeBool);
117 vtkGetMacro(InterpolationType,
int);
120 const char* GetInterpolationTypeAsString();
128 virtual void SetComponentWeight(
int index,
double value);
129 virtual double GetComponentWeight(
int index);
153 int GetColorChannels(
int index);
166 SetColor(index,
function);
180 SetColor(index,
function);
210 SetScalarOpacity(index,
function);
223 void SetScalarOpacityUnitDistance(
int index,
double distance);
225 void SetScalarOpacityUnitDistance(
double distance)
227 this->SetScalarOpacityUnitDistance(0, distance);
229 double GetScalarOpacityUnitDistance(
int index);
251 this->SetGradientOpacity(index,
function);
286 vtkSetClampMacro(TransferFunctionMode,
int, 0, 1);
287 vtkGetMacro(TransferFunctionMode,
int);
313 virtual void SetDisableGradientOpacity(
int index,
int value);
320 virtual int GetDisableGradientOpacity(
int index);
335 switch (this->TransferFunctionMode)
338 return (this->GradientOpacity[
index] !=
nullptr);
373 int GetShade(
int index);
375 void ShadeOn(
int index);
377 void ShadeOff(
int index);
387 double GetAmbient(
int index);
397 double GetDiffuse(
int index);
407 double GetSpecular(
int index);
415 void SetSpecularPower(
int index,
double value);
417 double GetSpecularPower(
int index);
444 vtkSetClampMacro(ScatteringAnisotropy,
float, -1.0, 1.0);
445 vtkGetMacro(ScatteringAnisotropy,
float);
495 vtkSetMacro(UseClippedVoxelIntensity,
int);
496 vtkGetMacro(UseClippedVoxelIntensity,
int);
497 vtkBooleanMacro(UseClippedVoxelIntensity,
int);
510 vtkSetMacro(ClippedVoxelIntensity,
double);
511 vtkGetMacro(ClippedVoxelIntensity,
double);
560 std::size_t GetNumberOfLabels();
566 std::set<int> GetLabelMapLabels();
579 virtual void CreateDefaultGradientOpacity(
int index);
586 float ScatteringAnisotropy = 0.0;
636 std::unordered_map<int, vtkColorTransferFunction*>
LabelColor;
653 return "Nearest Neighbor";
662 VTK_ABI_NAMESPACE_END
abstract interface for implicit functions
void SetTransferFunctionModeTo2D()
Color-opacity transfer function mode.
int GetShade()
Set/Get the shading of a volume.
vtkSmartPointer< vtkImplicitFunction > SliceFunction
Function used for slice.
vtkColorTransferFunction * GetRGBTransferFunction()
helper object to manage setting and generating contour values
int GetNumberOfGrayTransferFunctions()
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()
bool HasLabelGradientOpacity()
record modification and/or execution time
void SetScalarOpacityFunction(int index, vtkPiecewiseFunction *function)
Get/Set the scalar opacity transfer function for the given component.
#define VTK_LINEAR_INTERPOLATION
#define VTK_MARSHAL_EXCLUDE_REASON_IS_REDUNDANT
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)
std::unordered_map< int, vtkPiecewiseFunction * > LabelGradientOpacity
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.
void SetTransferFunctionModeTo1D()
Color-opacity transfer function mode.
vtkPiecewiseFunction * GetScalarOpacity()
void SetRGBTransferFunction(int index, vtkColorTransferFunction *function)
vtkTimeStamp GetRGBTransferFunctionMTime()
void SetGrayTransferFunction(int index, vtkPiecewiseFunction *function)
vtkPiecewiseFunction * GetStoredGradientOpacity()
Enable/Disable the gradient opacity function for the given component.
vtkTimeStamp GetScalarOpacityMTime()
vtkPiecewiseFunction * GetScalarOpacityFunction(int index)
Get/Set the scalar opacity transfer function for the given component.
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()
int GetNumberOfScalarOpacityFunctions()
Get/Set the scalar opacity transfer function for the given component.
void ShadeOff()
Set/Get the shading of a volume.
virtual vtkMTimeType GetMTime()
Return this object's modified time.
int GetNumberOfRGBTransferFunctions()
void SetGradientOpacityFunction(int index, vtkPiecewiseFunction *function)
Set/Get the gradient magnitude opacity transfer function for the given component. ...
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.
#define VTK_MARSHALEXCLUDE(reason)
void SetSpecular(double value)
Set/Get the specular lighting coefficient.
vtkTimeStamp LabelGradientOpacityMTime
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.
const char * GetInterpolationTypeAsString()
Return the interpolation type as a descriptive character string.
vtkTimeStamp GetTransferFunction2DMTime()
void SetTransferFunction2D(vtkImageData *function)
Color-opacity transfer function mode.
vtkTimeStamp LabelScalarOpacityMTime
int GetNumberOfGradientOpacityFunctions()
Set/Get the gradient magnitude opacity transfer function for the given component. ...
std::set< int > LabelMapLabels
vtkPiecewiseFunction * GetGradientOpacityFunction(int index)
Set/Get the gradient magnitude opacity transfer function for the given component. ...
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.
vtkTimeStamp LabelColorMTime
#define VTK_NEAREST_INTERPOLATION
void ShadeOn()
Set/Get the shading of a volume.
std::unordered_map< int, vtkColorTransferFunction * > LabelColor
Label map transfer functions.
virtual void DisableGradientOpacityOff()
Enable/Disable the gradient opacity function for the given component.
vtkPiecewiseFunction * GetGradientOpacity()
int GetNumberOfTransferFunction2Ds()
Color-opacity transfer function mode.
double GetAmbient()
Set/Get the ambient lighting coefficient.
double GetSpecularPower()
Set/Get the specular power.
std::unordered_map< int, vtkPiecewiseFunction * > LabelScalarOpacity