1
1
import vtkDataArray from "./Common/Core/DataArray" ;
2
+ import vtkImageData from "./Common/DataModel/ImageData" ;
3
+ import vtkPolyData from "./Common/DataModel/PolyData" ;
2
4
import { vtkPipelineConnection } from "./types" ;
3
5
4
6
/**
@@ -32,48 +34,88 @@ export interface vtkOutputPort {
32
34
* vtkAlgorithm API
33
35
*/
34
36
export interface vtkAlgorithm {
37
+
35
38
/**
36
- * @param dataset
37
- * @param port (default 0)
39
+ * Assign a data object as input.
40
+ * @param {vtkPolyData } dataset
41
+ * @param {Number } [port] The port number (default 0).
38
42
*/
39
- setInputData ( dataset : any , port ?: number ) : void ;
43
+ setInputData ( dataset : vtkPolyData , port ?: number ) : void ;
44
+
40
45
/**
41
- * @param port (default 0)
46
+ * @param { Number } [ port] The port number (default 0).
42
47
*/
43
48
getInputData ( port ?: number ) : any ;
49
+
44
50
/**
45
51
* @param outputPort
46
- * @param port (default 0)
52
+ * @param { Number } [ port] The port number (default 0).
47
53
*/
48
54
setInputConnection ( outputPort : vtkPipelineConnection , port ?: number ) : void ;
55
+
49
56
/**
50
- * @param port (default 0)
57
+ * @param { Number } [ port] The port number (default 0).
51
58
*/
52
59
getInputConnection ( port ?: number ) : vtkPipelineConnection ;
60
+
61
+ /**
62
+ * Add a connection to the given input port index.
63
+ * @param {vtkPipelineConnection } outputPort
64
+ */
53
65
addInputConnection ( outputPort : vtkPipelineConnection ) : void ;
66
+
67
+ /**
68
+ *
69
+ * @param dataset
70
+ */
54
71
addInputData ( dataset : any ) : void ;
72
+
55
73
/**
56
- * @param port (default 0)
74
+ * Get the data object that will contain the algorithm output for the given
75
+ * port.
76
+ * @param {Number } [port] The port number (default 0).
77
+ */
78
+ getOutputData ( port ?: number ) : vtkImageData | vtkPolyData ;
79
+
80
+ /**
81
+ *
57
82
*/
58
- getOutputData ( port ?: number ) : any ;
59
83
shouldUpdate ( ) : boolean ;
84
+
60
85
/**
61
- * @param port (default 0)
86
+ * Get a proxy object corresponding to the given output port of this
87
+ * algorithm.
88
+ * @param {Number } [port] The port number (default 0).
62
89
*/
63
90
getOutputPort ( port ?: number ) : vtkPipelineConnection ;
91
+
92
+ /**
93
+ * Bring this algorithm's outputs up-to-date.
94
+ */
64
95
update ( ) : void ;
96
+
97
+ /**
98
+ * Get the number of input ports used by the algorithm.
99
+ */
65
100
getNumberOfInputPorts ( ) : number ;
101
+
102
+ /**
103
+ * Get the number of output ports provided by the algorithm.
104
+ */
66
105
getNumberOfOutputPorts ( ) : number ;
106
+
67
107
/**
68
- * @param port (default 0)
108
+ * Get the actual data array for the input array sepcified by idx.
109
+ * @param {Number } port (default 0)
69
110
*/
70
111
getInputArrayToProcess ( inputPort ?: number ) : vtkDataArray ;
112
+
71
113
/**
72
- *
73
- * @param inputPort
74
- * @param arrayName
75
- * @param fieldAssociation
76
- * @param attributeType (default 'Scalars')
114
+ * Set the input data arrays that this algorithm will process.
115
+ * @param { Number } inputPort The port number.
116
+ * @param { String } arrayName The name of the array.
117
+ * @param { String } fieldAssociation The name of the association field.
118
+ * @param { String } attributeType (default 'Scalars')
77
119
*/
78
120
setInputArrayToProcess (
79
121
inputPort : number ,
@@ -87,9 +129,9 @@ export interface vtkAlgorithm {
87
129
* Base vtkClass which provides MTime tracking and class infrastructure
88
130
*/
89
131
export interface vtkObject {
132
+
90
133
/**
91
134
* Allow to check if that object was deleted (.delete() was called before).
92
- *
93
135
* @returns true if delete() was previously called
94
136
*/
95
137
isDeleted ( ) : boolean ;
@@ -137,14 +179,14 @@ export interface vtkObject {
137
179
* Generic method to set many fields at one.
138
180
*
139
181
* For example calling the following function
140
- * ```
182
+ * ```js
141
183
* changeDetected = sphereSourceInstance.set({
142
184
* phiResolution: 10,
143
185
* thetaResolution: 20,
144
186
* });
145
187
* ```
146
188
* will be equivalent of calling
147
- * ```
189
+ * ```js
148
190
* changeDetected += sphereSourceInstance.setPhiResolution(10);
149
191
* changeDetected += sphereSourceInstance.setThetaResolution(20);
150
192
* changeDetected = !!changeDetected;
@@ -157,9 +199,9 @@ export interface vtkObject {
157
199
* If `noFunction` is set to true, the field will be set directly on the model
158
200
* without calling the `set${FieldName}()` method.
159
201
*
160
- * @param map (default: {}) Object capturing the set of fieldNames and associated values to set.
161
- * @param noWarning (default: false) Boolean to disable any warning.
162
- * @param noFunctions (default: false) Boolean to skip any function execution and rely on only setting the fields on the model.
202
+ * @param [ map] (default: {}) Object capturing the set of fieldNames and associated values to set.
203
+ * @param [ noWarning] (default: false) Boolean to disable any warning.
204
+ * @param [ noFunctions] (default: false) Boolean to skip any function execution and rely on only setting the fields on the model.
163
205
* @return true if a change was actually performed. False otherwise when the value provided were equal to the ones already set inside the instance.
164
206
*/
165
207
set ( map ?: object , noWarning ?: boolean , noFunction ?: boolean ) : boolean ;
@@ -215,15 +257,15 @@ export interface vtkObject {
215
257
/**
216
258
* Try to copy the state of the other to ourselves by just using references.
217
259
*
218
- * @param other instance to copy the reference from
219
- * @param debug (default: false) if true feedback will be provided when mismatch happen
260
+ * @param { vtkObject } other instance to copy the reference from
261
+ * @param { Boolean } [ debug] (default: false) if true feedback will be provided when mismatch happen
220
262
*/
221
263
shallowCopy ( other : vtkObject , debug ?: boolean ) : void ;
222
264
}
223
265
224
266
export interface vtkProperty {
225
267
name : string ;
226
- children ?: Array < vtkProperty > ;
268
+ children ?: vtkProperty [ ] ;
227
269
}
228
270
229
271
export interface vtkPropertyDomain { }
0 commit comments