@kitware/vtk.js 25.9.1 → 26.0.0-beta.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.
Files changed (183) hide show
  1. package/Common/Core/CellArray.d.ts +0 -6
  2. package/Common/Core/CellArray.js +21 -12
  3. package/Common/Core/ClassHierarchy.js +11 -6
  4. package/Common/Core/DataArray.d.ts +20 -0
  5. package/Common/Core/DataArray.js +21 -4
  6. package/Proxy/Core/ViewProxy.js +17 -9
  7. package/Rendering/Core/Prop3D.js +1 -6
  8. package/Rendering/Core/RenderWindow.js +9 -6
  9. package/Rendering/Core/VolumeProperty.js +2 -3
  10. package/Rendering/Misc/CanvasView.js +6 -5
  11. package/Rendering/Misc/GenericRenderWindow.js +12 -7
  12. package/Rendering/OpenGL/Actor.js +4 -4
  13. package/Rendering/OpenGL/Actor2D.js +4 -4
  14. package/Rendering/OpenGL/Camera.js +7 -4
  15. package/Rendering/OpenGL/CubeAxesActor.js +7 -5
  16. package/Rendering/OpenGL/ForwardPass.js +1 -1
  17. package/Rendering/OpenGL/Glyph3DMapper.js +4 -4
  18. package/Rendering/OpenGL/ImageMapper.js +9 -5
  19. package/Rendering/OpenGL/ImageSlice.js +3 -3
  20. package/Rendering/OpenGL/PixelSpaceCallbackMapper.js +9 -5
  21. package/Rendering/OpenGL/PolyDataMapper.js +22 -14
  22. package/Rendering/OpenGL/PolyDataMapper2D.js +17 -10
  23. package/Rendering/OpenGL/ScalarBarActor.js +6 -4
  24. package/Rendering/OpenGL/Skybox.js +10 -6
  25. package/Rendering/OpenGL/Texture.js +6 -5
  26. package/Rendering/OpenGL/Volume.js +2 -2
  27. package/Rendering/OpenGL/VolumeMapper.js +11 -11
  28. package/Rendering/OpenGL/glsl/vtkVolumeFS.glsl.js +1 -1
  29. package/Rendering/SceneGraph/RenderPass.js +3 -2
  30. package/Rendering/WebGPU/ForwardPass.js +1 -1
  31. package/Rendering/WebGPU/HardwareSelectionPass.js +1 -1
  32. package/Rendering/WebGPU/HardwareSelector.js +14 -13
  33. package/Rendering/WebGPU/OpaquePass.js +1 -1
  34. package/Rendering/WebGPU/OrderIndependentTranslucentPass.js +1 -1
  35. package/Rendering/WebGPU/VolumePass.js +1 -1
  36. package/Utilities/config/rules-tests.js +28 -0
  37. package/Widgets/Core/AbstractWidgetFactory.js +1 -0
  38. package/Widgets/Core/StateBuilder/color3Mixin.js +22 -0
  39. package/Widgets/Core/StateBuilder/colorMixin.js +7 -0
  40. package/Widgets/Core/StateBuilder.js +2 -0
  41. package/Widgets/Representations/ArrowHandleRepresentation.js +28 -110
  42. package/Widgets/Representations/CircleContextRepresentation.js +43 -165
  43. package/Widgets/Representations/ContextRepresentation.js +0 -3
  44. package/Widgets/Representations/ConvexFaceContextRepresentation.js +11 -11
  45. package/Widgets/Representations/CroppingOutlineRepresentation.js +5 -12
  46. package/Widgets/Representations/CubeHandleRepresentation.js +15 -104
  47. package/Widgets/Representations/GlyphRepresentation.js +320 -0
  48. package/Widgets/Representations/HandleRepresentation.js +0 -5
  49. package/Widgets/Representations/ImplicitPlaneRepresentation.js +68 -49
  50. package/Widgets/Representations/LineHandleRepresentation.js +116 -0
  51. package/Widgets/Representations/PolyLineRepresentation.js +52 -49
  52. package/Widgets/Representations/RectangleContextRepresentation.js +16 -21
  53. package/Widgets/Representations/SphereContextRepresentation.js +30 -109
  54. package/Widgets/Representations/SphereHandleRepresentation.js +13 -110
  55. package/Widgets/Representations/SplineContextRepresentation.js +53 -36
  56. package/Widgets/Representations/WidgetRepresentation.d.ts +52 -1
  57. package/Widgets/Representations/WidgetRepresentation.js +140 -78
  58. package/Widgets/Representations.js +6 -0
  59. package/Widgets/SVG/SVGLandmarkRepresentation.js +1 -13
  60. package/Widgets/Widgets3D/AngleWidget.js +1 -4
  61. package/Widgets/Widgets3D/EllipseWidget/state.js +1 -1
  62. package/Widgets/Widgets3D/ResliceCursorWidget/Constants.js +15 -3
  63. package/Widgets/Widgets3D/ResliceCursorWidget/behavior.js +93 -36
  64. package/Widgets/Widgets3D/ResliceCursorWidget/helpers.js +75 -82
  65. package/Widgets/Widgets3D/ResliceCursorWidget/state.js +49 -170
  66. package/Widgets/Widgets3D/ResliceCursorWidget.js +61 -23
  67. package/index.d.ts +0 -1
  68. package/macros.d.ts +3 -5
  69. package/macros.js +4 -35
  70. package/package.json +2 -2
  71. package/Widgets/Representations/ResliceCursorContextRepresentation/Constants.js +0 -12
  72. package/Widgets/Representations/ResliceCursorContextRepresentation.d.ts +0 -54
  73. package/Widgets/Representations/ResliceCursorContextRepresentation.js +0 -357
  74. package/_vendor/available-typed-arrays/index.js_commonjs-proxy.js +0 -1
  75. package/_vendor/call-bind/callBound.js_commonjs-proxy.js +0 -1
  76. package/_vendor/call-bind/index.js_commonjs-module.js +0 -3
  77. package/_vendor/call-bind/index.js_commonjs-proxy.js +0 -1
  78. package/_vendor/deep-equal/node_modules/isarray/index.js_commonjs-proxy.js +0 -1
  79. package/_vendor/define-properties/index.js_commonjs-proxy.js +0 -1
  80. package/_vendor/es-abstract/helpers/getOwnPropertyDescriptor.js_commonjs-proxy.js +0 -1
  81. package/_vendor/es-get-iterator/index.js_commonjs-module.js +0 -3
  82. package/_vendor/es-get-iterator/index.js_commonjs-proxy.js +0 -1
  83. package/_vendor/es-get-iterator/node_modules/isarray/index.js_commonjs-proxy.js +0 -1
  84. package/_vendor/foreach/index.js_commonjs-proxy.js +0 -1
  85. package/_vendor/function-bind/implementation.js_commonjs-proxy.js +0 -1
  86. package/_vendor/function-bind/index.js_commonjs-proxy.js +0 -1
  87. package/_vendor/get-intrinsic/index.js_commonjs-proxy.js +0 -1
  88. package/_vendor/has/src/index.js_commonjs-proxy.js +0 -1
  89. package/_vendor/has-bigints/index.js_commonjs-proxy.js +0 -1
  90. package/_vendor/has-symbols/index.js_commonjs-proxy.js +0 -1
  91. package/_vendor/has-symbols/shams.js_commonjs-proxy.js +0 -1
  92. package/_vendor/has-tostringtag/shams.js_commonjs-proxy.js +0 -1
  93. package/_vendor/is-arguments/index.js_commonjs-proxy.js +0 -1
  94. package/_vendor/is-bigint/index.js_commonjs-module.js +0 -3
  95. package/_vendor/is-bigint/index.js_commonjs-proxy.js +0 -1
  96. package/_vendor/is-boolean-object/index.js_commonjs-proxy.js +0 -1
  97. package/_vendor/is-date-object/index.js_commonjs-proxy.js +0 -1
  98. package/_vendor/is-map/index.js_commonjs-proxy.js +0 -1
  99. package/_vendor/is-number-object/index.js_commonjs-proxy.js +0 -1
  100. package/_vendor/is-regex/index.js_commonjs-proxy.js +0 -1
  101. package/_vendor/is-set/index.js_commonjs-proxy.js +0 -1
  102. package/_vendor/is-string/index.js_commonjs-proxy.js +0 -1
  103. package/_vendor/is-symbol/index.js_commonjs-module.js +0 -3
  104. package/_vendor/is-symbol/index.js_commonjs-proxy.js +0 -1
  105. package/_vendor/is-typed-array/index.js_commonjs-proxy.js +0 -1
  106. package/_vendor/is-weakmap/index.js_commonjs-proxy.js +0 -1
  107. package/_vendor/is-weakset/index.js_commonjs-proxy.js +0 -1
  108. package/_vendor/object-inspect/index.js_commonjs-proxy.js +0 -1
  109. package/_vendor/object-is/implementation.js_commonjs-proxy.js +0 -1
  110. package/_vendor/object-is/index.js_commonjs-proxy.js +0 -1
  111. package/_vendor/object-is/polyfill.js_commonjs-proxy.js +0 -1
  112. package/_vendor/object-is/shim.js_commonjs-proxy.js +0 -1
  113. package/_vendor/object-keys/implementation.js_commonjs-proxy.js +0 -1
  114. package/_vendor/object-keys/index.js_commonjs-proxy.js +0 -1
  115. package/_vendor/object-keys/isArguments.js_commonjs-proxy.js +0 -1
  116. package/_vendor/object.assign/implementation.js_commonjs-proxy.js +0 -1
  117. package/_vendor/object.assign/index.js_commonjs-proxy.js +0 -1
  118. package/_vendor/object.assign/polyfill.js_commonjs-proxy.js +0 -1
  119. package/_vendor/object.assign/shim.js_commonjs-proxy.js +0 -2
  120. package/_vendor/regexp.prototype.flags/implementation.js_commonjs-proxy.js +0 -1
  121. package/_vendor/regexp.prototype.flags/index.js_commonjs-proxy.js +0 -1
  122. package/_vendor/regexp.prototype.flags/polyfill.js_commonjs-proxy.js +0 -1
  123. package/_vendor/regexp.prototype.flags/shim.js_commonjs-proxy.js +0 -1
  124. package/_vendor/side-channel/index.js_commonjs-proxy.js +0 -1
  125. package/_vendor/which-boxed-primitive/index.js_commonjs-proxy.js +0 -5
  126. package/_vendor/which-collection/index.js_commonjs-proxy.js +0 -4
  127. package/_vendor/which-typed-array/index.js_commonjs-proxy.js +0 -1
  128. package/_virtual/_node-resolve_empty.js_commonjs-proxy.js +0 -6
  129. package/_virtual/commonjsHelpers.js +0 -18
  130. package/_virtual/node-resolve_empty.js +0 -8
  131. package/_virtual/polyfill-node.global.js +0 -5
  132. package/_virtual/polyfill-node.process.js +0 -225
  133. package/vendor/available-typed-arrays/index.js +0 -29
  134. package/vendor/call-bind/callBound.js +0 -19
  135. package/vendor/call-bind/index.js +0 -52
  136. package/vendor/deep-equal/index.js +0 -379
  137. package/vendor/deep-equal/node_modules/isarray/index.js +0 -7
  138. package/vendor/define-properties/index.js +0 -60
  139. package/vendor/es-abstract/helpers/getOwnPropertyDescriptor.js +0 -17
  140. package/vendor/es-get-iterator/index.js +0 -217
  141. package/vendor/es-get-iterator/node_modules/isarray/index.js +0 -7
  142. package/vendor/foreach/index.js +0 -22
  143. package/vendor/function-bind/implementation.js +0 -52
  144. package/vendor/function-bind/index.js +0 -7
  145. package/vendor/get-intrinsic/index.js +0 -334
  146. package/vendor/has/src/index.js +0 -7
  147. package/vendor/has-bigints/index.js +0 -12
  148. package/vendor/has-symbols/index.js +0 -15
  149. package/vendor/has-symbols/shams.js +0 -42
  150. package/vendor/has-tostringtag/shams.js +0 -9
  151. package/vendor/is-arguments/index.js +0 -36
  152. package/vendor/is-bigint/index.js +0 -39
  153. package/vendor/is-boolean-object/index.js +0 -29
  154. package/vendor/is-date-object/index.js +0 -22
  155. package/vendor/is-map/index.js +0 -42
  156. package/vendor/is-number-object/index.js +0 -26
  157. package/vendor/is-regex/index.js +0 -61
  158. package/vendor/is-set/index.js +0 -42
  159. package/vendor/is-string/index.js +0 -26
  160. package/vendor/is-symbol/index.js +0 -36
  161. package/vendor/is-typed-array/index.js +0 -67
  162. package/vendor/is-weakmap/index.js +0 -42
  163. package/vendor/is-weakset/index.js +0 -42
  164. package/vendor/object-inspect/index.js +0 -515
  165. package/vendor/object-is/implementation.js +0 -18
  166. package/vendor/object-is/index.js +0 -25
  167. package/vendor/object-is/polyfill.js +0 -9
  168. package/vendor/object-is/shim.js +0 -17
  169. package/vendor/object-keys/implementation.js +0 -124
  170. package/vendor/object-keys/index.js +0 -35
  171. package/vendor/object-keys/isArguments.js +0 -17
  172. package/vendor/object.assign/implementation.js +0 -46
  173. package/vendor/object.assign/index.js +0 -29
  174. package/vendor/object.assign/polyfill.js +0 -57
  175. package/vendor/object.assign/shim.js +0 -17
  176. package/vendor/regexp.prototype.flags/implementation.js +0 -30
  177. package/vendor/regexp.prototype.flags/index.js +0 -25
  178. package/vendor/regexp.prototype.flags/polyfill.js +0 -23
  179. package/vendor/regexp.prototype.flags/shim.js +0 -29
  180. package/vendor/side-channel/index.js +0 -128
  181. package/vendor/which-boxed-primitive/index.js +0 -38
  182. package/vendor/which-collection/index.js +0 -29
  183. package/vendor/which-typed-array/index.js +0 -63
