From 490d7400242ad97e431bdb0da1ea268b7732416d Mon Sep 17 00:00:00 2001 From: Alireza Date: Thu, 21 Dec 2023 09:11:30 -0500 Subject: [PATCH] docs: add proper documentation for outline thickness --- .../Rendering/Core/ImageProperty/index.d.ts | 22 +++++++++++++++++++ .../Rendering/Core/VolumeProperty/index.d.ts | 4 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/Sources/Rendering/Core/ImageProperty/index.d.ts b/Sources/Rendering/Core/ImageProperty/index.d.ts index a057818aa63..5835f18e713 100755 --- a/Sources/Rendering/Core/ImageProperty/index.d.ts +++ b/Sources/Rendering/Core/ImageProperty/index.d.ts @@ -18,6 +18,8 @@ export interface IImagePropertyInitialValues { opacity?: number; componentData?: IComponentData[]; useLookupTableScalarRange?: boolean; + useLabelOutline?: boolean; + labelOutlineThickness?: number | number[]; } export interface vtkImageProperty extends vtkObject { @@ -92,6 +94,26 @@ export interface vtkImageProperty extends vtkObject { */ getScalarOpacity(idx?: number): vtkPiecewiseFunction; + /** + * gets the label outline thickness + */ + getLabelOutlineThickness(): number; + + /** + * It will set the label outline thickness for the labelmaps. It can accept + * a single number or an array of numbers. If a single number is provided, + * it will be used for all the segments. If an array is provided, it indicates + * the thickness for each segment index. For instance if you have a labelmap + * with 3 segments (0: background 1: liver 2: tumor), you can set the thickness + * to [2,4] to have a thicker outline for the tumor (thickness 4). It should be + * noted that the thickness is in pixel and also the first array value will + * control the default thickness for all labels when 0 or not specified. + * + * @param {Number | Number[]} labelOutlineThickness + */ + setLabelOutlineThickness(labelOutlineThickness: number | number[]): boolean; + + /** * Set the ambient lighting coefficient. * @param {Number} ambient The ambient lighting coefficient. diff --git a/Sources/Rendering/Core/VolumeProperty/index.d.ts b/Sources/Rendering/Core/VolumeProperty/index.d.ts index 599f1019f78..c563c1484b0 100755 --- a/Sources/Rendering/Core/VolumeProperty/index.d.ts +++ b/Sources/Rendering/Core/VolumeProperty/index.d.ts @@ -11,7 +11,7 @@ export interface IVolumePropertyInitialValues { specular?: number; specularPower?: number; useLabelOutline?: boolean; - labelOutlineThickness?: number; + labelOutlineThickness?: number | number[]; } export interface vtkVolumeProperty extends vtkObject { @@ -92,7 +92,7 @@ export interface vtkVolumeProperty extends vtkObject { getOpacityMode(index: number): OpacityMode; /** - * + * gets the label outline thickness */ getLabelOutlineThickness(): number;