@kitware/vtk.js 24.13.0 → 24.14.1

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.
@@ -1,6 +1,6 @@
1
1
  ## From 23.x to 24
2
2
 
3
- All old-style widgets except OrientationMarkerWidget and PiecewiseGaussianWidget have been removed.
3
+ - All old-style widgets except OrientationMarkerWidget and PiecewiseGaussianWidget have been removed.
4
4
 
5
5
  | **Old-style/deprecated widget** | **New-style widget** |
6
6
  |-----------------------------------|---------------------------------|
@@ -15,6 +15,16 @@ All old-style widgets except OrientationMarkerWidget and PiecewiseGaussianWidget
15
15
  | ResliceCursor | ResliceCursorWidget |
16
16
 
17
17
  - In SVGLandmarkRepresentation: `model.showCircle` is replaced by `model.circleProps.visible`
18
+ - In vtk.js subclasses, prefix with '_' the following "protected" model variables:
19
+ - vtk*: model.openglRenderWindow -> model._openglRenderWindow
20
+ - vtk*: model.openglRenderer -> model._openglRenderer
21
+ - vtkInteractorObserver, vtkOrientationMarkerWidget : model.interactor -> model._interactor
22
+ - vtkAbstractWidget, vtkViewNode: model.parent -> model._parent
23
+ - vtkProp: model.parentProp -> model._parentProp
24
+ - vtkRenderWindowInteractor: model.view -> model._view
25
+ - vtkRenderer: model.renderWindow -> model._renderWindow
26
+ - vtkHardwareSelector: model.renderer -> model._renderer
27
+ - vtkAbstractWidget: model.widgetManager -> model._widgetManager
18
28
 
19
29
  ## From 22.x to 23
20
30
 
