@kitware/vtk.js 22.6.1 → 23.1.0
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.
- package/Common/Core/CellArray.d.ts +2 -2
- package/Common/Core/DataArray.d.ts +2 -2
- package/Common/Core/Endian.d.ts +3 -1
- package/Common/Core/ImageHelper.d.ts +1 -1
- package/Common/Core/LookupTable.d.ts +2 -2
- package/Common/Core/Math.d.ts +1 -1
- package/Common/Core/MatrixBuilder.d.ts +1 -1
- package/Common/Core/Points.d.ts +2 -2
- package/Common/Core/PriorityQueue.d.ts +1 -1
- package/Common/Core/ProgressHandler.d.ts +1 -1
- package/Common/Core/ScalarsToColors.d.ts +3 -3
- package/Common/Core/StringArray.d.ts +1 -1
- package/Common/Core/VariantArray.d.ts +1 -1
- package/Common/DataModel/Box.d.ts +2 -2
- package/Common/DataModel/CardinalSpline1D.d.ts +2 -2
- package/Common/DataModel/Cell.d.ts +3 -3
- package/Common/DataModel/Cone.d.ts +2 -2
- package/Common/DataModel/Cylinder.d.ts +2 -2
- package/Common/DataModel/DataSet.d.ts +2 -2
- package/Common/DataModel/DataSetAttributes/FieldData.d.ts +1 -1
- package/Common/DataModel/DataSetAttributes.d.ts +3 -3
- package/Common/DataModel/ITKHelper.js +16 -20
- package/Common/DataModel/ImageData.d.ts +36 -36
- package/Common/DataModel/KochanekSpline1D.d.ts +1 -1
- package/Common/DataModel/Line.d.ts +2 -2
- package/Common/DataModel/PiecewiseFunction.d.ts +2 -2
- package/Common/DataModel/Plane.d.ts +2 -2
- package/Common/DataModel/PointSet.d.ts +3 -3
- package/Common/DataModel/PolyData.d.ts +3 -3
- package/Common/DataModel/Polygon.d.ts +2 -2
- package/Common/DataModel/SelectionNode.d.ts +2 -2
- package/Common/DataModel/Sphere.d.ts +2 -2
- package/Common/DataModel/Spline1D.d.ts +1 -1
- package/Common/DataModel/Spline3D.d.ts +1 -1
- package/Common/DataModel/Triangle.d.ts +2 -2
- package/Common/Transform/LandmarkTransform.d.ts +2 -2
- package/Filters/General/AppendPolyData.d.ts +1 -1
- package/Filters/General/ImageCropFilter.d.ts +1 -1
- package/Filters/General/ImageOutlineFilter.d.ts +1 -1
- package/Filters/General/ImageSliceFilter.d.ts +2 -2
- package/Filters/General/ImageStreamline.d.ts +135 -0
- package/Filters/General/LineFilter.d.ts +1 -1
- package/Filters/General/OutlineFilter.d.ts +1 -1
- package/Filters/General/TriangleFilter.d.ts +1 -1
- package/Filters/General/TubeFilter.d.ts +2 -2
- package/Filters/Sources/Arrow2DSource.d.ts +2 -2
- package/Filters/Sources/ArrowSource.d.ts +2 -2
- package/Filters/Sources/CircleSource.d.ts +2 -2
- package/Filters/Sources/ConeSource.d.ts +2 -2
- package/Filters/Sources/CubeSource.d.ts +2 -2
- package/Filters/Sources/Cursor3D.d.ts +3 -3
- package/Filters/Sources/CylinderSource.d.ts +2 -2
- package/Filters/Sources/LineSource.d.ts +2 -2
- package/Filters/Sources/PlaneSource.d.ts +2 -2
- package/Filters/Sources/PointSource.d.ts +2 -2
- package/Filters/Sources/SphereSource.d.ts +2 -2
- package/Filters/Texture/TextureMapToPlane.d.ts +1 -1
- package/Filters/Texture/TextureMapToSphere.d.ts +1 -1
- package/IO/Core/DataAccessHelper/HtmlDataAccessHelper.d.ts +9 -0
- package/IO/Core/DataAccessHelper/HttpDataAccessHelper.d.ts +9 -0
- package/IO/Core/DataAccessHelper/JSZipDataAccessHelper.d.ts +13 -0
- package/IO/Core/DataAccessHelper/LiteHttpDataAccessHelper.d.ts +9 -0
- package/IO/Core/DataAccessHelper.d.ts +32 -0
- package/IO/Core/HttpDataSetReader.d.ts +226 -0
- package/IO/Core/HttpSceneLoader.d.ts +5 -5
- package/IO/Core/ImageStream/DefaultProtocol.d.ts +1 -1
- package/IO/Core/ImageStream/ViewStream.d.ts +4 -4
- package/IO/Core/ImageStream.d.ts +3 -3
- package/IO/Core/WSLinkClient.d.ts +1 -1
- package/IO/Geometry/DracoReader.d.ts +13 -9
- package/IO/Geometry/PLYReader.d.ts +13 -9
- package/IO/Geometry/PLYWriter.d.ts +2 -2
- package/IO/Geometry/STLReader.d.ts +14 -9
- package/IO/Geometry/STLWriter.d.ts +2 -2
- package/IO/Misc/ElevationReader.d.ts +11 -6
- package/IO/Misc/ITKImageReader.d.ts +1 -1
- package/IO/Misc/ITKPolyDataReader.d.ts +1 -1
- package/IO/Misc/JSONNucleoReader.d.ts +13 -9
- package/IO/Misc/JSONReader.d.ts +4 -4
- package/IO/Misc/MTLReader.d.ts +11 -7
- package/IO/Misc/OBJReader.d.ts +10 -6
- package/IO/Misc/PDBReader.d.ts +10 -6
- package/IO/XML/XMLImageDataReader.d.ts +1 -1
- package/IO/XML/XMLPolyDataReader.d.ts +1 -1
- package/IO/XML/XMLReader.d.ts +20 -16
- package/Interaction/Manipulators/MouseRangeManipulator.js +55 -1
- package/Interaction/Widgets/OrientationMarkerWidget.d.ts +22 -8
- package/Interaction/Widgets/OrientationMarkerWidget.js +62 -37
- package/Rendering/Core/AbstractMapper.d.ts +2 -2
- package/Rendering/Core/AbstractMapper3D.d.ts +2 -2
- package/Rendering/Core/AbstractPicker.d.ts +4 -4
- package/Rendering/Core/Actor.d.ts +21 -18
- package/Rendering/Core/Actor2D.d.ts +5 -5
- package/Rendering/Core/AnnotatedCubeActor.d.ts +1 -1
- package/Rendering/Core/AxesActor.d.ts +1 -1
- package/Rendering/Core/Camera.d.ts +2 -2
- package/Rendering/Core/CellPicker.d.ts +5 -5
- package/Rendering/Core/ColorTransferFunction.d.ts +1 -1
- package/Rendering/Core/Coordinate.d.ts +2 -2
- package/Rendering/Core/Follower.d.ts +2 -2
- package/Rendering/Core/Glyph3DMapper.d.ts +2 -2
- package/Rendering/Core/ImageMapper.d.ts +3 -3
- package/Rendering/Core/ImageProperty.d.ts +11 -2
- package/Rendering/Core/ImageProperty.js +3 -2
- package/Rendering/Core/ImageSlice.d.ts +4 -4
- package/Rendering/Core/Light.d.ts +2 -2
- package/Rendering/Core/Mapper.d.ts +5 -5
- package/Rendering/Core/Mapper2D.d.ts +4 -3
- package/Rendering/Core/Picker.d.ts +5 -5
- package/Rendering/Core/PixelSpaceCallbackMapper.d.ts +2 -2
- package/Rendering/Core/PointPicker.d.ts +3 -3
- package/Rendering/Core/Prop.d.ts +5 -5
- package/Rendering/Core/Prop3D.d.ts +2 -2
- package/Rendering/Core/Property.d.ts +2 -2
- package/Rendering/Core/Property2D.d.ts +2 -2
- package/Rendering/Core/RenderWindow.d.ts +4 -4
- package/Rendering/Core/RenderWindowInteractor.d.ts +2 -2
- package/Rendering/Core/Renderer.d.ts +17 -16
- package/Rendering/Core/ScalarBarActor.d.ts +3 -3
- package/Rendering/Core/Skybox.d.ts +1 -1
- package/Rendering/Core/SphereMapper.d.ts +1 -1
- package/Rendering/Core/StickMapper.d.ts +1 -1
- package/Rendering/Core/Texture.d.ts +1 -1
- package/Rendering/Core/Viewport.d.ts +4 -4
- package/Rendering/Core/Volume.d.ts +4 -4
- package/Rendering/Core/VolumeMapper.d.ts +2 -2
- package/Rendering/Core/VolumeProperty.d.ts +1 -1
- package/Rendering/Misc/CanvasView.d.ts +2 -2
- package/Rendering/Misc/FullScreenRenderWindow.d.ts +8 -8
- package/Rendering/Misc/GenericRenderWindow.d.ts +6 -6
- package/Rendering/Misc/RemoteView.d.ts +3 -3
- package/Rendering/Misc/RenderWindowWithControlBar.d.ts +2 -2
- package/Rendering/Misc/SynchronizableRenderWindow.d.ts +4 -3
- package/Rendering/Misc/TextureLODsDownloader.d.ts +4 -4
- package/Rendering/OpenGL/ImageMapper.js +1 -1
- package/Rendering/OpenGL/RenderWindow.d.ts +18 -18
- package/Rendering/OpenGL/VolumeMapper.js +16 -1
- package/Rendering/OpenGL/glsl/vtkVolumeFS.glsl.js +1 -1
- package/Rendering/SceneGraph/RenderPass.d.ts +2 -2
- package/Rendering/SceneGraph/ViewNode.d.ts +2 -2
- package/Rendering/SceneGraph/ViewNodeFactory.d.ts +1 -1
- package/Rendering/WebGPU/HardwareSelectionPass.js +0 -1
- package/Rendering/WebGPU/ImageMapper.js +1 -1
- package/Rendering/WebGPU/OrderIndependentTranslucentPass.js +1 -3
- package/Rendering/WebGPU/RenderEncoder.js +1 -4
- package/Widgets/Core/AbstractWidgetFactory.js +5 -3
- package/Widgets/Manipulators/LineManipulator.d.ts +1 -1
- package/Widgets/Manipulators/PlaneManipulator.d.ts +1 -1
- package/Widgets/Manipulators/TrackballManipulator.d.ts +1 -1
- package/Widgets/Representations/ResliceCursorContextRepresentation.d.ts +1 -1
- package/Widgets/Representations/WidgetRepresentation.d.ts +1 -1
- package/index.d.ts +7 -0
- package/interfaces.d.ts +4 -4
- package/macros.d.ts +1 -1
- package/package.json +1 -1
- package/types.d.ts +22 -1
- package/vtk.d.ts +7 -2
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { vtkObject } from '
|
|
2
|
-
import vtkAnnotatedCubeActor from '
|
|
3
|
-
import vtkAxesActor from '
|
|
4
|
-
import vtkRenderer from '
|
|
5
|
-
import vtkRenderWindowInteractor from '
|
|
1
|
+
import { vtkObject } from '../../interfaces';
|
|
2
|
+
import vtkAnnotatedCubeActor from '../../Rendering/Core/AnnotatedCubeActor';
|
|
3
|
+
import vtkAxesActor from '../../Rendering/Core/AxesActor';
|
|
4
|
+
import vtkRenderer from '../../Rendering/Core/Renderer';
|
|
5
|
+
import vtkRenderWindowInteractor from '../../Rendering/Core/RenderWindowInteractor';
|
|
6
|
+
import { Nullable } from '../../types';
|
|
6
7
|
|
|
7
8
|
export enum Corners {
|
|
8
9
|
TOP_LEFT,
|
|
@@ -17,6 +18,7 @@ export enum Corners {
|
|
|
17
18
|
export interface IOrientationMarkerWidgetInitialValues {
|
|
18
19
|
actor?: vtkAnnotatedCubeActor | vtkAxesActor,
|
|
19
20
|
interactor?: vtkRenderWindowInteractor,
|
|
21
|
+
parentRenderer?: vtkRenderer,
|
|
20
22
|
viewportCorner?: Corners,
|
|
21
23
|
viewportSize?: number,
|
|
22
24
|
minPixelSize?: number,
|
|
@@ -44,6 +46,11 @@ export interface vtkOrientationMarkerWidget extends vtkObject {
|
|
|
44
46
|
*/
|
|
45
47
|
getActor(): vtkAnnotatedCubeActor | vtkAxesActor;
|
|
46
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Gets the parent renderer, if any.
|
|
51
|
+
*/
|
|
52
|
+
getParentRenderer(): Nullable<vtkRenderer>;
|
|
53
|
+
|
|
47
54
|
/**
|
|
48
55
|
* Get wheter the orientation marker is enabled.
|
|
49
56
|
*/
|
|
@@ -83,10 +90,16 @@ export interface vtkOrientationMarkerWidget extends vtkObject {
|
|
|
83
90
|
|
|
84
91
|
/**
|
|
85
92
|
* Get the actor associated with the widget.
|
|
86
|
-
* @param actor
|
|
93
|
+
* @param {vtkAnnotatedCubeActor | vtkAxesActor} actor The actor instance.
|
|
87
94
|
*/
|
|
88
95
|
setActor(actor: vtkAnnotatedCubeActor | vtkAxesActor): void;
|
|
89
96
|
|
|
97
|
+
/**
|
|
98
|
+
* Sets the parent renderer
|
|
99
|
+
* @param {vtkRenderer} ren The parent renderer
|
|
100
|
+
*/
|
|
101
|
+
setParentRenderer(ren: vtkRenderer): boolean;
|
|
102
|
+
|
|
90
103
|
/**
|
|
91
104
|
* Set the widget enabled status, i.e. to show the widget or not.
|
|
92
105
|
* @param {Boolean} enabled
|
|
@@ -123,9 +136,10 @@ export interface vtkOrientationMarkerWidget extends vtkObject {
|
|
|
123
136
|
setViewportCorner(viewportCorner: Corners): boolean;
|
|
124
137
|
|
|
125
138
|
/**
|
|
126
|
-
* Set the viewport size.
|
|
139
|
+
* Set the viewport size.
|
|
140
|
+
* The sizeFactor should be between 0.0 and 1.0.
|
|
127
141
|
* It says how much of the main render window to color.
|
|
128
|
-
* @param sizeFactor
|
|
142
|
+
* @param {Number} sizeFactor
|
|
129
143
|
* @default 0.2
|
|
130
144
|
*/
|
|
131
145
|
setViewportSize(sizeFactor: number): void;
|
|
@@ -23,38 +23,49 @@ function vtkOrientationMarkerWidget(publicAPI, model) {
|
|
|
23
23
|
var previousCameraInput = [];
|
|
24
24
|
var selfRenderer = vtkRenderer.newInstance();
|
|
25
25
|
var resizeObserver = new ResizeObserver(function (entries) {
|
|
26
|
-
|
|
27
|
-
publicAPI.updateViewport();
|
|
28
|
-
}
|
|
26
|
+
publicAPI.updateViewport();
|
|
29
27
|
});
|
|
30
|
-
var
|
|
28
|
+
var onAnimationSub = null;
|
|
29
|
+
var onEndAnimationSub = null;
|
|
31
30
|
var selfSubscription = null;
|
|
32
31
|
|
|
33
32
|
publicAPI.computeViewport = function () {
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
var parentRen = model.parentRenderer || model.interactor.getCurrentRenderer();
|
|
34
|
+
|
|
35
|
+
var _parentRen$getViewpor = parentRen.getViewport(),
|
|
36
|
+
_parentRen$getViewpor2 = _slicedToArray(_parentRen$getViewpor, 4),
|
|
37
|
+
xMin = _parentRen$getViewpor2[0],
|
|
38
|
+
yMin = _parentRen$getViewpor2[1],
|
|
39
|
+
xMax = _parentRen$getViewpor2[2],
|
|
40
|
+
yMax = _parentRen$getViewpor2[3];
|
|
41
|
+
|
|
42
|
+
var view = model.interactor.getView();
|
|
43
|
+
var canvasSize = view.getSize();
|
|
44
|
+
|
|
45
|
+
var _view$getViewportSize = view.getViewportSize(parentRen),
|
|
46
|
+
_view$getViewportSize2 = _slicedToArray(_view$getViewportSize, 2),
|
|
47
|
+
viewXSize = _view$getViewportSize2[0],
|
|
48
|
+
viewYSize = _view$getViewportSize2[1];
|
|
38
49
|
|
|
39
50
|
var minViewSize = Math.min(viewXSize, viewYSize);
|
|
40
51
|
var pixelSize = model.viewportSize * minViewSize; // clamp pixel size
|
|
41
52
|
|
|
42
53
|
pixelSize = Math.max(Math.min(model.minPixelSize, minViewSize), Math.min(model.maxPixelSize, pixelSize));
|
|
43
|
-
var xFrac = pixelSize /
|
|
44
|
-
var yFrac = pixelSize /
|
|
54
|
+
var xFrac = pixelSize / canvasSize[0];
|
|
55
|
+
var yFrac = pixelSize / canvasSize[1]; // [left bottom right top]
|
|
45
56
|
|
|
46
57
|
switch (model.viewportCorner) {
|
|
47
58
|
case Corners.TOP_LEFT:
|
|
48
|
-
return [
|
|
59
|
+
return [xMin, yMax - yFrac, xMin + xFrac, yMax];
|
|
49
60
|
|
|
50
61
|
case Corners.TOP_RIGHT:
|
|
51
|
-
return [
|
|
62
|
+
return [xMax - xFrac, yMax - yFrac, xMax, yMax];
|
|
52
63
|
|
|
53
64
|
case Corners.BOTTOM_LEFT:
|
|
54
|
-
return [
|
|
65
|
+
return [xMin, yMin, xMin + xFrac, yMin + yFrac];
|
|
55
66
|
|
|
56
67
|
case Corners.BOTTOM_RIGHT:
|
|
57
|
-
return [
|
|
68
|
+
return [xMax - xFrac, yMin, xMax, yMin + yFrac];
|
|
58
69
|
|
|
59
70
|
default:
|
|
60
71
|
vtkErrorMacro('Invalid widget corner');
|
|
@@ -63,12 +74,15 @@ function vtkOrientationMarkerWidget(publicAPI, model) {
|
|
|
63
74
|
};
|
|
64
75
|
|
|
65
76
|
publicAPI.updateViewport = function () {
|
|
66
|
-
|
|
67
|
-
|
|
77
|
+
if (model.enabled) {
|
|
78
|
+
selfRenderer.setViewport.apply(selfRenderer, _toConsumableArray(publicAPI.computeViewport()));
|
|
79
|
+
model.interactor.render();
|
|
80
|
+
}
|
|
68
81
|
};
|
|
69
82
|
|
|
70
83
|
publicAPI.updateMarkerOrientation = function () {
|
|
71
|
-
var
|
|
84
|
+
var ren = model.parentRenderer || model.interactor.getCurrentRenderer();
|
|
85
|
+
var currentCamera = ren.getActiveCamera();
|
|
72
86
|
|
|
73
87
|
if (!currentCamera) {
|
|
74
88
|
return;
|
|
@@ -116,7 +130,8 @@ function vtkOrientationMarkerWidget(publicAPI, model) {
|
|
|
116
130
|
return;
|
|
117
131
|
}
|
|
118
132
|
|
|
119
|
-
var
|
|
133
|
+
var ren = model.parentRenderer || model.interactor.getCurrentRenderer();
|
|
134
|
+
var renderWindow = ren.getRenderWindow();
|
|
120
135
|
renderWindow.addRenderer(selfRenderer);
|
|
121
136
|
|
|
122
137
|
if (renderWindow.getNumberOfLayers() < 2) {
|
|
@@ -128,10 +143,8 @@ function vtkOrientationMarkerWidget(publicAPI, model) {
|
|
|
128
143
|
selfRenderer.setInteractive(false);
|
|
129
144
|
selfRenderer.addViewProp(model.actor);
|
|
130
145
|
model.actor.setVisibility(true);
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
interactorUnsubscribe = _model$interactor$onA.unsubscribe;
|
|
146
|
+
onAnimationSub = model.interactor.onAnimation(publicAPI.updateMarkerOrientation);
|
|
147
|
+
onEndAnimationSub = model.interactor.onEndAnimation(publicAPI.updateMarkerOrientation);
|
|
135
148
|
resizeObserver.observe(model.interactor.getView().getCanvas());
|
|
136
149
|
publicAPI.updateViewport();
|
|
137
150
|
publicAPI.updateMarkerOrientation();
|
|
@@ -143,8 +156,10 @@ function vtkOrientationMarkerWidget(publicAPI, model) {
|
|
|
143
156
|
|
|
144
157
|
model.enabled = false;
|
|
145
158
|
resizeObserver.disconnect();
|
|
146
|
-
|
|
147
|
-
|
|
159
|
+
onAnimationSub.unsubscribe();
|
|
160
|
+
onAnimationSub = null;
|
|
161
|
+
onEndAnimationSub.unsubscribe();
|
|
162
|
+
onEndAnimationSub = null;
|
|
148
163
|
model.actor.setVisibility(false);
|
|
149
164
|
selfRenderer.removeViewProp(model.actor);
|
|
150
165
|
|
|
@@ -168,10 +183,7 @@ function vtkOrientationMarkerWidget(publicAPI, model) {
|
|
|
168
183
|
}
|
|
169
184
|
|
|
170
185
|
model.viewportCorner = corner;
|
|
171
|
-
|
|
172
|
-
if (model.enabled) {
|
|
173
|
-
publicAPI.updateViewport();
|
|
174
|
-
}
|
|
186
|
+
publicAPI.updateViewport();
|
|
175
187
|
};
|
|
176
188
|
/**
|
|
177
189
|
* Sets the viewport size.
|
|
@@ -186,10 +198,7 @@ function vtkOrientationMarkerWidget(publicAPI, model) {
|
|
|
186
198
|
}
|
|
187
199
|
|
|
188
200
|
model.viewportSize = viewportSize;
|
|
189
|
-
|
|
190
|
-
if (model.enabled) {
|
|
191
|
-
publicAPI.updateViewport();
|
|
192
|
-
}
|
|
201
|
+
publicAPI.updateViewport();
|
|
193
202
|
};
|
|
194
203
|
|
|
195
204
|
publicAPI.setActor = function (actor) {
|
|
@@ -199,6 +208,16 @@ function vtkOrientationMarkerWidget(publicAPI, model) {
|
|
|
199
208
|
publicAPI.setEnabled(previousState);
|
|
200
209
|
};
|
|
201
210
|
|
|
211
|
+
publicAPI.setParentRenderer = function (ren) {
|
|
212
|
+
var changed = superClass.setParentRenderer(ren);
|
|
213
|
+
|
|
214
|
+
if (changed) {
|
|
215
|
+
publicAPI.updateViewport();
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
return changed;
|
|
219
|
+
};
|
|
220
|
+
|
|
202
221
|
publicAPI.getRenderer = function () {
|
|
203
222
|
return selfRenderer;
|
|
204
223
|
};
|
|
@@ -211,9 +230,14 @@ function vtkOrientationMarkerWidget(publicAPI, model) {
|
|
|
211
230
|
selfSubscription = null;
|
|
212
231
|
}
|
|
213
232
|
|
|
214
|
-
if (
|
|
215
|
-
|
|
216
|
-
|
|
233
|
+
if (onAnimationSub) {
|
|
234
|
+
onAnimationSub.unsubscribe();
|
|
235
|
+
onAnimationSub = null;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
if (onEndAnimationSub) {
|
|
239
|
+
onEndAnimationSub.unsubscribe();
|
|
240
|
+
onEndAnimationSub = null;
|
|
217
241
|
}
|
|
218
242
|
|
|
219
243
|
resizeObserver.disconnect();
|
|
@@ -233,7 +257,8 @@ var DEFAULT_VALUES = {
|
|
|
233
257
|
viewportCorner: Constants.Corners.BOTTOM_LEFT,
|
|
234
258
|
viewportSize: 0.2,
|
|
235
259
|
minPixelSize: 50,
|
|
236
|
-
maxPixelSize: 200
|
|
260
|
+
maxPixelSize: 200,
|
|
261
|
+
parentRenderer: null
|
|
237
262
|
}; // ----------------------------------------------------------------------------
|
|
238
263
|
|
|
239
264
|
function extend(publicAPI, model) {
|
|
@@ -244,7 +269,7 @@ function extend(publicAPI, model) {
|
|
|
244
269
|
macro.get(publicAPI, model, ['enabled', 'viewportCorner', 'viewportSize']); // NOTE: setting these while the widget is enabled will
|
|
245
270
|
// not update the widget.
|
|
246
271
|
|
|
247
|
-
macro.setGet(publicAPI, model, ['interactor', 'minPixelSize', 'maxPixelSize']);
|
|
272
|
+
macro.setGet(publicAPI, model, ['interactor', 'minPixelSize', 'maxPixelSize', 'parentRenderer']);
|
|
248
273
|
macro.get(publicAPI, model, ['actor']); // Object methods
|
|
249
274
|
|
|
250
275
|
vtkOrientationMarkerWidget(publicAPI, model);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { vtkAlgorithm, vtkObject } from '
|
|
2
|
-
import vtkPlane from '
|
|
1
|
+
import { vtkAlgorithm, vtkObject } from '../../interfaces';
|
|
2
|
+
import vtkPlane from '../../Common/DataModel/Plane';
|
|
3
3
|
import { mat4 } from "gl-matrix";
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Bounds, Vector3 } from '
|
|
2
|
-
import vtkAbstractMapper, { IAbstractMapperInitialValues } from '
|
|
1
|
+
import { Bounds, Vector3 } from '../../types';
|
|
2
|
+
import vtkAbstractMapper, { IAbstractMapperInitialValues } from './AbstractMapper';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { vtkObject } from '
|
|
2
|
-
import { Vector3 } from '
|
|
3
|
-
import vtkActor from '
|
|
4
|
-
import vtkRenderer from '
|
|
1
|
+
import { vtkObject } from '../../interfaces' ;
|
|
2
|
+
import { Vector3 } from '../../types';
|
|
3
|
+
import vtkActor from './Actor';
|
|
4
|
+
import vtkRenderer from './Renderer'
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Bounds } from '
|
|
2
|
-
import vtkMapper from '
|
|
3
|
-
import vtkProp3D, { IProp3DInitialValues } from '
|
|
4
|
-
import vtkProperty from '
|
|
1
|
+
import { Bounds } from '../../types';
|
|
2
|
+
import vtkMapper from './Mapper';
|
|
3
|
+
import vtkProp3D, { IProp3DInitialValues } from './Prop3D';
|
|
4
|
+
import vtkProperty from './Property';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
*
|
|
@@ -31,7 +31,8 @@ export interface vtkActor extends vtkProp3D {
|
|
|
31
31
|
getActors(): vtkActor[];
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* Get the property object that controls this actors backface surface
|
|
35
|
+
* properties.
|
|
35
36
|
* @return {vtkProperty} the backface property.
|
|
36
37
|
*/
|
|
37
38
|
getBackfaceProperty(): vtkProperty;
|
|
@@ -59,7 +60,7 @@ export interface vtkActor extends vtkProp3D {
|
|
|
59
60
|
getIsOpaque(): boolean;
|
|
60
61
|
|
|
61
62
|
/**
|
|
62
|
-
*
|
|
63
|
+
* Get the Mapper that this actor is getting its data from.
|
|
63
64
|
*/
|
|
64
65
|
getMapper(): null | vtkMapper;
|
|
65
66
|
|
|
@@ -85,32 +86,34 @@ export interface vtkActor extends vtkProp3D {
|
|
|
85
86
|
makeProperty(): vtkProperty;
|
|
86
87
|
|
|
87
88
|
/**
|
|
88
|
-
*
|
|
89
|
-
*
|
|
89
|
+
* Set the property object that controls this actors backface surface
|
|
90
|
+
* properties.
|
|
91
|
+
* @param {vtkProperty} backfaceProperty The backfaceProperty instance.
|
|
90
92
|
*/
|
|
91
93
|
setBackfaceProperty(backfaceProperty: vtkProperty): boolean;
|
|
92
94
|
|
|
93
95
|
/**
|
|
94
|
-
*
|
|
95
|
-
* @param forceOpaque
|
|
96
|
+
* Force the actor to be treated as opaque or translucent.
|
|
97
|
+
* @param {Boolean} forceOpaque
|
|
96
98
|
*/
|
|
97
|
-
setForceOpaque(forceOpaque:
|
|
99
|
+
setForceOpaque(forceOpaque: boolean): boolean;
|
|
98
100
|
|
|
99
101
|
/**
|
|
100
|
-
*
|
|
101
|
-
* @param forceTranslucent
|
|
102
|
+
* Force the actor to be treated as opaque or translucent.
|
|
103
|
+
* @param {Boolean} forceTranslucent
|
|
102
104
|
*/
|
|
103
105
|
setForceTranslucent(forceTranslucent: boolean): boolean;
|
|
104
106
|
|
|
105
107
|
/**
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
+
* This is the method that is used to connect an actor to the end of a
|
|
109
|
+
* visualization pipeline, i.e. the mapper.
|
|
110
|
+
* @param {vtkMapper} mapper The vtkMapper instance.
|
|
108
111
|
*/
|
|
109
|
-
setMapper(mapper:
|
|
112
|
+
setMapper(mapper: vtkMapper): boolean;
|
|
110
113
|
|
|
111
114
|
/**
|
|
112
|
-
*
|
|
113
|
-
* @param property
|
|
115
|
+
* Set the property object that controls this actors surface properties.
|
|
116
|
+
* @param {vtkProperty} property The vtkProperty instance.
|
|
114
117
|
*/
|
|
115
118
|
setProperty(property: vtkProperty): boolean;
|
|
116
119
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import vtkProp, { IPropInitialValues } from '
|
|
2
|
-
import vtkCoordinate from '
|
|
3
|
-
import vtkMapper from '
|
|
4
|
-
import vtkProperty from '
|
|
5
|
-
import { Bounds } from '
|
|
1
|
+
import vtkProp, { IPropInitialValues } from './Prop';
|
|
2
|
+
import vtkCoordinate from './Coordinate';
|
|
3
|
+
import vtkMapper from './Mapper';
|
|
4
|
+
import vtkProperty from './Property';
|
|
5
|
+
import { Bounds } from '../../types';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mat4 } from 'gl-matrix';
|
|
2
|
-
import { vtkObject } from '
|
|
3
|
-
import { Bounds, Vector3, Range } from '
|
|
2
|
+
import { vtkObject } from '../../interfaces' ;
|
|
3
|
+
import { Bounds, Vector3, Range } from '../../types';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import vtkCell from '
|
|
2
|
-
import { Vector3 } from '
|
|
3
|
-
import vtkMapper from '
|
|
4
|
-
import vtkPicker, { IPickerInitialValues } from '
|
|
5
|
-
import vtkRenderer from '
|
|
1
|
+
import vtkCell from '../../Common/DataModel/Cell';
|
|
2
|
+
import { Vector3 } from '../../types';
|
|
3
|
+
import vtkMapper from './Mapper';
|
|
4
|
+
import vtkPicker, { IPickerInitialValues } from './Picker';
|
|
5
|
+
import vtkRenderer from './Renderer';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { vtkObject, vtkProperty } from '
|
|
2
|
-
import vtkRenderer from '
|
|
1
|
+
import { vtkObject, vtkProperty } from '../../interfaces';
|
|
2
|
+
import vtkRenderer from './Renderer';
|
|
3
3
|
|
|
4
4
|
export enum Coordinate {
|
|
5
5
|
DISPLAY,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Bounds } from '
|
|
2
|
-
import vtkMapper, { IMapperInitialValues } from '
|
|
1
|
+
import { Bounds } from '../../types';
|
|
2
|
+
import vtkMapper, { IMapperInitialValues } from './Mapper';
|
|
3
3
|
|
|
4
4
|
export enum OrientationModes {
|
|
5
5
|
DIRECTION,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import vtkCamera from '
|
|
2
|
-
import vtkAbstractMapper, { IAbstractMapperInitialValues } from '
|
|
3
|
-
import { Bounds, Vector3 } from '
|
|
1
|
+
import vtkCamera from './Camera';
|
|
2
|
+
import vtkAbstractMapper, { IAbstractMapperInitialValues } from './AbstractMapper';
|
|
3
|
+
import { Bounds, Vector3 } from '../../types';
|
|
4
4
|
|
|
5
5
|
export enum SlicingMode {
|
|
6
6
|
NONE,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { vtkObject } from '
|
|
2
|
-
import vtkColorTransferFunction from '
|
|
1
|
+
import { vtkObject } from '../../interfaces';
|
|
2
|
+
import vtkColorTransferFunction from './ColorTransferFunction';
|
|
3
3
|
|
|
4
4
|
export enum InterpolationType {
|
|
5
5
|
NEAREST,
|
|
@@ -20,6 +20,7 @@ export interface IImageMapperInitialValues {
|
|
|
20
20
|
diffuse?: number;
|
|
21
21
|
opacity?: number;
|
|
22
22
|
componentData?: IComponentData[];
|
|
23
|
+
useLookupTableScalarRange?: boolean;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
export interface vtkImageProperty extends vtkObject {
|
|
@@ -173,6 +174,14 @@ export interface vtkImageProperty extends vtkObject {
|
|
|
173
174
|
* @param func
|
|
174
175
|
*/
|
|
175
176
|
setScalarOpacity(index: any, func: any): boolean;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Use the range that is set on the lookup table, instead of setting the range from the
|
|
180
|
+
* ColorWindow/ColorLevel settings
|
|
181
|
+
* @default false
|
|
182
|
+
* @param {Boolean} useLookupTableScalarRange
|
|
183
|
+
*/
|
|
184
|
+
setUseLookupTableScalarRange(useLookupTableScalarRange: boolean): boolean;
|
|
176
185
|
}
|
|
177
186
|
|
|
178
187
|
/**
|
|
@@ -154,7 +154,8 @@ var DEFAULT_VALUES = {
|
|
|
154
154
|
colorLevel: 127.5,
|
|
155
155
|
ambient: 1.0,
|
|
156
156
|
diffuse: 0.0,
|
|
157
|
-
opacity: 1.0
|
|
157
|
+
opacity: 1.0,
|
|
158
|
+
useLookupTableScalarRange: false
|
|
158
159
|
}; // ----------------------------------------------------------------------------
|
|
159
160
|
|
|
160
161
|
function extend(publicAPI, model) {
|
|
@@ -175,7 +176,7 @@ function extend(publicAPI, model) {
|
|
|
175
176
|
}
|
|
176
177
|
}
|
|
177
178
|
|
|
178
|
-
macro.setGet(publicAPI, model, ['independentComponents', 'interpolationType', 'colorWindow', 'colorLevel', 'ambient', 'diffuse', 'opacity']); // Object methods
|
|
179
|
+
macro.setGet(publicAPI, model, ['independentComponents', 'interpolationType', 'colorWindow', 'colorLevel', 'ambient', 'diffuse', 'opacity', 'useLookupTableScalarRange']); // Object methods
|
|
179
180
|
|
|
180
181
|
vtkImageProperty(publicAPI, model);
|
|
181
182
|
} // ----------------------------------------------------------------------------
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Bounds } from '
|
|
2
|
-
import vtkImageProperty from '
|
|
3
|
-
import vtkMapper from '
|
|
4
|
-
import vtkProp3D, { IProp3DInitialValues } from '
|
|
1
|
+
import { Bounds } from '../../types';
|
|
2
|
+
import vtkImageProperty from './ImageProperty';
|
|
3
|
+
import vtkMapper from './Mapper';
|
|
4
|
+
import vtkProp3D, { IProp3DInitialValues } from './Prop3D';
|
|
5
5
|
|
|
6
6
|
interface IImageSliceInitialValues extends IProp3DInitialValues{
|
|
7
7
|
mapper?: vtkMapper;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mat4 } from "gl-matrix";
|
|
2
|
-
import { vtkObject } from '
|
|
3
|
-
import { RGBColor, Vector3 } from '
|
|
2
|
+
import { vtkObject } from '../../interfaces';
|
|
3
|
+
import { RGBColor, Vector3 } from '../../types';
|
|
4
4
|
|
|
5
5
|
export enum LIGHT_TYPES {
|
|
6
6
|
'HeadLight',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Bounds, Range } from '
|
|
2
|
-
import vtkAbstractMapper3D, { IAbstractMapper3DInitialValues } from '
|
|
1
|
+
import { Bounds, Nullable, Range } from '../../types';
|
|
2
|
+
import vtkAbstractMapper3D, { IAbstractMapper3DInitialValues } from './AbstractMapper3D';
|
|
3
3
|
|
|
4
4
|
export enum ColorMode {
|
|
5
5
|
DEFAULT,
|
|
@@ -151,17 +151,17 @@ export interface vtkMapper extends vtkAbstractMapper3D {
|
|
|
151
151
|
/**
|
|
152
152
|
* Get the array name to color by.
|
|
153
153
|
*/
|
|
154
|
-
getColorByArrayName(): string
|
|
154
|
+
getColorByArrayName(): Nullable<string>;
|
|
155
155
|
|
|
156
156
|
/**
|
|
157
157
|
* Provide read access to the color texture coordinate array
|
|
158
158
|
*/
|
|
159
|
-
getColorCoordinates(): Float32Array
|
|
159
|
+
getColorCoordinates(): Nullable<Float32Array>;
|
|
160
160
|
|
|
161
161
|
/**
|
|
162
162
|
* Provide read access to the color array.
|
|
163
163
|
*/
|
|
164
|
-
getColorMapColors(): Uint8Array
|
|
164
|
+
getColorMapColors(): Nullable<Uint8Array>;
|
|
165
165
|
|
|
166
166
|
/**
|
|
167
167
|
* Return the method of coloring scalar data.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Nullable } from '../../types';
|
|
2
|
+
import vtkAbstractMapper, { IAbstractMapperInitialValues } from './AbstractMapper';
|
|
2
3
|
|
|
3
4
|
export enum ColorMode {
|
|
4
5
|
DEFAULT,
|
|
@@ -73,12 +74,12 @@ export interface vtkMapper2D extends vtkAbstractMapper {
|
|
|
73
74
|
/**
|
|
74
75
|
* Get the array name to color by.
|
|
75
76
|
*/
|
|
76
|
-
getColorByArrayName(): string
|
|
77
|
+
getColorByArrayName(): Nullable<string>;
|
|
77
78
|
|
|
78
79
|
/**
|
|
79
80
|
* Provide read access to the color array.
|
|
80
81
|
*/
|
|
81
|
-
getColorMapColors(): Uint8Array
|
|
82
|
+
getColorMapColors(): Nullable<Uint8Array>;
|
|
82
83
|
|
|
83
84
|
/**
|
|
84
85
|
* Return the method of coloring scalar data.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Vector3 } from '
|
|
2
|
-
import vtkAbstractPicker, { IAbstractPickerInitialValues } from '
|
|
3
|
-
import vtkActor from '
|
|
4
|
-
import vtkMapper from '
|
|
5
|
-
import vtkRenderer from '
|
|
1
|
+
import { Vector3 } from '../../types';
|
|
2
|
+
import vtkAbstractPicker, { IAbstractPickerInitialValues } from './AbstractPicker';
|
|
3
|
+
import vtkActor from './Actor';
|
|
4
|
+
import vtkMapper from './Mapper';
|
|
5
|
+
import vtkRenderer from './Renderer';
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
export interface IPickerInitialValues extends IAbstractPickerInitialValues {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import vtkPicker, { IPickerInitialValues } from '
|
|
2
|
-
import vtkMapper from '
|
|
3
|
-
import { Vector3 } from '
|
|
1
|
+
import vtkPicker, { IPickerInitialValues } from './Picker';
|
|
2
|
+
import vtkMapper from './Mapper';
|
|
3
|
+
import { Vector3 } from '../../types';
|
|
4
4
|
|
|
5
5
|
interface IPointPickerInitialValues extends IPickerInitialValues {
|
|
6
6
|
pointId?: number;
|
package/Rendering/Core/Prop.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { vtkObject } from '
|
|
2
|
-
import vtkActor from '
|
|
3
|
-
import vtkActor2D from '
|
|
4
|
-
import vtkTexture from '
|
|
5
|
-
import vtkVolume from '
|
|
1
|
+
import { vtkObject } from '../../interfaces';
|
|
2
|
+
import vtkActor from './Actor';
|
|
3
|
+
import vtkActor2D from './Actor2D';
|
|
4
|
+
import vtkTexture from './Texture';
|
|
5
|
+
import vtkVolume from './Volume';
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
export interface IPropInitialValues {
|