@kitware/vtk.js 28.12.1 → 28.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -41,8 +41,12 @@ function vtkCalculator(publicAPI, model) {
41
41
  publicAPI.createSimpleFormulaObject = function (locn, arrNames, resultName, singleValueFormula) {
42
42
  let options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
43
43
  return {
44
- getArrays: () => ({
45
- input: publicAPI.augmentInputArrays(locn, arrNames.map(x => ({
44
+ getArrays: inData => ({
45
+ // don't augment input data array in case of structured input dataset
46
+ input: inData[0].isA('vtkImageData') ? arrNames.map(x => ({
47
+ location: locn,
48
+ name: x
49
+ })) : publicAPI.augmentInputArrays(locn, arrNames.map(x => ({
46
50
  location: locn,
47
51
  name: x
48
52
  }))),
@@ -128,7 +132,7 @@ function vtkCalculator(publicAPI, model) {
128
132
  outData.setPoints(pts);
129
133
  arraysOut.push(pts);
130
134
  } else {
131
- const fetchArrayContainer = [[FieldDataTypes.UNIFORM, x => x.getFieldData(), (x, y) => 'tuples' in y ? y.tuples : 0], [FieldDataTypes.POINT, x => x.getPointData(), x => x.getPoints().getNumberOfPoints()], [FieldDataTypes.CELL, x => x.getCellData(), x => x.getNumberOfCells()], [FieldDataTypes.VERTEX, x => x.getVertexData(), x => x.getNumberOfVertices()], [FieldDataTypes.EDGE, x => x.getEdgeData(), x => x.getNumberOfEdges()], [FieldDataTypes.ROW, x => x.getRowData(), x => x.getNumberOfRows()]].reduce((result, value) => {
135
+ const fetchArrayContainer = [[FieldDataTypes.UNIFORM, x => x.getFieldData(), (x, y) => 'tuples' in y ? y.tuples : 0], [FieldDataTypes.POINT, x => x.getPointData(), x => x.getNumberOfPoints()], [FieldDataTypes.CELL, x => x.getCellData(), x => x.getNumberOfCells()], [FieldDataTypes.VERTEX, x => x.getVertexData(), x => x.getNumberOfVertices()], [FieldDataTypes.EDGE, x => x.getEdgeData(), x => x.getNumberOfEdges()], [FieldDataTypes.ROW, x => x.getRowData(), x => x.getNumberOfRows()]].reduce((result, value) => {
132
136
  result[value[0]] = {
133
137
  getData: value[1],
134
138
  getSize: value[2]
@@ -2,34 +2,34 @@ import { RGBColor } from './../../types';
2
2
  import vtkAbstractRepresentationProxy from './../Core/AbstractRepresentationProxy';
3
3
 
4
4
  export interface vtkGeometryRepresentationProxy
5
- extends vtkAbstractRepresentationProxy {
5
+ extends vtkAbstractRepresentationProxy {
6
6
 
7
- /**
8
- *
9
- * @param representation a string that describes what representation to use for the explicit geometry.
10
- * possible values are 'Surface with edges', 'Surface' (default), 'Wireframe',
11
- * and 'Points'.
12
- */
13
- setRepresentation(representation: string): boolean;
14
- getRepresentation(): string;
7
+ /**
8
+ *
9
+ * @param representation a string that describes what representation to use for the explicit geometry.
10
+ * possible values are 'Surface with edges', 'Surface' (default), 'Wireframe',
11
+ * and 'Points'.
12
+ */
13
+ setRepresentation(representation: string): boolean;
14
+ getRepresentation(): string;
15
15
 
16
- // proxy property mappings
17
- getColor(): RGBColor;
18
- setColor(color: RGBColor): boolean;
16
+ // proxy property mappings
17
+ getColor(): RGBColor;
18
+ setColor(color: RGBColor): boolean;
19
19
  getInterpolateScalarsBeforeMapping(): boolean;
20
20
  setInterpolateScalarsBeforeMapping(interpolateScalarsBeforeMapping: boolean): boolean;
21
- setOpacity(opacity: boolean): boolean;
22
- getOpacity(): boolean;
23
- setVisibility(visible: boolean): boolean;
24
- getVisibility(): boolean;
21
+ getOpacity(): number;
22
+ setOpacity(opacity: number): boolean;
23
+ getVisibility(): boolean;
24
+ setVisibility(visible: boolean): boolean;
25
25
  getPointSize(): number;
26
26
  setPointSize(pointSize: number): boolean;
27
- getUseShadow(): boolean;
28
- setUseShadow(lighting: boolean): boolean;
29
- getUseBounds(): boolean;
30
- setUseBounds(useBounds: boolean): boolean;
31
- getLineWidth(): number;
32
- setLineWidth(width: number): boolean;
27
+ getUseShadow(): boolean;
28
+ setUseShadow(lighting: boolean): boolean;
29
+ getUseBounds(): boolean;
30
+ setUseBounds(useBounds: boolean): boolean;
31
+ getLineWidth(): number;
32
+ setLineWidth(width: number): boolean;
33
33
  }
34
34
 
35
35
  export default vtkGeometryRepresentationProxy;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitware/vtk.js",
3
- "version": "28.12.1",
3
+ "version": "28.12.3",
4
4
  "description": "Visualization Toolkit for the Web",
5
5
  "keywords": [
6
6
  "3d",