Skip to content

Commit f0443d8

Browse files
DrewLazzeriKitwarefinetjul
authored andcommitted
docs(VolumeMapper): Add vtkSliceHelper types
1 parent 57812a2 commit f0443d8

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,4 +1,4 @@
1-
import { Bounds, Range } from "../../../types";
1+
import { Bounds, Range, Vector3 } from "../../../types";
22
import vtkAbstractMapper, { IAbstractMapperInitialValues } from "../AbstractMapper";
33
import { BlendMode, FilterMode } from "./Constants";
44

@@ -248,6 +248,57 @@ export function extend(publicAPI: object, model: object, initialValues?: IVolume
248248
*/
249249
export function newInstance(initialValues?: IVolumeMapperInitialValues): vtkVolumeMapper;
250250

251+
/**
252+
*
253+
*/
254+
export interface ISliceHelperInitialValues {
255+
thickness?: number;
256+
origin?: Vector3;
257+
normal?: Vector3;
258+
}
259+
260+
/**
261+
* Helper class to perform MPR.
262+
*/
263+
264+
export interface vtkSliceHelper extends vtkObject {
265+
/**
266+
* Update the mapper from the slice helper parameters.
267+
*/
268+
update(): void;
269+
270+
/**
271+
* Get the distance between clip planes
272+
*/
273+
getThickness(): number;
274+
275+
/**
276+
* Get the origin of the MPR
277+
*/
278+
getOrigin(): Vector3;
279+
280+
/**
281+
* Get the orientation of the MPR
282+
*/
283+
getNormal(): Vector3;
284+
285+
/**
286+
* Set the distance between clip planes
287+
*/
288+
setThickness(thickness: number): boolean;
289+
290+
/**
291+
* Set the origin of the MPR
292+
*/
293+
setOrigin(origin: Vector3): boolean;
294+
295+
/**
296+
* Set the orientation of the MPR
297+
*/
298+
setNormal(normal: Vector3): boolean;
299+
300+
}
301+
251302
/**
252303
* vtkVolumeMapper inherits from vtkMapper.
253304
* A volume mapper that performs ray casting on the GPU using fragment programs.
@@ -257,5 +308,25 @@ export declare const vtkVolumeMapper: {
257308
extend: typeof extend;
258309
BlendMode: typeof BlendMode;
259310
FilterMode: typeof FilterMode;
311+
vtkSliceHelper: vtkSliceHelper,
260312
};
261313
export default vtkVolumeMapper;
314+
315+
/**
316+
* Method use to decorate a given object (publicAPI+model) with vtkVolumeMapper characteristics.
317+
*
318+
* @param publicAPI object on which methods will be bounds (public)
319+
* @param model object on which data structure will be bounds (protected)
320+
* @param {IVolumeMapperInitialValues} [initialValues] (default: {})
321+
*/
322+
export function extendSliceHelper(publicAPI: object, model: object, initialValues?: IVolumeMapperInitialValues): void;
323+
324+
/**
325+
* Method use to create a new instance of vtkVolumeMapper
326+
*/
327+
export function newInstanceSliceHelper(initialValues?: IVolumeMapperInitialValues): vtkVolumeMapper;
328+
329+
export declare const vtkSliceHelper: {
330+
newInstance: typeof newInstanceSliceHelper,
331+
extend: typeof extendSliceHelper,
332+
};

0 commit comments

Comments
 (0)