From 6d24013a1a7a5e29a7a20e0e7e0ea1505c2ef0cc Mon Sep 17 00:00:00 2001 From: Forrest Date: Tue, 18 Jun 2024 11:12:43 -0400 Subject: [PATCH] fix(ImageProperty): color + opacity funcs can be null --- Sources/Rendering/Core/ImageProperty/index.d.ts | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Sources/Rendering/Core/ImageProperty/index.d.ts b/Sources/Rendering/Core/ImageProperty/index.d.ts index f47ba807520..ded3913e68e 100755 --- a/Sources/Rendering/Core/ImageProperty/index.d.ts +++ b/Sources/Rendering/Core/ImageProperty/index.d.ts @@ -1,4 +1,5 @@ import { vtkObject } from '../../../interfaces'; +import { Nullable } from '../../../types'; import vtkColorTransferFunction from '../ColorTransferFunction'; import vtkPiecewiseFunction from '../../../Common/DataModel/PiecewiseFunction'; import { InterpolationType } from './Constants'; @@ -79,13 +80,13 @@ export interface vtkImageProperty extends vtkObject { * Get the component weighting function. * @param {Number} [idx] */ - getPiecewiseFunction(idx?: number): vtkPiecewiseFunction; + getPiecewiseFunction(idx?: number): Nullable; /** * Get the currently set RGB transfer function. * @param {Number} [idx] */ - getRGBTransferFunction(idx?: number): vtkColorTransferFunction; + getRGBTransferFunction(idx?: number): Nullable; /** * Alias to get the piecewise function (backwards compatibility) @@ -176,7 +177,10 @@ export interface vtkImageProperty extends vtkObject { * @param {Number} index * @param {vtkPiecewiseFunction} func */ - setPiecewiseFunction(index: number, func: vtkPiecewiseFunction): boolean; + setPiecewiseFunction( + index: number, + func: Nullable + ): boolean; /** * Set the color of a volume to an RGB transfer function @@ -185,7 +189,7 @@ export interface vtkImageProperty extends vtkObject { */ setRGBTransferFunction( index: number, - func: vtkColorTransferFunction + func: Nullable ): boolean; /** @@ -193,7 +197,10 @@ export interface vtkImageProperty extends vtkObject { * @param {Number} index * @param {vtkPiecewiseFunction} func */ - setScalarOpacity(index: number, func: vtkPiecewiseFunction): boolean; + setScalarOpacity( + index: number, + func: Nullable + ): boolean; /** * Use the range that is set on the lookup table, instead of setting the range from the