Skip to content

Commit d4f8ca7

Browse files
DrewLazzeriKitwarefinetjul
authored andcommitted
docs(VolumeMapper): Add vtkSliceHelper types
1 parent 079ab65 commit d4f8ca7

File tree

1 file changed

+72
-1
lines changed

1 file changed

+72
-1
lines changed

Sources/Rendering/Core/VolumeMapper/index.d.ts

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import vtkPiecewiseFunction from "../../../Common/DataModel/PiecewiseFunction";
2-
import { Bounds, Range } from "../../../types";
2+
import { Bounds, Range, Vector3 } from "../../../types";
33
import vtkAbstractMapper, { IAbstractMapperInitialValues } from "../AbstractMapper";
44
import { BlendMode, FilterMode } from "./Constants";
55

@@ -283,6 +283,57 @@ export function extend(publicAPI: object, model: object, initialValues?: IVolume
283283
*/
284284
export function newInstance(initialValues?: IVolumeMapperInitialValues): vtkVolumeMapper;
285285

286+
/**
287+
*
288+
*/
289+
export interface ISliceHelperInitialValues {
290+
thickness?: number;
291+
origin?: Vector3;
292+
normal?: Vector3;
293+
}
294+
295+
/**
296+
* Helper class to perform MPR.
297+
*/
298+
299+
export interface vtkSliceHelper extends vtkObject {
300+
/**
301+
* Update the mapper from the slice helper parameters.
302+
*/
303+
update(): void;
304+
305+
/**
306+
* Get the distance between clip planes
307+
*/
308+
getThickness(): number;
309+
310+
/**
311+
* Get the origin of the MPR
312+
*/
313+
getOrigin(): Vector3;
314+
315+
/**
316+
* Get the orientation of the MPR
317+
*/
318+
getNormal(): Vector3;
319+
320+
/**
321+
* Set the distance between clip planes
322+
*/
323+
setThickness(thickness: number): boolean;
324+
325+
/**
326+
* Set the origin of the MPR
327+
*/
328+
setOrigin(origin: Vector3): boolean;
329+
330+
/**
331+
* Set the orientation of the MPR
332+
*/
333+
setNormal(normal: Vector3): boolean;
334+
335+
}
336+
286337
/**
287338
* vtkVolumeMapper inherits from vtkMapper.
288339
* A volume mapper that performs ray casting on the GPU using fragment programs.
@@ -292,5 +343,25 @@ export declare const vtkVolumeMapper: {
292343
extend: typeof extend;
293344
BlendMode: typeof BlendMode;
294345
FilterMode: typeof FilterMode;
346+
vtkSliceHelper: vtkSliceHelper,
295347
};
296348
export default vtkVolumeMapper;
349+
350+
/**
351+
* Method use to decorate a given object (publicAPI+model) with vtkVolumeMapper characteristics.
352+
*
353+
* @param publicAPI object on which methods will be bounds (public)
354+
* @param model object on which data structure will be bounds (protected)
355+
* @param {IVolumeMapperInitialValues} [initialValues] (default: {})
356+
*/
357+
export function extendSliceHelper(publicAPI: object, model: object, initialValues?: IVolumeMapperInitialValues): void;
358+
359+
/**
360+
* Method use to create a new instance of vtkVolumeMapper
361+
*/
362+
export function newInstanceSliceHelper(initialValues?: IVolumeMapperInitialValues): vtkVolumeMapper;
363+
364+
export declare const vtkSliceHelper: {
365+
newInstance: typeof newInstanceSliceHelper,
366+
extend: typeof extendSliceHelper,
367+
};

0 commit comments

Comments
 (0)