49 #ifndef vtkVolumeProperty_h
50 #define vtkVolumeProperty_h
55 #include "vtkRenderingCoreModule.h"
60 #include <unordered_map>
62 VTK_ABI_NAMESPACE_BEGIN
105 vtkSetClampMacro(IndependentComponents,
vtkTypeBool, 0, 1);
107 vtkBooleanMacro(IndependentComponents,
vtkTypeBool);
116 vtkGetMacro(InterpolationType,
int);
119 const char* GetInterpolationTypeAsString();
127 virtual void SetComponentWeight(
int index,
double value);
128 virtual double GetComponentWeight(
int index);
152 int GetColorChannels(
int index);
193 void SetScalarOpacityUnitDistance(
int index,
double distance);
196 this->SetScalarOpacityUnitDistance(0, distance);
198 double GetScalarOpacityUnitDistance(
int index);
235 vtkSetClampMacro(TransferFunctionMode,
int, 0, 1);
236 vtkGetMacro(TransferFunctionMode,
int);
260 virtual void SetDisableGradientOpacity(
int index,
int value);
266 virtual int GetDisableGradientOpacity(
int index);
280 switch (this->TransferFunctionMode)
283 return (this->GradientOpacity[
index] !=
nullptr);
318 int GetShade(
int index);
320 void ShadeOn(
int index);
322 void ShadeOff(
int index);
332 double GetAmbient(
int index);
342 double GetDiffuse(
int index);
352 double GetSpecular(
int index);
360 void SetSpecularPower(
int index,
double value);
362 double GetSpecularPower(
int index);
389 vtkSetClampMacro(ScatteringAnisotropy,
float, -1.0, 1.0);
390 vtkGetMacro(ScatteringAnisotropy,
float);
440 vtkSetMacro(UseClippedVoxelIntensity,
int);
441 vtkGetMacro(UseClippedVoxelIntensity,
int);
442 vtkBooleanMacro(UseClippedVoxelIntensity,
int);
455 vtkSetMacro(ClippedVoxelIntensity,
double);
456 vtkGetMacro(ClippedVoxelIntensity,
double);
505 std::size_t GetNumberOfLabels();
511 std::set<int> GetLabelMapLabels();
524 virtual void CreateDefaultGradientOpacity(
int index);
531 float ScatteringAnisotropy = 0.0;
581 std::unordered_map<int, vtkColorTransferFunction*>
LabelColor;
598 return "Nearest Neighbor";
607 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
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
#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)
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()
vtkTimeStamp GetRGBTransferFunctionMTime()
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.
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
std::set< int > LabelMapLabels
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.
void SetScalarOpacityUnitDistance(double distance)
Set/Get the unit distance on which the scalar opacity transfer function is defined.
vtkPiecewiseFunction * GetGradientOpacity()
double GetAmbient()
Set/Get the ambient lighting coefficient.
double GetSpecularPower()
Set/Get the specular power.
std::unordered_map< int, vtkPiecewiseFunction * > LabelScalarOpacity