File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Sources/Filters/General/Calculator Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -45,11 +45,14 @@ function vtkCalculator(publicAPI, model) {
45
45
singleValueFormula ,
46
46
options = { }
47
47
) => ( {
48
- getArrays : ( ) => ( {
49
- input : publicAPI . augmentInputArrays (
50
- locn ,
51
- arrNames . map ( ( x ) => ( { location : locn , name : x } ) )
52
- ) ,
48
+ getArrays : ( inData ) => ( {
49
+ // don't augment input data array in case of structured input dataset
50
+ input : inData [ 0 ] . isA ( 'vtkImageData' )
51
+ ? arrNames . map ( ( x ) => ( { location : locn , name : x } ) )
52
+ : publicAPI . augmentInputArrays (
53
+ locn ,
54
+ arrNames . map ( ( x ) => ( { location : locn , name : x } ) )
55
+ ) ,
53
56
output : [
54
57
{
55
58
location : locn ,
@@ -191,7 +194,7 @@ function vtkCalculator(publicAPI, model) {
191
194
[
192
195
FieldDataTypes . POINT ,
193
196
( x ) => x . getPointData ( ) ,
194
- ( x ) => x . getPoints ( ) . getNumberOfPoints ( ) ,
197
+ ( x ) => x . getNumberOfPoints ( ) ,
195
198
] ,
196
199
[
197
200
FieldDataTypes . CELL ,
You can’t perform that action at this time.
0 commit comments