Skip to content

Commit 4346fe9

Browse files
authored
Merge pull request #2398 from daker/fix-itkhelper-dts
docs(ts): add ITKHelper typescript defs
2 parents 2fe78eb + 2a05f3d commit 4346fe9

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import vtkPolyData from "../PolyData";
2+
import vtkImageData from "../ImageData";
3+
4+
export interface IOptions {
5+
pointDataName: string;
6+
scalarArrayName: string;
7+
cellDataName: string;
8+
}
9+
10+
/**
11+
* Converts an itk-wasm Image to a vtk.js vtkImageData.
12+
* Requires an itk-wasm Image as input.
13+
* @param itkImage
14+
* @param {IOptions} [options]
15+
*/
16+
export function convertItkToVtkImage(itkImage: any, options?: IOptions): vtkImageData;
17+
18+
/**
19+
* Converts a vtk.js vtkImageData to an itk-wasm Image.
20+
* Requires a vtk.js vtkImageData as input.
21+
* @param {vtkImageData} vtkImage
22+
* @param {IOptions} [options]
23+
*/
24+
export function convertVtkToItkImage(vtkImage: vtkImageData, options?: IOptions): any;
25+
26+
/**
27+
* Converts an itk-wasm PolyData to a vtk.js vtkPolyData.
28+
* Requires an itk-wasm PolyData as input.
29+
* @param itkPolyData
30+
* @param {IOptions} [options]
31+
*/
32+
export function convertItkToVtkPolyData(itkPolyData: any, options?: IOptions): vtkPolyData;
33+
34+
/**
35+
* Converts a vtk.js vtkPolyData to an itk-wasm PolyData.
36+
* Requires a vtk.js vtkPolyData as input.
37+
*
38+
* @param {vtkPolyData} polyData
39+
* @param {IOptions} [options]
40+
*/
41+
export function convertVtkToItkPolyData(polyData: vtkPolyData, options?: IOptions): any;
42+
43+
44+
/**
45+
* vtkITKHelper is a helper which provides a set of functions to work with
46+
* itk-wasm module.
47+
*/
48+
export declare const vtkITKHelper: {
49+
convertItkToVtkImage: typeof convertItkToVtkImage,
50+
convertVtkToItkImage: typeof convertVtkToItkImage,
51+
convertItkToVtkPolyData: typeof convertItkToVtkPolyData,
52+
convertVtkToItkPolyData: typeof convertVtkToItkPolyData,
53+
};
54+
export default vtkITKHelper;

0 commit comments

Comments
 (0)