@@ -34,13 +34,8 @@ function vtkSwapVectors3(v1, v2) {
34
34
 
35
35
  function createArray() {
36
36
  var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 3;
37
- var array = [];
38
-
39
- while (array.length < size) {
40
- array.push(0);
41
- }
42
-
43
- return array;
37
+ // faster than Array.from and/or while loop
38
+ return Array(size).fill(0);
44
39
  } // ----------------------------------------------------------------------------
45
40
  // Global methods
46
41
  // ----------------------------------------------------------------------------
@@ -42,13 +42,16 @@ function dollyToPosition(fact, position, renderer, rwi) {
42
42
 
43
43
  if (cam.getParallelProjection()) {
44
44
  // Zoom relatively to the cursor
45
- var aSize = rwi.getView().getViewportSize(renderer);
45
+ var view = rwi.getView();
46
+ var aSize = view.getViewportSize(renderer);
47
+ var viewport = renderer.getViewport();
48
+ var viewSize = view.getSize();
46
49
  var w = aSize[0];
47
50
  var h = aSize[1];
48
51
  var x0 = w / 2;
49
52
  var y0 = h / 2;
50
- var x1 = position.x;
51
- var y1 = position.y;
53
+ var x1 = position.x - viewport[0] * viewSize[0];
54
+ var y1 = position.y - viewport[1] * viewSize[1];
52
55
  translateCamera(renderer, rwi, x0, y0, x1, y1);
53
56
  cam.setParallelScale(cam.getParallelScale() / fact);
54
57
  translateCamera(renderer, rwi, x1, y1, x0, y0);
@@ -165,6 +165,12 @@ function vtkActor(publicAPI, model) {
165
165
  publicAPI.getSupportsSelection = function () {
166
166
  return model.mapper ? model.mapper.getSupportsSelection() : false;
167
167
  };
168
+
169
+ publicAPI.processSelectorPixelBuffers = function (selector, pixelOffsets) {
170
+ if (model.mapper && model.mapper.processSelectorPixelBuffers) {
171
+ model.mapper.processSelectorPixelBuffers(selector, pixelOffsets);
172
+ }
173
+ };
168
174
  } // ----------------------------------------------------------------------------
169
175
  // Object factory
170
176
  // ----------------------------------------------------------------------------
@@ -0,0 +1,17 @@
1
+ export declare enum ColorSpace {
2
+ RGB = 0,
3
+ HSV = 1,
4
+ LAB = 2,
5
+ DIVERGING = 3,
6
+ }
7
+
8
+ export declare enum Scale {
9
+ LINEAR = 0,
10
+ LOG10 = 1,
11
+ }
12
+
13
+ declare const _default: {
14
+ ColorSpace: typeof ColorSpace;
15
+ Scale: typeof Scale;
16
+ };
17
+ export default _default;
@@ -1,16 +1,6 @@
1
1
  import { vtkObject } from './../../interfaces';
2
+ import { ColorSpace, Scale } from './ColorTransferFunction/Constants';
2
3
 
3
- export enum ColorSpace {
4
- RGB,
5
- HSV,
6
- LAB,
7
- DIVERGING,
8
- }
9
-
10
- export enum Scale {
11
- LINEAR,
12
- LOG10,
13
- }
14
4
 
15
5
  /* TODO: use VtkScalarsToColors instead of VtkObject */
16
6
  export interface vtkColorTransferFunction extends vtkObject {
@@ -358,5 +348,7 @@ export function newInstance(initialValues?: object): vtkColorTransferFunction;
358
348
  export declare const vtkColorTransferFunction: {
359
349
  newInstance: typeof newInstance;
360
350
  extend: typeof extend;
351
+ ColorSpace: typeof ColorSpace;
352
+ Scale: typeof Scale;
361
353
  };
362
354
  export default vtkColorTransferFunction;
@@ -0,0 +1,14 @@
1
+ export declare enum Coordinate {
2
+ DISPLAY = 0,
3
+ NORMALIZED_DISPLAY = 1,
4
+ VIEWPORT = 2,
5
+ NORMALIZED_VIEWPORT = 3,
6
+ PROJECTION = 4,
7
+ VIEW = 5,
8
+ WORLD = 6,
9
+ }
10
+
11
+ declare const _default: {
12
+ Coordinate: typeof Coordinate;
13
+ };
14
+ export default _default;
@@ -1,15 +1,7 @@
1
1
  import { vtkObject, vtkProperty } from './../../interfaces';
2
2
  import vtkRenderer from './Renderer';
3
+ import { Coordinate } from './Coordinate/Constants';
3
4
 
4
- export enum Coordinate {
5
- DISPLAY,
6
- NORMALIZED_DISPLAY,
7
- VIEWPORT,
8
- NORMALIZED_VIEWPORT,
9
- PROJECTION,
10
- VIEW,
11
- WORLD,
12
- }
13
5
 
14
6
  /**
15
7
  *
@@ -73,7 +65,7 @@ export interface vtkCoordinate extends vtkObject {
73
65
  * options are Display, Normalized Display, Viewport, Normalized Viewport,
74
66
  * View, and World.
75
67
  */
76
- getCoordinateSystem(): number;
68
+ getCoordinateSystem(): Coordinate;
77
69
 
78
70
  /**
79
71
  * Get the coordinate system which this coordinate is defined in as string.
@@ -251,7 +243,8 @@ export function newInstance(initialValues?: ICoordinateInitialValues): vtkCoordi
251
243
  * @see [vtkActor](./Rendering_Core_Actor.html)2D
252
244
  */
253
245
  export declare const vtkCoordinate: {
254
- newInstance: typeof newInstance,
255
- extend: typeof extend,
246
+ newInstance: typeof newInstance;
247
+ extend: typeof extend;
248
+ Coordinate: typeof Coordinate;
256
249
  };
257
250
  export default vtkCoordinate;
@@ -0,0 +1,17 @@
1
+ export declare enum OrientationModes {
2
+ DIRECTION = 0,
3
+ ROTATION = 1,
4
+ MATRIX = 2,
5
+ }
6
+
7
+ export declare enum ScaleModes {
8
+ SCALE_BY_CONSTANT = 0,
9
+ SCALE_BY_MAGNITUDE = 1,
10
+ SCALE_BY_COMPONENTS = 2,
11
+ }
12
+
13
+ declare const _default: {
14
+ OrientationModes: typeof OrientationModes;
15
+ ScaleModes: typeof ScaleModes;
16
+ };
17
+ export default _default;
@@ -1,17 +1,7 @@
1
1
  import { Bounds } from './../../types';
2
2
  import vtkMapper, { IMapperInitialValues } from './Mapper';
3
+ import { OrientationModes, ScaleModes } from './Glyph3DMapper/Constants';
3
4
 
4
- export enum OrientationModes {
5
- DIRECTION,
6
- ROTATION,
7
- MATRIX,
8
- }
9
-
10
- export enum ScaleModes {
11
- SCALE_BY_CONSTANT,
12
- SCALE_BY_MAGNITUDE,
13
- SCALE_BY_COMPONENTS,
14
- }
15
5
 
16
6
  interface IPrimitiveCount {
17
7
  points: number;
@@ -168,5 +158,7 @@ export function newInstance(initialValues?: IGlyph3DMapperInitialValues): vtkGly
168
158
  export declare const vtkGlyph3DMapper: {
169
159
  newInstance: typeof newInstance;
170
160
  extend: typeof extend;
161
+ OrientationModes: typeof OrientationModes;
162
+ ScaleModes: typeof ScaleModes;
171
163
  }
172
164
  export default vtkGlyph3DMapper;
@@ -0,0 +1,14 @@
1
+ export declare enum SlicingMode {
2
+ NONE = -1,
3
+ I = 0,
4
+ J = 1,
5
+ K = 2,
6
+ X = 3,
7
+ Y = 4,
8
+ Z = 5,
9
+ }
10
+
11
+ declare const _default: {
12
+ SlicingMode: typeof SlicingMode;
13
+ };
14
+ export default _default;
@@ -1,16 +1,8 @@
1
1
  import vtkCamera from './Camera';
2
2
  import vtkAbstractMapper, { IAbstractMapperInitialValues } from './AbstractMapper';
3
3
  import { Bounds, Vector3 } from './../../types';
4
+ import { SlicingMode } from './ImageMapper/Constants';
4
5
 
5
- export enum SlicingMode {
6
- NONE,
7
- I,
8
- J,
9
- K,
10
- X,
11
- Y,
12
- Z,
13
- }
14
6
 
15
7
  interface IClosestIJKAxis {
16
8
  ijkMode: SlicingMode,
@@ -325,5 +317,6 @@ export function newInstance(initialValues?: IImageMapperInitialValues): vtkImage
325
317
  export declare const vtkImageMapper: {
326
318
  newInstance: typeof newInstance;
327
319
  extend: typeof extend;
320
+ SlicingMode: typeof SlicingMode;
328
321
  }
329
322
  export default vtkImageMapper;
@@ -0,0 +1,9 @@
1
+ export declare enum InterpolationType {
2
+ NEAREST = 0,
3
+ LINEAR = 1,
4
+ }
5
+
6
+ declare const _default: {
7
+ InterpolationType: typeof InterpolationType;
8
+ };
9
+ export default _default;
@@ -1,17 +1,14 @@
1
1
  import { vtkObject } from './../../interfaces';
2
2
  import vtkColorTransferFunction from './ColorTransferFunction';
3
-
4
- export enum InterpolationType {
5
- NEAREST,
6
- LINEAR,
7
- }
3
+ import vtkPiecewiseFunction from './../../Common/DataModel/PiecewiseFunction';
4
+ import { InterpolationType } from './ImageProperty/Constants';
8
5
 
9
6
  interface IComponentData {
10
7
  piecewiseFunction: number;
11
8
  componentWeight: number;
12
9
  }
13
10
 
14
- export interface IImageMapperInitialValues {
11
+ export interface IImagePropertyInitialValues {
15
12
  independentComponents?: boolean;
16
13
  interpolationType?: InterpolationType;
17
14
  colorWindow?: number;
@@ -20,13 +17,13 @@ export interface IImageMapperInitialValues {
20
17
  diffuse?: number;
21
18
  opacity?: number;
22
19
  componentData?: IComponentData[];
23
- useLookupTableScalarRange?: boolean;
20
+ useLookupTableScalarRange?: boolean;
24
21
  }
25
22
 
26
23
  export interface vtkImageProperty extends vtkObject {
27
24
 
28
25
  /**
29
- * Get the lighting coefficient.
26
+ * Get the lighting coefficient.
30
27
  * @default 1.0
31
28
  */
32
29
  getAmbient(): number;
@@ -50,7 +47,7 @@ export interface vtkImageProperty extends vtkObject {
50
47
  getComponentWeight(index: number): number;
51
48
 
52
49
  /**
53
- * Get the diffuse lighting coefficient.
50
+ * Get the diffuse lighting coefficient.
54
51
  * @default 1.0
55
52
  */
56
53
  getDiffuse(): number;
@@ -72,7 +69,7 @@ export interface vtkImageProperty extends vtkObject {
72
69
  getInterpolationTypeAsString(): string;
73
70
 
74
71
  /**
75
- * Get the opacity of the object.
72
+ * Get the opacity of the object.
76
73
  * @default 1.0
77
74
  */
78
75
  getOpacity(): number;
@@ -81,25 +78,25 @@ export interface vtkImageProperty extends vtkObject {
81
78
  * Get the component weighting function.
82
79
  * @param {Number} [idx]
83
80
  */
84
- getPiecewiseFunction(idx?: number): any;
81
+ getPiecewiseFunction(idx?: number): vtkPiecewiseFunction;
85
82
 
86
83
  /**
87
84
  * Get the currently set RGB transfer function.
88
85
  * @param {Number} [idx]
89
86
  */
90
- getRGBTransferFunction(idx?: number): any;
87
+ getRGBTransferFunction(idx?: number): vtkColorTransferFunction;
91
88
 
92
89
  /**
93
90
  * Alias to get the piecewise function (backwards compatibility)
94
91
  * @param {Number} [idx]
95
92
  */
96
- getScalarOpacity(idx: number): number;
93
+ getScalarOpacity(idx?: number): vtkPiecewiseFunction;
97
94
 
98
- /**
95
+ /**
99
96
  * Set the ambient lighting coefficient.
100
- * @param {Number} ambient The ambient lighting coefficient.
101
- */
102
- setAmbient(ambient: number): boolean;
97
+ * @param {Number} ambient The ambient lighting coefficient.
98
+ */
99
+ setAmbient(ambient: number): boolean;
103
100
 
104
101
  /**
105
102
  * Set the level value for window/level.
@@ -120,11 +117,11 @@ export interface vtkImageProperty extends vtkObject {
120
117
  */
121
118
  setComponentWeight(index: number, value: number): boolean;
122
119
 
123
- /**
124
- * Set the diffuse lighting coefficient.
125
- * @param {Number} diffuse The diffuse lighting coefficient.
126
- */
127
- setDiffuse(diffuse: number): boolean;
120
+ /**
121
+ * Set the diffuse lighting coefficient.
122
+ * @param {Number} diffuse The diffuse lighting coefficient.
123
+ */
124
+ setDiffuse(diffuse: number): boolean;
128
125
 
129
126
  /**
130
127
  *
@@ -149,7 +146,7 @@ export interface vtkImageProperty extends vtkObject {
149
146
  setInterpolationTypeToNearest(): boolean;
150
147
 
151
148
  /**
152
- * Set the opacity of the object
149
+ * Set the opacity of the object
153
150
  * @param {Number} opacity The opacity value.
154
151
  */
155
152
  setOpacity(opacity: number): boolean;
@@ -157,9 +154,9 @@ export interface vtkImageProperty extends vtkObject {
157
154
  /**
158
155
  * Set the piecewise function
159
156
  * @param {Number} index
160
- * @param func
157
+ * @param {vtkPiecewiseFunction} func
161
158
  */
162
- setPiecewiseFunction(index: number, func: any): boolean;
159
+ setPiecewiseFunction(index: number, func: vtkPiecewiseFunction): boolean;
163
160
 
164
161
  /**
165
162
  * Set the color of a volume to an RGB transfer function
@@ -171,14 +168,14 @@ export interface vtkImageProperty extends vtkObject {
171
168
  /**
172
169
  * Alias to set the piecewise function
173
170
  * @param {Number} index
174
- * @param func
171
+ * @param {vtkPiecewiseFunction} func
175
172
  */
176
- setScalarOpacity(index: any, func: any): boolean;
173
+ setScalarOpacity(index: number, func: vtkPiecewiseFunction): boolean;
177
174
 
178
175
  /**
179
176
  * Use the range that is set on the lookup table, instead of setting the range from the
180
- * ColorWindow/ColorLevel settings
181
- * @default false
177
+ * ColorWindow/ColorLevel settings
178
+ * @default false
182
179
  * @param {Boolean} useLookupTableScalarRange
183
180
  */
184
181
  setUseLookupTableScalarRange(useLookupTableScalarRange: boolean): boolean;
@@ -189,15 +186,15 @@ export interface vtkImageProperty extends vtkObject {
189
186
  *
190
187
  * @param publicAPI object on which methods will be bounds (public)
191
188
  * @param model object on which data structure will be bounds (protected)
192
- * @param {IImageMapperInitialValues} [initialValues] (default: {})
189
+ * @param {IImagePropertyInitialValues} [initialValues] (default: {})
193
190
  */
194
- export function extend(publicAPI: object, model: object, initialValues?: IImageMapperInitialValues): void;
191
+ export function extend(publicAPI: object, model: object, initialValues?: IImagePropertyInitialValues): void;
195
192
 
196
193
  /**
197
194
  * Method use to create a new instance of vtkImageProperty
198
- * @param {IImageMapperInitialValues} [initialValues] for pre-setting some of its content
195
+ * @param {IImagePropertyInitialValues} [initialValues] for pre-setting some of its content
199
196
  */
200
- export function newInstance(initialValues?: IImageMapperInitialValues): vtkImageProperty;
197
+ export function newInstance(initialValues?: IImagePropertyInitialValues): vtkImageProperty;
201
198
 
202
199
  /**
203
200
  * vtkImageProperty provides 2D image display support for vtk.
@@ -8,10 +8,13 @@ import { N as createUninitializedBounds, i as isNan } from '../../Common/Core/Ma
8
8
  import vtkScalarsToColors from '../../Common/Core/ScalarsToColors/Constants.js';
9
9
  import CoincidentTopologyHelper from './Mapper/CoincidentTopologyHelper.js';
10
10
  import Constants from './Mapper/Constants.js';
11
+ import vtkDataSet from '../../Common/DataModel/DataSet.js';
12
+ import { PassTypes } from '../OpenGL/HardwareSelector/Constants.js';
11
13
 
12
14
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
13
15
 
14
16
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
17
+ var FieldAssociations = vtkDataSet.FieldAssociations;
15
18
  var staticOffsetAPI = CoincidentTopologyHelper.staticOffsetAPI,
16
19
  otherStaticMethods = CoincidentTopologyHelper.otherStaticMethods;
17
20
  var ColorMode = Constants.ColorMode,
@@ -455,6 +458,64 @@ function vtkMapper(publicAPI, model) {
455
458
  publicAPI.colorToValue = notImplemented('ColorToValue');
456
459
  publicAPI.useInvertibleColorFor = notImplemented('UseInvertibleColorFor');
457
460
  publicAPI.clearInvertibleColor = notImplemented('ClearInvertibleColor');
461
+
462
+ publicAPI.processSelectorPixelBuffers = function (selector, pixelOffsets) {
463
+ /* eslint-disable no-bitwise */
464
+ if (!selector || !model.selectionWebGLIdsToVTKIds || !model.populateSelectionSettings) {
465
+ return;
466
+ }
467
+
468
+ var rawLowData = selector.getRawPixelBuffer(PassTypes.ID_LOW24);
469
+ var rawHighData = selector.getRawPixelBuffer(PassTypes.ID_HIGH24);
470
+ var currentPass = selector.getCurrentPass();
471
+ var fieldAssociation = selector.getFieldAssociation();
472
+ var idMap = null;
473
+
474
+ if (fieldAssociation === FieldAssociations.FIELD_ASSOCIATION_POINTS) {
475
+ idMap = model.selectionWebGLIdsToVTKIds.points;
476
+ } else if (fieldAssociation === FieldAssociations.FIELD_ASSOCIATION_CELLS) {
477
+ idMap = model.selectionWebGLIdsToVTKIds.cells;
478
+ }
479
+
480
+ if (!idMap) {
481
+ return;
482
+ }
483
+
484
+ pixelOffsets.forEach(function (pos) {
485
+ if (currentPass === PassTypes.ID_LOW24) {
486
+ var inValue = 0;
487
+
488
+ if (rawHighData) {
489
+ inValue += rawHighData[pos];
490
+ inValue *= 256;
491
+ }
492
+
493
+ inValue += rawLowData[pos + 2];
494
+ inValue *= 256;
495
+ inValue += rawLowData[pos + 1];
496
+ inValue *= 256;
497
+ inValue += rawLowData[pos];
498
+ var outValue = idMap[inValue];
499
+ var lowData = selector.getPixelBuffer(PassTypes.ID_LOW24);
500
+ lowData[pos] = outValue & 0xff;
501
+ lowData[pos + 1] = (outValue & 0xff00) >> 8;
502
+ lowData[pos + 2] = (outValue & 0xff0000) >> 16;
503
+ } else if (currentPass === PassTypes.ID_HIGH24 && rawHighData) {
504
+ var _inValue = 0;
505
+ _inValue += rawHighData[pos];
506
+ _inValue *= 256;
507
+ _inValue += rawLowData[pos];
508
+ _inValue *= 256;
509
+ _inValue += rawLowData[pos + 1];
510
+ _inValue *= 256;
511
+ _inValue += rawLowData[pos + 2];
512
+ var _outValue = idMap[_inValue];
513
+ var highData = selector.getPixelBuffer(PassTypes.ID_HIGH24);
514
+ highData[pos] = (_outValue & 0xff000000) >> 24;
515
+ }
516
+ });
517
+ /* eslint-enable no-bitwise */
518
+ };
458
519
  } // ----------------------------------------------------------------------------
459
520
  // Object factory
460
521
  // ----------------------------------------------------------------------------
@@ -475,6 +536,8 @@ var DEFAULT_VALUES = {
475
536
  renderTime: 0,
476
537
  colorByArrayName: null,
477
538
  fieldDataTupleId: -1,
539
+ populateSelectionSettings: true,
540
+ selectionWebGLIdsToVTKIds: null,
478
541
  interpolateScalarsBeforeMapping: false,
479
542
  colorCoordinates: null,
480
543
  colorTextureMap: null,
@@ -491,7 +554,7 @@ function extend(publicAPI, model) {
491
554
 
492
555
  vtkAbstractMapper3D.extend(publicAPI, model, initialValues);
493
556
  macro.get(publicAPI, model, ['colorCoordinates', 'colorMapColors', 'colorTextureMap']);
494
- macro.setGet(publicAPI, model, ['colorByArrayName', 'arrayAccessMode', 'colorMode', 'fieldDataTupleId', 'interpolateScalarsBeforeMapping', 'lookupTable', 'renderTime', 'scalarMode', 'scalarVisibility', 'static', 'useLookupTableScalarRange', 'viewSpecificProperties', 'customShaderAttributes' // point data array names that will be transferred to the VBO
557
+ macro.setGet(publicAPI, model, ['colorByArrayName', 'arrayAccessMode', 'colorMode', 'fieldDataTupleId', 'interpolateScalarsBeforeMapping', 'lookupTable', 'populateSelectionSettings', 'renderTime', 'scalarMode', 'scalarVisibility', 'selectionWebGLIdsToVTKIds', 'static', 'useLookupTableScalarRange', 'viewSpecificProperties', 'customShaderAttributes' // point data array names that will be transferred to the VBO
495
558
  ]);
496
559
  macro.setGetArray(publicAPI, model, ['scalarRange'], 2);
497
560
 
@@ -27,6 +27,8 @@ function vtkProp(publicAPI, model) {
27
27
  return m1;
28
28
  };
29
29
 
30
+ publicAPI.processSelectorPixelBuffers = function (selector, pixeloffsets) {};
31
+
30
32
  publicAPI.getNestedProps = function () {
31
33
  return null;
32
34
  };
@@ -0,0 +1,9 @@
1
+ export declare enum DisplayLocation {
2
+ BACKGROUND = 0,
3
+ FOREGROUND = 1,
4
+ }
5
+
6
+ declare const _default: {
7
+ DisplayLocation: typeof DisplayLocation;
8
+ };
9
+ export default _default;
@@ -1,12 +1,13 @@
1
1
  import { vtkObject } from './../../interfaces';
2
2
  import { RGBColor } from './../../types';
3
+ import { DisplayLocation } from './Property2D/Constants';
3
4
 
4
5
  interface IProperty2DInitialValues{
5
6
  color?: RGBColor;
6
7
  opacity?: number;
7
8
  pointSize?: number;
8
9
  lineWidth?: number;
9
- displayLocation?: string;
10
+ displayLocation?: DisplayLocation;
10
11
  }
11
12
 
12
13
  export interface vtkProperty2D extends vtkObject {
@@ -25,7 +26,7 @@ export interface vtkProperty2D extends vtkObject {
25
26
  * Get the display location of the object.
26
27
  * @default 'Foreground'
27
28
  */
28
- getDisplayLocation(): string;
29
+ getDisplayLocation(): DisplayLocation;
29
30
 
30
31
  /**
31
32
  * Get the width of a Line.
@@ -84,7 +85,7 @@ export interface vtkProperty2D extends vtkObject {
84
85
  * Set the display location of the object.
85
86
  * @param {String} displayLocation
86
87
  */
87
- setDisplayLocation(displayLocation: string): boolean;
88
+ setDisplayLocation(displayLocation: DisplayLocation): boolean;
88
89
 
89
90
  /**
90
91
  * Set the width of a Line. The width is expressed in screen units.
@@ -138,7 +139,7 @@ export function newInstance(initialValues?: IProperty2DInitialValues): vtkProper
138
139
  * like backface properties can be set and manipulated with this object.
139
140
  */
140
141
  export declare const vtkProperty2D: {
141
- newInstance: typeof newInstance,
142
- extend: typeof extend,
142
+ newInstance: typeof newInstance;
143
+ extend: typeof extend;
143
144
  };
144
145
  export default vtkProperty2D;