@@ -35,12 +35,6 @@ export interface vtkCellArray extends vtkDataArray {
35
35
  */
36
36
  getCell(loc: any): void;
37
37
 
38
- /**
39
- * Reset the cell array by setting the number of cells to 0.
40
- * NOTE: This won't touch the actual memory of the underlying typedArray.
41
- */
42
- initialize(): void;
43
-
44
38
  /**
45
39
  * Insert a cell to this array in the next available slot.
46
40
  * @param {Number[]} cellPointIds The list of point ids (NOT prefixed with the number of points)
@@ -1,5 +1,5 @@
1
- import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
1
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
2
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
3
  import macro from '../../macros.js';
4
4
  import vtkDataArray from './DataArray.js';
5
5
  import { VtkDataTypes } from './DataArray/Constants.js';
@@ -47,6 +47,8 @@ function vtkCellArray(publicAPI, model) {
47
47
  // Set our className
48
48
  model.classHierarchy.push('vtkCellArray');
49
49
 
50
+ var superClass = _objectSpread({}, publicAPI);
51
+
50
52
  publicAPI.getNumberOfCells = function (recompute) {
51
53
  if (model.numberOfCells !== undefined && !recompute) {
52
54
  return model.numberOfCells;
@@ -70,10 +72,26 @@ function vtkCellArray(publicAPI, model) {
70
72
  return model.cellSizes;
71
73
  };
72
74
 
73
- var superSetData = publicAPI.setData;
75
+ publicAPI.resize = function (requestedNumTuples) {
76
+ var oldNumTuples = publicAPI.getNumberOfTuples();
77
+ superClass.resize(requestedNumTuples);
78
+ var newNumTuples = publicAPI.getNumberOfTuples();
79
+
80
+ if (newNumTuples < oldNumTuples) {
81
+ if (newNumTuples === 0) {
82
+ model.numberOfCells = 0;
83
+ model.cellSizes = [];
84
+ } else {
85
+ // We do not know how many cells are left.
86
+ // Set to undefined to ensure insertNextCell works correctly.
87
+ model.numberOfCells = undefined;
88
+ model.cellSizes = undefined;
89
+ }
90
+ }
91
+ };
74
92
 
75
93
  publicAPI.setData = function (typedArray) {
76
- superSetData(typedArray, 1);
94
+ superClass.setData(typedArray, 1);
77
95
  model.numberOfCells = undefined;
78
96
  model.cellSizes = undefined;
79
97
  };
@@ -84,15 +102,6 @@ function vtkCellArray(publicAPI, model) {
84
102
  return model.values.subarray(cellLoc, cellLoc + numberOfPoints);
85
103
  };
86
104
 
87
- var superInitialize = publicAPI.initialize;
88
-
89
- publicAPI.initialize = function () {
90
- superInitialize(); // Set to undefined to ensure insertNextCell works correctly
91
-
92
- model.numberOfCells = undefined;
93
- model.cellSizes = undefined;
94
- };
95
-
96
105
  publicAPI.insertNextCell = function (cellPointIds) {
97
106
  var cellId = publicAPI.getNumberOfCells();
98
107
  publicAPI.insertNextTuples([cellPointIds.length].concat(_toConsumableArray(cellPointIds))); // By computing the number of cells earlier, we made sure that numberOfCells is defined
@@ -1,3 +1,4 @@
1
+ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
1
2
  import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
2
3
  import _createClass from '@babel/runtime/helpers/createClass';
3
4
  import _get from '@babel/runtime/helpers/get';
@@ -10,7 +11,6 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
10
11
 
11
12
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
12
13
 
13
- /* eslint-disable prefer-rest-params */
14
14
  var ClassHierarchy = /*#__PURE__*/function (_Array) {
15
15
  _inherits(ClassHierarchy, _Array);
16
16
 
@@ -25,13 +25,18 @@ var ClassHierarchy = /*#__PURE__*/function (_Array) {
25
25
  _createClass(ClassHierarchy, [{
26
26
  key: "push",
27
27
  value: function push() {
28
- for (var i = 0; i < arguments.length; i++) {
29
- if (!this.includes(arguments[i])) {
30
- _get(_getPrototypeOf(ClassHierarchy.prototype), "push", this).call(this, arguments[i]);
31
- }
28
+ var _this = this,
29
+ _get2;
30
+
31
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
32
+ args[_key] = arguments[_key];
32
33
  }
33
34
 
34
- return this.length;
35
+ // no perf issue since args.length should be small
36
+ var newArgs = args.filter(function (arg) {
37
+ return !_this.includes(arg);
38
+ });
39
+ return (_get2 = _get(_getPrototypeOf(ClassHierarchy.prototype), "push", this)).call.apply(_get2, [this].concat(_toConsumableArray(newArgs)));
35
40
  }
36
41
  }]);
37
42
 
@@ -264,9 +264,29 @@ export interface vtkDataArray extends vtkObject {
264
264
  t: float
265
265
  ): void;
266
266
 
267
+ /**
268
+ * Resize the array to the requested number of tuples and preserve data.
269
+ * Increasing the array size may allocate extra memory beyond what was
270
+ * requested.
271
+ * Decreasing the array size will trim memory to the requested size.
272
+ * model.size WILL be modified according ot the new size.
273
+ * If requestedNumTuples > getNumberOfTuples(),
274
+ * it creates a new typed array and copies the old values to the new array.
275
+ * If requestedNumTuples < getNumberOfTuples(), the typed array is untouched,
276
+ * only model.size is modified.
277
+ * @param {Number} requestedNumTuples Final expected number of tuples; must be >= 0
278
+ * @returns {Boolean} True if a resize occured, false otherwise
279
+ * @see insertNextTuple
280
+ * @see insertNextTuples
281
+ * @see initialize
282
+ */
283
+ resize(requestedNumTuples: number): boolean;
284
+
267
285
  /**
268
286
  * Reset this array.
269
287
  * NOTE: This won't touch the actual memory of the underlying typedArray.
288
+ * @see insertNextTuple
289
+ * @see insertNextTuples
270
290
  */
271
291
  initialize(): void;
272
292
 
@@ -193,16 +193,33 @@ function vtkDataArray(publicAPI, model) {
193
193
  model.values = newTypedArray(model.dataType, (requestedNumTuples + curNumTuples) * numComps);
194
194
  model.values.set(oldValues);
195
195
  return true;
196
- } // Requested size is smaller than current size
196
+ } // Requested size is smaller than currently allocated size
197
197
 
198
198
 
199
- model.size = requestedNumTuples * numComps;
200
- dataChange();
199
+ if (model.size > requestedNumTuples * numComps) {
200
+ model.size = requestedNumTuples * numComps;
201
+ dataChange();
202
+ }
203
+
201
204
  return true;
202
205
  }
203
206
 
207
+ publicAPI.resize = function (requestedNumTuples) {
208
+ resize(requestedNumTuples);
209
+ var newSize = requestedNumTuples * publicAPI.getNumberOfComponents();
210
+
211
+ if (model.size !== newSize) {
212
+ model.size = newSize;
213
+ dataChange();
214
+ return true;
215
+ }
216
+
217
+ return false;
218
+ }; // FIXME, to rename into "clear()" or "reset()"
219
+
220
+
204
221
  publicAPI.initialize = function () {
205
- resize(0);
222
+ publicAPI.resize(0);
206
223
  };
207
224
 
208
225
  publicAPI.getElementComponentSize = function () {
@@ -2,7 +2,7 @@ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
2
2
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
3
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
4
4
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
5
- import { newInstance as newInstance$1, obj, setGet, get, event, proxy, proxyPropertyMapping, chain } from '../../macros.js';
5
+ import { newInstance as newInstance$1, obj, setGet, get, moveToProtected, event, proxy, proxyPropertyMapping, chain } from '../../macros.js';
6
6
  import vtkAnnotatedCubeActor from '../../Rendering/Core/AnnotatedCubeActor.js';
7
7
  import vtkAxesActor from '../../Rendering/Core/AxesActor.js';
8
8
  import vtkCornerAnnotation from '../../Interaction/UI/CornerAnnotation.js';
@@ -42,10 +42,10 @@ function vtkViewProxy(publicAPI, model) {
42
42
  background: [0, 0, 0]
43
43
  });
44
44
  model.renderWindow.addRenderer(model.renderer);
45
- model.openglRenderWindow = model.renderWindow.newAPISpecificView();
46
- model.renderWindow.addView(model.openglRenderWindow);
45
+ model._openGLRenderWindow = model.renderWindow.newAPISpecificView();
46
+ model.renderWindow.addView(model._openGLRenderWindow);
47
47
  model.interactor = vtkRenderWindowInteractor.newInstance();
48
- model.interactor.setView(model.openglRenderWindow);
48
+ model.interactor.setView(model._openGLRenderWindow);
49
49
  model.interactorStyle3D = vtkInteractorStyleManipulator.newInstance();
50
50
  model.interactorStyle2D = vtkInteractorStyleManipulator.newInstance(); // Apply default interaction styles
51
51
 
@@ -143,14 +143,17 @@ function vtkViewProxy(publicAPI, model) {
143
143
  if (model.container) {
144
144
  model.orientationWidget.setEnabled(false);
145
145
  model.interactor.unbindEvents(model.container);
146
- model.openglRenderWindow.setContainer(null);
146
+
147
+ model._openGLRenderWindow.setContainer(null);
148
+
147
149
  model.cornerAnnotation.setContainer(null);
148
150
  }
149
151
 
150
152
  model.container = container;
151
153
 
152
154
  if (container) {
153
- model.openglRenderWindow.setContainer(container);
155
+ model._openGLRenderWindow.setContainer(container);
156
+
154
157
  model.cornerAnnotation.setContainer(container);
155
158
  model.interactor.initialize();
156
159
  model.interactor.bindEvents(container);
@@ -170,7 +173,9 @@ function vtkViewProxy(publicAPI, model) {
170
173
  var devicePixelRatio = window.devicePixelRatio || 1;
171
174
  var width = Math.max(10, Math.floor(devicePixelRatio * dims.width));
172
175
  var height = Math.max(10, Math.floor(devicePixelRatio * dims.height));
173
- model.openglRenderWindow.setSize(width, height);
176
+
177
+ model._openGLRenderWindow.setSize(width, height);
178
+
174
179
  publicAPI.invokeResize({
175
180
  width: width,
176
181
  height: height
@@ -511,7 +516,9 @@ function vtkViewProxy(publicAPI, model) {
511
516
 
512
517
  model.interactor.delete();
513
518
  model.renderer.delete();
514
- model.openglRenderWindow.delete();
519
+
520
+ model._openGLRenderWindow.delete();
521
+
515
522
  model.renderWindow.delete();
516
523
  }, publicAPI.delete); // --------------------------------------------------------------------------
517
524
  // Initialization from state or input
@@ -542,8 +549,9 @@ function extend(publicAPI, model) {
542
549
  Object.assign(model, DEFAULT_VALUES, initialValues);
543
550
  obj(publicAPI, model);
544
551
  setGet(publicAPI, model, ['name', 'disableAnimation']);
545
- get(publicAPI, model, ['annotationOpacity', 'camera', 'container', 'cornerAnnotation', 'interactor', 'interactorStyle2D', 'interactorStyle3D', 'openglRenderWindow', // todo breaking? convert to apiSpecificWindow
552
+ get(publicAPI, model, ['annotationOpacity', 'camera', 'container', 'cornerAnnotation', 'interactor', 'interactorStyle2D', 'interactorStyle3D', '_openGLRenderWindow', // todo breaking? convert to apiSpecificWindow
546
553
  'orientationAxesType', 'presetToOrientationAxes', 'renderer', 'renderWindow', 'representations', 'useParallelRendering']);
554
+ moveToProtected(publicAPI, model, ['openGLRenderWindow']);
547
555
  event(publicAPI, model, 'Resize'); // Object specific methods
548
556
 
549
557
  vtkViewProxy(publicAPI, model); // Proxy handling
@@ -1,7 +1,7 @@
1
1
  import { mat4, quat } from 'gl-matrix';
2
2
  import macro from '../../macros.js';
3
3
  import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
4
- import { B as degreesFromRadians, r as radiansFromDegrees, a as areMatricesEqual } from '../../Common/Core/Math/index.js';
4
+ import { B as degreesFromRadians, r as radiansFromDegrees } from '../../Common/Core/Math/index.js';
5
5
  import vtkProp from './Prop.js';
6
6
 
7
7
  // vtkProp3D methods
@@ -83,13 +83,8 @@ function vtkProp3D(publicAPI, model) {
83
83
  };
84
84
 
85
85
  publicAPI.setUserMatrix = function (matrix) {
86
- if (areMatricesEqual(model.userMatrix, matrix)) {
87
- return false;
88
- }
89
-
90
86
  mat4.copy(model.userMatrix, matrix);
91
87
  publicAPI.modified();
92
- return true;
93
88
  };
94
89
 
95
90
  publicAPI.getMatrix = function () {
@@ -63,20 +63,22 @@ function vtkRenderWindow(publicAPI, model) {
63
63
  }
64
64
 
65
65
  view.setRenderable(publicAPI);
66
- model.views.push(view);
66
+
67
+ model._views.push(view);
68
+
67
69
  publicAPI.modified();
68
70
  }; // Remove renderer
69
71
 
70
72
 
71
73
  publicAPI.removeView = function (view) {
72
- model.views = model.views.filter(function (r) {
74
+ model._views = model._views.filter(function (r) {
73
75
  return r !== view;
74
76
  });
75
77
  publicAPI.modified();
76
78
  };
77
79
 
78
80
  publicAPI.hasView = function (view) {
79
- return model.views.indexOf(view) !== -1;
81
+ return model._views.indexOf(view) !== -1;
80
82
  }; // handle any pre render initializations
81
83
 
82
84
 
@@ -95,7 +97,7 @@ function vtkRenderWindow(publicAPI, model) {
95
97
  if (model.interactor) {
96
98
  model.interactor.render();
97
99
  } else {
98
- model.views.forEach(function (view) {
100
+ model._views.forEach(function (view) {
99
101
  return view.traverseAllPasses();
100
102
  });
101
103
  }
@@ -138,7 +140,7 @@ function vtkRenderWindow(publicAPI, model) {
138
140
  var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'image/png';
139
141
  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
140
142
  macro.setImmediate(publicAPI.render);
141
- return model.views.map(function (view) {
143
+ return model._views.map(function (view) {
142
144
  return view.captureNextImage ? view.captureNextImage(format, opts) : undefined;
143
145
  }).filter(function (i) {
144
146
  return !!i;
@@ -163,9 +165,10 @@ function extend(publicAPI, model) {
163
165
  Object.assign(model, DEFAULT_VALUES, initialValues); // Build VTK API
164
166
 
165
167
  macro.obj(publicAPI, model);
166
- macro.setGet(publicAPI, model, ['interactor', 'numberOfLayers', 'views', 'defaultViewAPI']);
168
+ macro.setGet(publicAPI, model, ['interactor', 'numberOfLayers', '_views', 'defaultViewAPI']);
167
169
  macro.get(publicAPI, model, ['neverRendered']);
168
170
  macro.getArray(publicAPI, model, ['renderers']);
171
+ macro.moveToProtected(publicAPI, model, ['views']);
169
172
  macro.event(publicAPI, model, 'completion'); // Object methods
170
173
 
171
174
  vtkRenderWindow(publicAPI, model);
@@ -243,8 +243,7 @@ var DEFAULT_VALUES = {
243
243
  specular: 0.2,
244
244
  specularPower: 10.0,
245
245
  useLabelOutline: false,
246
- labelOutlineThickness: 1,
247
- labelOutlineOpacity: 1.0
246
+ labelOutlineThickness: 1
248
247
  }; // ----------------------------------------------------------------------------
249
248
 
250
249
  function extend(publicAPI, model) {
@@ -274,7 +273,7 @@ function extend(publicAPI, model) {
274
273
  }
275
274
  }
276
275
 
277
- macro.setGet(publicAPI, model, ['independentComponents', 'interpolationType', 'shade', 'ambient', 'diffuse', 'specular', 'specularPower', 'useLabelOutline', 'labelOutlineThickness', 'labelOutlineOpacity']); // Object methods
276
+ macro.setGet(publicAPI, model, ['independentComponents', 'interpolationType', 'shade', 'ambient', 'diffuse', 'specular', 'specularPower', 'useLabelOutline', 'labelOutlineThickness']); // Object methods
278
277
 
279
278
  vtkVolumeProperty(publicAPI, model);
280
279
  } // ----------------------------------------------------------------------------
@@ -10,7 +10,7 @@ function vtkCanvasView(publicAPI, model) {
10
10
 
11
11
  function updateWindow() {
12
12
  // Canvas size
13
- if (model.renderable) {
13
+ if (model._renderable) {
14
14
  model.canvas.setAttribute('width', model.size[0]);
15
15
  model.canvas.setAttribute('height', model.size[1]);
16
16
  } // ImageStream size
@@ -111,8 +111,8 @@ function vtkCanvasView(publicAPI, model) {
111
111
  // Make us look like a View (i.e.: vtkOpenGLRenderWindow)
112
112
  // --------------------------------------------------------------------------
113
113
 
114
- model.renderable = publicAPI;
115
- model.renderers = [publicAPI];
114
+ model._renderable = publicAPI;
115
+ model._renderers = [publicAPI];
116
116
 
117
117
  publicAPI.traverseAllPasses = function () {};
118
118
 
@@ -154,10 +154,11 @@ function extend(publicAPI, model) {
154
154
 
155
155
  macro.obj(publicAPI, model, initialValues); // Build VTK API
156
156
 
157
- macro.get(publicAPI, model, ['useBackgroundImage', 'renderable']);
157
+ macro.get(publicAPI, model, ['useBackgroundImage', '_renderable']);
158
158
  macro.setGet(publicAPI, model, ['canvas', 'cursor', 'useOffScreen', 'interactor']);
159
159
  macro.setGetArray(publicAPI, model, ['size'], 2);
160
- macro.getArray(publicAPI, model, ['renderers']); // Object methods
160
+ macro.getArray(publicAPI, model, ['_renderers']);
161
+ macro.moveToProtected(publicAPI, model, ['renderable', 'renderers']); // Object methods
161
162
 
162
163
  vtkCanvasView(publicAPI, model);
163
164
  } // ----------------------------------------------------------------------------
@@ -20,12 +20,12 @@ function vtkGenericRenderWindow(publicAPI, model) {
20
20
  model.renderer = vtkRenderer.newInstance();
21
21
  model.renderWindow.addRenderer(model.renderer); // OpenGLRenderWindow
22
22
 
23
- model.openGLRenderWindow = vtkRenderWindow$1.newInstance();
24
- model.renderWindow.addView(model.openGLRenderWindow); // Interactor
23
+ model._openGLRenderWindow = vtkRenderWindow$1.newInstance();
24
+ model.renderWindow.addView(model._openGLRenderWindow); // Interactor
25
25
 
26
26
  model.interactor = vtkRenderWindowInteractor.newInstance();
27
27
  model.interactor.setInteractorStyle(vtkInteractorStyleTrackballCamera.newInstance());
28
- model.interactor.setView(model.openGLRenderWindow);
28
+ model.interactor.setView(model._openGLRenderWindow);
29
29
  model.interactor.initialize(); // Expose background
30
30
 
31
31
  publicAPI.setBackground = model.renderer.setBackground; // Update BG color
@@ -36,7 +36,9 @@ function vtkGenericRenderWindow(publicAPI, model) {
36
36
  if (model.container) {
37
37
  var dims = model.container.getBoundingClientRect();
38
38
  var devicePixelRatio = window.devicePixelRatio || 1;
39
- model.openGLRenderWindow.setSize(Math.floor(dims.width * devicePixelRatio), Math.floor(dims.height * devicePixelRatio));
39
+
40
+ model._openGLRenderWindow.setSize(Math.floor(dims.width * devicePixelRatio), Math.floor(dims.height * devicePixelRatio));
41
+
40
42
  invokeResize();
41
43
  model.renderWindow.render();
42
44
  }
@@ -50,7 +52,9 @@ function vtkGenericRenderWindow(publicAPI, model) {
50
52
 
51
53
 
52
54
  model.container = el;
53
- model.openGLRenderWindow.setContainer(model.container); // Bind to new container
55
+
56
+ model._openGLRenderWindow.setContainer(model.container); // Bind to new container
57
+
54
58
 
55
59
  if (model.container) {
56
60
  model.interactor.bindEvents(model.container);
@@ -58,7 +62,7 @@ function vtkGenericRenderWindow(publicAPI, model) {
58
62
  }; // Properly release GL context
59
63
 
60
64
 
61
- publicAPI.delete = macro.chain(publicAPI.setContainer, model.openGLRenderWindow.delete, publicAPI.delete); // Handle size
65
+ publicAPI.delete = macro.chain(publicAPI.setContainer, model._openGLRenderWindow.delete, publicAPI.delete); // Handle size
62
66
 
63
67
  if (model.listenWindowResize) {
64
68
  window.addEventListener('resize', publicAPI.resize);
@@ -81,7 +85,8 @@ function extend(publicAPI, model) {
81
85
  Object.assign(model, DEFAULT_VALUES, initialValues); // Object methods
82
86
 
83
87
  macro.obj(publicAPI, model);
84
- macro.get(publicAPI, model, ['renderWindow', 'renderer', 'openGLRenderWindow', 'interactor', 'container']);
88
+ macro.get(publicAPI, model, ['renderWindow', 'renderer', '_openGLRenderWindow', 'interactor', 'container']);
89
+ macro.moveToProtected(publicAPI, model, ['openGLRenderWindow']);
85
90
  macro.event(publicAPI, model, 'resize'); // Object specific methods
86
91
 
87
92
  vtkGenericRenderWindow(publicAPI, model);
@@ -13,7 +13,7 @@ function vtkOpenGLActor(publicAPI, model) {
13
13
  publicAPI.buildPass = function (prepass) {
14
14
  if (prepass) {
15
15
  model._openGLRenderWindow = publicAPI.getFirstAncestorOfType('vtkOpenGLRenderWindow');
16
- model.openGLRenderer = publicAPI.getFirstAncestorOfType('vtkOpenGLRenderer');
16
+ model._openGLRenderer = publicAPI.getFirstAncestorOfType('vtkOpenGLRenderer');
17
17
  model.context = model._openGLRenderWindow.getContext();
18
18
  publicAPI.prepareNodes();
19
19
  publicAPI.addMissingNodes(model.renderable.getTextures());
@@ -40,7 +40,7 @@ function vtkOpenGLActor(publicAPI, model) {
40
40
  };
41
41
 
42
42
  publicAPI.traverseOpaqueZBufferPass = function (renderPass) {
43
- if (!model.renderable || !model.renderable.getNestedVisibility() || model.openGLRenderer.getSelector() && !model.renderable.getNestedPickable()) {
43
+ if (!model.renderable || !model.renderable.getNestedVisibility() || model._openGLRenderer.getSelector() && !model.renderable.getNestedPickable()) {
44
44
  return;
45
45
  }
46
46
 
@@ -51,7 +51,7 @@ function vtkOpenGLActor(publicAPI, model) {
51
51
 
52
52
 
53
53
  publicAPI.traverseOpaquePass = function (renderPass) {
54
- if (!model.renderable || !model.renderable.getNestedVisibility() || !model.renderable.getIsOpaque() || model.openGLRenderer.getSelector() && !model.renderable.getNestedPickable()) {
54
+ if (!model.renderable || !model.renderable.getNestedVisibility() || !model.renderable.getIsOpaque() || model._openGLRenderer.getSelector() && !model.renderable.getNestedPickable()) {
55
55
  return;
56
56
  }
57
57
 
@@ -62,7 +62,7 @@ function vtkOpenGLActor(publicAPI, model) {
62
62
 
63
63
 
64
64
  publicAPI.traverseTranslucentPass = function (renderPass) {
65
- if (!model.renderable || !model.renderable.getNestedVisibility() || model.renderable.getIsOpaque() || model.openGLRenderer.getSelector() && !model.renderable.getNestedPickable()) {
65
+ if (!model.renderable || !model.renderable.getNestedVisibility() || model.renderable.getIsOpaque() || model._openGLRenderer.getSelector() && !model.renderable.getNestedPickable()) {
66
66
  return;
67
67
  }
68
68
 
@@ -16,7 +16,7 @@ function vtkOpenGLActor2D(publicAPI, model) {
16
16
  }
17
17
 
18
18
  model._openGLRenderWindow = publicAPI.getFirstAncestorOfType('vtkOpenGLRenderWindow');
19
- model.openGLRenderer = publicAPI.getFirstAncestorOfType('vtkOpenGLRenderer');
19
+ model._openGLRenderer = publicAPI.getFirstAncestorOfType('vtkOpenGLRenderer');
20
20
  model.context = model._openGLRenderWindow.getContext();
21
21
  publicAPI.prepareNodes();
22
22
  publicAPI.addMissingNodes(model.renderable.getTextures());
@@ -54,7 +54,7 @@ function vtkOpenGLActor2D(publicAPI, model) {
54
54
 
55
55
 
56
56
  publicAPI.traverseOpaquePass = function (renderPass) {
57
- if (!model.oglmapper || !model.renderable || !model.renderable.getNestedVisibility() || !model.renderable.getIsOpaque() || model.openGLRenderer.getSelector() && !model.renderable.getNestedPickable()) {
57
+ if (!model.oglmapper || !model.renderable || !model.renderable.getNestedVisibility() || !model.renderable.getIsOpaque() || model._openGLRenderer.getSelector() && !model.renderable.getNestedPickable()) {
58
58
  return;
59
59
  }
60
60
 
@@ -65,7 +65,7 @@ function vtkOpenGLActor2D(publicAPI, model) {
65
65
 
66
66
 
67
67
  publicAPI.traverseTranslucentPass = function (renderPass) {
68
- if (!model.oglmapper || !model.renderable || !model.renderable.getNestedVisibility() || model.renderable.getIsOpaque() || model.openGLRenderer.getSelector() && !model.renderable.getNestedPickable()) {
68
+ if (!model.oglmapper || !model.renderable || !model.renderable.getNestedVisibility() || model.renderable.getIsOpaque() || model._openGLRenderer.getSelector() && !model.renderable.getNestedPickable()) {
69
69
  return;
70
70
  }
71
71
 
@@ -75,7 +75,7 @@ function vtkOpenGLActor2D(publicAPI, model) {
75
75
  };
76
76
 
77
77
  publicAPI.traverseOverlayPass = function (renderPass) {
78
- if (!model.oglmapper || !model.renderable || !model.renderable.getNestedVisibility() || model.openGLRenderer.getSelector() && !model.renderable.getNestedPickable) {
78
+ if (!model.oglmapper || !model.renderable || !model.renderable.getNestedVisibility() || model._openGLRenderer.getSelector() && !model.renderable.getNestedPickable) {
79
79
  return;
80
80
  }
81
81
 
@@ -12,8 +12,8 @@ function vtkOpenGLCamera(publicAPI, model) {
12
12
 
13
13
  publicAPI.buildPass = function (prepass) {
14
14
  if (prepass) {
15
- model.openGLRenderer = publicAPI.getFirstAncestorOfType('vtkOpenGLRenderer');
16
- model._openGLRenderWindow = model.openGLRenderer.getParent();
15
+ model._openGLRenderer = publicAPI.getFirstAncestorOfType('vtkOpenGLRenderer');
16
+ model._openGLRenderWindow = model._openGLRenderer.getParent();
17
17
  model.context = model._openGLRenderWindow.getContext();
18
18
  }
19
19
  }; // Renders myself
@@ -21,7 +21,8 @@ function vtkOpenGLCamera(publicAPI, model) {
21
21
 
22
22
  publicAPI.opaquePass = function (prepass) {
23
23
  if (prepass) {
24
- var tsize = model.openGLRenderer.getTiledSizeAndOrigin();
24
+ var tsize = model._openGLRenderer.getTiledSizeAndOrigin();
25
+
25
26
  model.context.viewport(tsize.lowerLeftU, tsize.lowerLeftV, tsize.usize, tsize.vsize);
26
27
  model.context.scissor(tsize.lowerLeftU, tsize.lowerLeftV, tsize.usize, tsize.vsize);
27
28
  }
@@ -38,7 +39,9 @@ function vtkOpenGLCamera(publicAPI, model) {
38
39
  mat3.fromMat4(model.keyMatrices.normalMatrix, model.keyMatrices.wcvc);
39
40
  mat3.invert(model.keyMatrices.normalMatrix, model.keyMatrices.normalMatrix);
40
41
  mat4.transpose(model.keyMatrices.wcvc, model.keyMatrices.wcvc);
41
- var aspectRatio = model.openGLRenderer.getAspectRatio();
42
+
43
+ var aspectRatio = model._openGLRenderer.getAspectRatio();
44
+
42
45
  mat4.copy(model.keyMatrices.vcpc, model.renderable.getProjectionMatrix(aspectRatio, -1, 1));
43
46
  mat4.transpose(model.keyMatrices.vcpc, model.keyMatrices.vcpc);
44
47
  mat4.multiply(model.keyMatrices.wcpc, model.keyMatrices.vcpc, model.keyMatrices.wcvc);
@@ -11,8 +11,8 @@ function vtkOpenGLCubeAxesActor(publicAPI, model) {
11
11
 
12
12
  publicAPI.buildPass = function (prepass) {
13
13
  if (prepass) {
14
- model.openGLRenderer = publicAPI.getFirstAncestorOfType('vtkOpenGLRenderer');
15
- model.openGLRenderWindow = model.openGLRenderer.getParent();
14
+ model._openGLRenderer = publicAPI.getFirstAncestorOfType('vtkOpenGLRenderer');
15
+ model._openGLRenderWindow = model._openGLRenderer.getParent();
16
16
 
17
17
  if (!model.CubeAxesActorHelper.getRenderable()) {
18
18
  model.CubeAxesActorHelper.setRenderable(model.renderable);
@@ -27,9 +27,11 @@ function vtkOpenGLCubeAxesActor(publicAPI, model) {
27
27
 
28
28
  publicAPI.opaquePass = function (prepass, renderPass) {
29
29
  if (prepass) {
30
- var camera = model.openGLRenderer ? model.openGLRenderer.getRenderable().getActiveCamera() : null;
31
- var tsize = model.openGLRenderer.getTiledSizeAndOrigin();
32
- model.CubeAxesActorHelper.updateAPISpecificData([tsize.usize, tsize.vsize], camera, model.openGLRenderWindow.getRenderable());
30
+ var camera = model._openGLRenderer ? model._openGLRenderer.getRenderable().getActiveCamera() : null;
31
+
32
+ var tsize = model._openGLRenderer.getTiledSizeAndOrigin();
33
+
34
+ model.CubeAxesActorHelper.updateAPISpecificData([tsize.usize, tsize.vsize], camera, model._openGLRenderWindow.getRenderable());
33
35
  }
34
36
  };
35
37
  } // ----------------------------------------------------------------------------
@@ -18,7 +18,7 @@ function vtkForwardPass(publicAPI, model) {
18
18
  } // we just render our delegates in order
19
19
 
20
20
 
21
- model.currentParent = parent; // build
21
+ model._currentParent = parent; // build
22
22
 
23
23
  publicAPI.setCurrentOperation('buildPass');
24
24
  viewNode.traverse(publicAPI);
@@ -317,8 +317,8 @@ function vtkOpenGLGlyph3DMapper(publicAPI, model) {
317
317
  var numPts = garray.length / 16;
318
318
  var compositePass = false;
319
319
 
320
- if (model.openGLRenderer.getSelector()) {
321
- if (model.openGLRenderer.getSelector().getCurrentPass() === PassTypes.COMPOSITE_INDEX_PASS) {
320
+ if (model._openGLRenderer.getSelector()) {
321
+ if (model._openGLRenderer.getSelector().getCurrentPass() === PassTypes.COMPOSITE_INDEX_PASS) {
322
322
  compositePass = true;
323
323
  }
324
324
  } // for every primitive type
@@ -348,10 +348,10 @@ function vtkOpenGLGlyph3DMapper(publicAPI, model) {
348
348
  // draw the array multiple times with different cam matrix
349
349
  for (var p = 0; p < numPts; ++p) {
350
350
  if (compositePass) {
351
- model.openGLRenderer.getSelector().renderCompositeIndex(p);
351
+ model._openGLRenderer.getSelector().renderCompositeIndex(p);
352
352
  }
353
353
 
354
- publicAPI.updateGlyphShaderParameters(normalMatrixUsed, mcvcMatrixUsed, model.primitives[i], carray, garray, narray, p, compositePass ? model.openGLRenderer.getSelector() : null);
354
+ publicAPI.updateGlyphShaderParameters(normalMatrixUsed, mcvcMatrixUsed, model.primitives[i], carray, garray, narray, p, compositePass ? model._openGLRenderer.getSelector() : null);
355
355
  gl.drawArrays(mode, 0, cabo.getElementCount());
356
356
  }
357
357
  }
@@ -43,15 +43,17 @@ function vtkOpenGLImageMapper(publicAPI, model) {
43
43
  if (prepass) {
44
44
  model.currentRenderPass = null;
45
45
  model.openGLImageSlice = publicAPI.getFirstAncestorOfType('vtkOpenGLImageSlice');
46
- model.openGLRenderer = publicAPI.getFirstAncestorOfType('vtkOpenGLRenderer');
47
- model._openGLRenderWindow = model.openGLRenderer.getParent();
46
+ model._openGLRenderer = publicAPI.getFirstAncestorOfType('vtkOpenGLRenderer');
47
+ model._openGLRenderWindow = model._openGLRenderer.getParent();
48
48
  model.context = model._openGLRenderWindow.getContext();
49
49
  model.tris.setOpenGLRenderWindow(model._openGLRenderWindow);
50
50
  model.openGLTexture.setOpenGLRenderWindow(model._openGLRenderWindow);
51
51
  model.colorTexture.setOpenGLRenderWindow(model._openGLRenderWindow);
52
52
  model.pwfTexture.setOpenGLRenderWindow(model._openGLRenderWindow);
53
- var ren = model.openGLRenderer.getRenderable();
54
- model.openGLCamera = model.openGLRenderer.getViewNodeFor(ren.getActiveCamera()); // is slice set by the camera
53
+
54
+ var ren = model._openGLRenderer.getRenderable();
55
+
56
+ model.openGLCamera = model._openGLRenderer.getViewNodeFor(ren.getActiveCamera()); // is slice set by the camera
55
57
 
56
58
  if (model.renderable.getSliceAtFocalPoint()) {
57
59
  model.renderable.setSliceFromCamera(ren.getActiveCamera());
@@ -92,7 +94,9 @@ function vtkOpenGLImageMapper(publicAPI, model) {
92
94
 
93
95
  publicAPI.render = function () {
94
96
  var actor = model.openGLImageSlice.getRenderable();
95
- var ren = model.openGLRenderer.getRenderable();
97
+
98
+ var ren = model._openGLRenderer.getRenderable();
99
+
96
100
  publicAPI.renderPiece(ren, actor);
97
101
  };
98
102