@kitware/vtk.js 30.6.0 → 30.6.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.
- package/Common/Core/Base64.d.ts +2 -2
- package/Common/Core/CellArray.d.ts +45 -42
- package/Common/Core/DataArray.d.ts +465 -449
- package/Common/Core/Endian.d.ts +5 -5
- package/Common/Core/HalfFloat.d.ts +3 -3
- package/Common/Core/ImageHelper.d.ts +11 -5
- package/Common/Core/LookupTable.d.ts +260 -257
- package/Common/Core/Math.d.ts +461 -270
- package/Common/Core/MatrixBuilder.d.ts +117 -112
- package/Common/Core/Points.d.ts +114 -106
- package/Common/Core/PriorityQueue.d.ts +34 -30
- package/Common/Core/ProgressHandler.d.ts +44 -39
- package/Common/Core/ScalarsToColors/Constants.d.ts +9 -9
- package/Common/Core/ScalarsToColors.d.ts +351 -326
- package/Common/Core/StringArray.d.ts +94 -89
- package/Common/Core/URLExtract.d.ts +9 -6
- package/Common/Core/VariantArray.d.ts +94 -89
- package/Common/DataModel/AbstractPointLocator.d.ts +18 -18
- package/Common/DataModel/Box.d.ts +60 -52
- package/Common/DataModel/CardinalSpline1D.d.ts +59 -34
- package/Common/DataModel/Cell.d.ts +70 -67
- package/Common/DataModel/Collection.d.ts +100 -84
- package/Common/DataModel/Cone.d.ts +30 -27
- package/Common/DataModel/Cylinder.d.ts +122 -112
- package/Common/DataModel/DataSet/Constants.d.ts +9 -9
- package/Common/DataModel/DataSet.d.ts +38 -35
- package/Common/DataModel/DataSetAttributes/FieldData.d.ts +217 -206
- package/Common/DataModel/DataSetAttributes.d.ts +420 -415
- package/Common/DataModel/EdgeLocator.d.ts +82 -79
- package/Common/DataModel/ITKHelper.d.ts +33 -22
- package/Common/DataModel/ImageData.d.ts +362 -340
- package/Common/DataModel/IncrementalOctreeNode.d.ts +242 -242
- package/Common/DataModel/IncrementalOctreePointLocator.d.ts +16 -16
- package/Common/DataModel/KochanekSpline1D.d.ts +60 -36
- package/Common/DataModel/Line.d.ts +104 -83
- package/Common/DataModel/Locator.d.ts +10 -10
- package/Common/DataModel/PiecewiseFunction.d.ts +215 -199
- package/Common/DataModel/Plane.d.ts +255 -223
- package/Common/DataModel/PointSet.d.ts +32 -28
- package/Common/DataModel/PolyData/Constants.d.ts +2 -2
- package/Common/DataModel/PolyData.d.ts +143 -140
- package/Common/DataModel/PolyLine.d.ts +51 -28
- package/Common/DataModel/Polygon.d.ts +34 -33
- package/Common/DataModel/SelectionNode/Constants.d.ts +18 -18
- package/Common/DataModel/SelectionNode.d.ts +62 -56
- package/Common/DataModel/Sphere.d.ts +74 -72
- package/Common/DataModel/Spline1D.d.ts +60 -40
- package/Common/DataModel/Spline3D/Constants.d.ts +3 -3
- package/Common/DataModel/Spline3D.d.ts +27 -22
- package/Common/Transform/LandmarkTransform.d.ts +67 -64
- package/Common/Transform/Transform.d.ts +148 -126
- package/Filters/General/AppendPolyData.d.ts +43 -37
- package/Filters/General/ClipClosedSurface.d.ts +41 -41
- package/Filters/General/ContourTriangulator.d.ts +38 -38
- package/Filters/General/ImageCropFilter.d.ts +48 -44
- package/Filters/General/ImageDataOutlineFilter.d.ts +41 -37
- package/Filters/General/ImageOutlineFilter.d.ts +41 -37
- package/Filters/General/ImageSliceFilter.d.ts +38 -34
- package/Filters/General/ImageStreamline.d.ts +120 -93
- package/Filters/General/LineFilter.d.ts +18 -15
- package/Filters/General/OutlineFilter.d.ts +19 -16
- package/Filters/General/TriangleFilter.d.ts +23 -19
- package/Filters/General/TubeFilter.d.ts +194 -188
- package/Filters/Sources/Arrow2DSource.d.ts +151 -143
- package/Filters/Sources/ArrowSource.d.ts +148 -140
- package/Filters/Sources/CircleSource.d.ts +138 -130
- package/Filters/Sources/ConeSource.d.ts +167 -159
- package/Filters/Sources/CubeSource.d.ts +198 -181
- package/Filters/Sources/Cursor3D.d.ts +171 -164
- package/Filters/Sources/CylinderSource.d.ts +173 -166
- package/Filters/Sources/LineSource.d.ts +100 -92
- package/Filters/Sources/PlaneSource.d.ts +211 -203
- package/Filters/Sources/PointSource.d.ts +90 -82
- package/Filters/Sources/SphereSource.d.ts +171 -164
- package/Filters/Texture/TextureMapToPlane.d.ts +213 -208
- package/Filters/Texture/TextureMapToSphere.d.ts +77 -72
- package/IO/Core/DataAccessHelper/HtmlDataAccessHelper.d.ts +18 -5
- package/IO/Core/DataAccessHelper/HttpDataAccessHelper.d.ts +18 -5
- package/IO/Core/DataAccessHelper/JSZipDataAccessHelper.d.ts +19 -6
- package/IO/Core/DataAccessHelper/LiteHttpDataAccessHelper.d.ts +18 -5
- package/IO/Core/DataAccessHelper.d.ts +36 -22
- package/IO/Core/HttpDataSetReader.d.ts +279 -249
- package/IO/Core/HttpSceneLoader.d.ts +92 -87
- package/IO/Core/ImageStream/DefaultProtocol.d.ts +27 -20
- package/IO/Core/ImageStream/ViewStream.d.ts +7 -7
- package/IO/Core/ImageStream.d.ts +52 -47
- package/IO/Core/WSLinkClient.d.ts +12 -6
- package/IO/Geometry/DracoReader.d.ts +106 -88
- package/IO/Geometry/PLYReader.d.ts +92 -75
- package/IO/Geometry/PLYWriter.d.ts +163 -148
- package/IO/Geometry/STLReader.d.ts +92 -77
- package/IO/Geometry/STLWriter.d.ts +50 -42
- package/IO/Misc/ElevationReader.d.ts +155 -139
- package/IO/Misc/ITKImageReader.d.ts +58 -50
- package/IO/Misc/ITKPolyDataReader.d.ts +58 -50
- package/IO/Misc/JSONNucleoReader.d.ts +74 -57
- package/IO/Misc/JSONReader.d.ts +78 -72
- package/IO/Misc/MTLReader.d.ts +143 -130
- package/IO/Misc/OBJReader.d.ts +129 -110
- package/IO/Misc/PDBReader.d.ts +109 -93
- package/IO/XML/XMLImageDataReader.d.ts +31 -19
- package/IO/XML/XMLPolyDataReader.d.ts +31 -19
- package/IO/XML/XMLReader.d.ts +141 -105
- package/Imaging/Core/AbstractImageInterpolator/Constants.d.ts +2 -2
- package/Imaging/Core/ImageReslice.d.ts +231 -173
- package/Interaction/Style/InteractorStyleHMDXR.d.ts +7 -3
- package/Interaction/Style/InteractorStyleImage.d.ts +5 -4
- package/Interaction/Style/InteractorStyleTrackballCamera.d.ts +17 -6
- package/Interaction/Widgets/OrientationMarkerWidget/Constants.d.ts +5 -5
- package/Interaction/Widgets/OrientationMarkerWidget.d.ts +146 -142
- package/Proxy/Core/ViewProxy.d.ts +1 -1
- package/Proxy/Representations/GeometryRepresentationProxy.d.ts +28 -27
- package/Proxy/Representations/ResliceRepresentationProxy.d.ts +0 -1
- package/Rendering/Core/AbstractImageMapper.d.ts +125 -113
- package/Rendering/Core/AbstractMapper.d.ts +58 -52
- package/Rendering/Core/AbstractMapper3D.d.ts +32 -25
- package/Rendering/Core/AbstractPicker.d.ts +91 -88
- package/Rendering/Core/Actor.d.ts +117 -114
- package/Rendering/Core/Actor2D.d.ts +101 -98
- package/Rendering/Core/AnnotatedCubeActor.d.ts +58 -53
- package/Rendering/Core/AxesActor.d.ts +10 -4
- package/Rendering/Core/Camera.d.ts +739 -727
- package/Rendering/Core/CellPicker.d.ts +87 -77
- package/Rendering/Core/ColorTransferFunction/Constants.d.ts +2 -2
- package/Rendering/Core/ColorTransferFunction/CssFilters.d.ts +39 -13
- package/Rendering/Core/ColorTransferFunction.d.ts +3 -6
- package/Rendering/Core/Coordinate/Constants.d.ts +1 -1
- package/Rendering/Core/Coordinate.d.ts +154 -150
- package/Rendering/Core/Follower.d.ts +52 -47
- package/Rendering/Core/Glyph3DMapper/Constants.d.ts +8 -8
- package/Rendering/Core/Glyph3DMapper.d.ts +152 -149
- package/Rendering/Core/ImageArrayMapper.d.ts +237 -213
- package/Rendering/Core/ImageCPRMapper/Constants.d.ts +4 -4
- package/Rendering/Core/ImageCPRMapper.d.ts +424 -392
- package/Rendering/Core/ImageMapper/Constants.d.ts +8 -8
- package/Rendering/Core/ImageMapper.d.ts +292 -268
- package/Rendering/Core/ImageProperty/Constants.d.ts +3 -3
- package/Rendering/Core/ImageProperty.d.ts +204 -197
- package/Rendering/Core/ImageResliceMapper/Constants.d.ts +5 -5
- package/Rendering/Core/ImageResliceMapper.d.ts +235 -210
- package/Rendering/Core/ImageSlice.d.ts +142 -136
- package/Rendering/Core/InteractorObserver.d.ts +41 -32
- package/Rendering/Core/Light.d.ts +321 -318
- package/Rendering/Core/Mapper/Constants.d.ts +14 -14
- package/Rendering/Core/Mapper.d.ts +539 -512
- package/Rendering/Core/Mapper2D.d.ts +342 -330
- package/Rendering/Core/Picker.d.ts +114 -106
- package/Rendering/Core/PixelSpaceCallbackMapper.d.ts +56 -40
- package/Rendering/Core/PointPicker.d.ts +42 -37
- package/Rendering/Core/Prop/Constants.d.ts +3 -3
- package/Rendering/Core/Prop.d.ts +274 -274
- package/Rendering/Core/Prop3D.d.ts +259 -257
- package/Rendering/Core/Property/Constants.d.ts +12 -12
- package/Rendering/Core/Property.d.ts +535 -531
- package/Rendering/Core/Property2D/Constants.d.ts +1 -1
- package/Rendering/Core/Property2D.d.ts +114 -109
- package/Rendering/Core/RenderWindow.d.ts +193 -191
- package/Rendering/Core/RenderWindowInteractor/Constants.d.ts +19 -19
- package/Rendering/Core/RenderWindowInteractor.d.ts +1335 -1219
- package/Rendering/Core/Renderer.d.ts +677 -663
- package/Rendering/Core/ScalarBarActor.d.ts +333 -322
- package/Rendering/Core/Skybox.d.ts +45 -42
- package/Rendering/Core/SphereMapper.d.ts +49 -44
- package/Rendering/Core/StickMapper.d.ts +49 -44
- package/Rendering/Core/Texture.d.ts +87 -80
- package/Rendering/Core/Viewport.d.ts +229 -222
- package/Rendering/Core/Volume.d.ts +78 -73
- package/Rendering/Core/VolumeMapper/Constants.d.ts +11 -11
- package/Rendering/Core/VolumeMapper.d.ts +295 -285
- package/Rendering/Core/VolumeProperty/Constants.d.ts +19 -19
- package/Rendering/Core/VolumeProperty.d.ts +375 -365
- package/Rendering/Misc/CanvasView.d.ts +148 -145
- package/Rendering/Misc/FullScreenRenderWindow.d.ts +111 -108
- package/Rendering/Misc/GenericRenderWindow.d.ts +69 -65
- package/Rendering/Misc/RenderWindowWithControlBar.d.ts +46 -39
- package/Rendering/Misc/SynchronizableRenderWindow/ObjectManager.d.ts +49 -29
- package/Rendering/Misc/SynchronizableRenderWindow.d.ts +51 -35
- package/Rendering/Misc/TextureLODsDownloader.d.ts +110 -106
- package/Rendering/OpenGL/BufferObject.d.ts +3 -2
- package/Rendering/OpenGL/RenderWindow.d.ts +456 -405
- package/Rendering/OpenGL/Texture.d.ts +66 -14
- package/Rendering/SceneGraph/RenderPass.d.ts +88 -83
- package/Rendering/SceneGraph/ViewNode.d.ts +150 -146
- package/Rendering/SceneGraph/ViewNodeFactory.d.ts +17 -12
- package/Rendering/WebXR/RenderWindowHelper/Constants.d.ts +5 -5
- package/Rendering/WebXR/RenderWindowHelper.d.ts +54 -49
- package/Widgets/Core/AbstractWidget.d.ts +30 -24
- package/Widgets/Core/AbstractWidgetFactory.d.ts +53 -33
- package/Widgets/Core/WidgetManager/Constants.d.ts +4 -4
- package/Widgets/Core/WidgetManager.d.ts +21 -15
- package/Widgets/Core/WidgetState.d.ts +11 -7
- package/Widgets/Manipulators/AbstractManipulator.d.ts +224 -217
- package/Widgets/Manipulators/LineManipulator.d.ts +33 -21
- package/Widgets/Manipulators/PickerManipulator.d.ts +22 -18
- package/Widgets/Manipulators/PlaneManipulator.d.ts +33 -22
- package/Widgets/Manipulators/TrackballManipulator.d.ts +40 -26
- package/Widgets/Representations/WidgetRepresentation.d.ts +62 -51
- package/Widgets/Widgets3D/ImplicitPlaneWidget.js +23 -5
- package/Widgets/Widgets3D/InteractiveOrientationWidget.d.ts +25 -10
- package/Widgets/Widgets3D/ResliceCursorWidget/Constants.d.ts +26 -7
- package/Widgets/Widgets3D/ResliceCursorWidget/behavior.d.ts +13 -12
- package/Widgets/Widgets3D/ResliceCursorWidget.d.ts +26 -15
- package/Widgets/Widgets3D/SeedWidget.d.ts +2 -2
- package/Widgets/Widgets3D/SphereWidget.d.ts +5 -3
- package/interfaces.d.ts +243 -243
- package/package.json +3 -3
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { vtkObject } from './../../interfaces';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
*
|
|
5
5
|
*/
|
|
6
6
|
export interface IViewNodeFactoryInitialValues {}
|
|
7
7
|
|
|
8
8
|
export interface vtkViewNodeFactory extends vtkObject {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
createNode(dataObject: any): void;
|
|
9
|
+
/**
|
|
10
|
+
* Creates and returns a vtkViewNode for the provided renderable.
|
|
11
|
+
* @param dataObject
|
|
12
|
+
*/
|
|
13
|
+
createNode(dataObject: any): void;
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
/**
|
|
@@ -21,24 +20,30 @@ export interface vtkViewNodeFactory extends vtkObject {
|
|
|
21
20
|
* @param model object on which data structure will be bounds (protected)
|
|
22
21
|
* @param {IViewNodeFactoryInitialValues} [initialValues] (default: {})
|
|
23
22
|
*/
|
|
24
|
-
export function extend(
|
|
23
|
+
export function extend(
|
|
24
|
+
publicAPI: object,
|
|
25
|
+
model: object,
|
|
26
|
+
initialValues?: IViewNodeFactoryInitialValues
|
|
27
|
+
): void;
|
|
25
28
|
|
|
26
29
|
/**
|
|
27
30
|
* Method used to create a new instance of vtkViewNodeFactory.
|
|
28
31
|
* @param {IViewNodeFactoryInitialValues} [initialValues] for pre-setting some of its content
|
|
29
32
|
*/
|
|
30
|
-
export function newInstance(
|
|
33
|
+
export function newInstance(
|
|
34
|
+
initialValues?: IViewNodeFactoryInitialValues
|
|
35
|
+
): vtkViewNodeFactory;
|
|
31
36
|
|
|
32
37
|
/**
|
|
33
38
|
* factory that chooses vtkViewNodes to create
|
|
34
|
-
*
|
|
39
|
+
*
|
|
35
40
|
* Class tells VTK which specific vtkViewNode subclass to make when it is asked
|
|
36
41
|
* to make a vtkViewNode for a particular renderable. modules for different
|
|
37
42
|
* rendering backends are expected to use this to customize the set of instances
|
|
38
43
|
* for their own purposes
|
|
39
44
|
*/
|
|
40
45
|
export declare const vtkViewNodeFactory: {
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
newInstance: typeof newInstance;
|
|
47
|
+
extend: typeof extend;
|
|
43
48
|
};
|
|
44
49
|
export default vtkViewNodeFactory;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export declare enum XrSessionTypes {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
HmdVR = 0,
|
|
3
|
+
MobileAR = 1,
|
|
4
|
+
LookingGlassVR = 2,
|
|
5
|
+
HmdAR = 3,
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
declare const _default: {
|
|
9
|
-
|
|
9
|
+
XrSessionTypes: typeof XrSessionTypes;
|
|
10
10
|
};
|
|
11
11
|
export default _default;
|
|
@@ -6,61 +6,60 @@ import vtkOpenGLRenderWindow from './../OpenGL/RenderWindow';
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
export interface IWebXRRenderWindowHelperInitialValues {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
initialized: boolean;
|
|
10
|
+
initCanvasSize?: [number, number];
|
|
11
|
+
initBackground?: [number, number, number, number];
|
|
12
|
+
renderWindow?: Nullable<vtkOpenGLRenderWindow>;
|
|
13
|
+
xrSession?: Nullable<XRSession>;
|
|
14
|
+
xrSessionType: number;
|
|
15
|
+
xrReferenceSpace?: any;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export interface vtkWebXRRenderWindowHelper extends vtkObject {
|
|
19
|
+
/**
|
|
20
|
+
* Initialize the instance.
|
|
21
|
+
*/
|
|
22
|
+
initialize(): void;
|
|
19
23
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Request an XR session on the user device with WebXR,
|
|
26
|
+
* typically in response to a user request such as a button press.
|
|
27
|
+
*/
|
|
28
|
+
startXR(xrSessionType: Number): void;
|
|
24
29
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
/**
|
|
31
|
+
* When an XR session is available, set up the XRWebGLLayer
|
|
32
|
+
* and request the first animation frame for the device
|
|
33
|
+
*/
|
|
34
|
+
enterXR(): void;
|
|
30
35
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Adjust world-to-physical parameters for different viewing modalities
|
|
38
|
+
*
|
|
39
|
+
* @param {Number} inputRescaleFactor
|
|
40
|
+
* @param {Number} inputTranslateZ
|
|
41
|
+
*/
|
|
42
|
+
resetXRScene(inputRescaleFactor: number, inputTranslateZ: number): void;
|
|
36
43
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
* @param {Number} inputTranslateZ
|
|
42
|
-
*/
|
|
43
|
-
resetXRScene(inputRescaleFactor: number, inputTranslateZ: number): void;
|
|
44
|
+
/**
|
|
45
|
+
* Request to stop the current XR session
|
|
46
|
+
*/
|
|
47
|
+
stopXR(): void;
|
|
44
48
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
/**
|
|
50
|
+
* Get the underlying render window to drive XR rendering.
|
|
51
|
+
*/
|
|
52
|
+
getRenderWindow(): Nullable<vtkOpenGLRenderWindow>;
|
|
49
53
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Set the underlying render window to drive XR rendering.
|
|
56
|
+
*/
|
|
57
|
+
setRenderWindow(renderWindow: Nullable<vtkOpenGLRenderWindow>);
|
|
54
58
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Get the active WebXR session.
|
|
62
|
-
*/
|
|
63
|
-
getXrSession(): Nullable<XRSession>;
|
|
59
|
+
/**
|
|
60
|
+
* Get the active WebXR session.
|
|
61
|
+
*/
|
|
62
|
+
getXrSession(): Nullable<XRSession>;
|
|
64
63
|
}
|
|
65
64
|
|
|
66
65
|
/**
|
|
@@ -70,13 +69,19 @@ export interface vtkWebXRRenderWindowHelper extends vtkObject {
|
|
|
70
69
|
* @param model object on which data structure will be bounds (protected)
|
|
71
70
|
* @param {IWebXRRenderWindowHelperInitialValues} [initialValues] (default: {})
|
|
72
71
|
*/
|
|
73
|
-
export function extend(
|
|
72
|
+
export function extend(
|
|
73
|
+
publicAPI: object,
|
|
74
|
+
model: object,
|
|
75
|
+
initialValues?: IWebXRRenderWindowHelperInitialValues
|
|
76
|
+
): void;
|
|
74
77
|
|
|
75
78
|
/**
|
|
76
79
|
* Method used to create a new instance of vtkWebXRRenderWindowHelper.
|
|
77
80
|
* @param {IWebXRRenderWindowHelperInitialValues} [initialValues] for pre-setting some of its content
|
|
78
81
|
*/
|
|
79
|
-
export function newInstance(
|
|
82
|
+
export function newInstance(
|
|
83
|
+
initialValues?: IWebXRRenderWindowHelperInitialValues
|
|
84
|
+
): vtkWebXRRenderWindowHelper;
|
|
80
85
|
|
|
81
86
|
/**
|
|
82
87
|
* WebXR rendering helper
|
|
@@ -84,7 +89,7 @@ export function newInstance(initialValues?: IWebXRRenderWindowHelperInitialValue
|
|
|
84
89
|
* vtkWebXRRenderWindowHelper is designed to wrap a vtkRenderWindow for XR rendering.
|
|
85
90
|
*/
|
|
86
91
|
export declare const vtkWebXRRenderWindowHelper: {
|
|
87
|
-
|
|
88
|
-
|
|
92
|
+
newInstance: typeof newInstance;
|
|
93
|
+
extend: typeof extend;
|
|
89
94
|
};
|
|
90
95
|
export default vtkWebXRRenderWindowHelper;
|
|
@@ -22,12 +22,12 @@ export interface vtkAbstractWidget extends vtkProp, vtkInteractorObserver {
|
|
|
22
22
|
/**
|
|
23
23
|
* Activate a handle, identified by both a state and a representation.
|
|
24
24
|
* Will also invoke appropriate events.
|
|
25
|
-
*
|
|
25
|
+
*
|
|
26
26
|
* @param locator An object describing the handle to activate.
|
|
27
27
|
*/
|
|
28
|
-
activateHandle(locator: {
|
|
29
|
-
selectedState: vtkWidgetState;
|
|
30
|
-
representation: vtkWidgetRepresentation;
|
|
28
|
+
activateHandle(locator: {
|
|
29
|
+
selectedState: vtkWidgetState;
|
|
30
|
+
representation: vtkWidgetRepresentation;
|
|
31
31
|
}): void;
|
|
32
32
|
|
|
33
33
|
/**
|
|
@@ -37,7 +37,7 @@ export interface vtkAbstractWidget extends vtkProp, vtkInteractorObserver {
|
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* Returns true if the widget instance holds the given actor, false otherwise.
|
|
40
|
-
*
|
|
40
|
+
*
|
|
41
41
|
* @param {vtkProp} actor
|
|
42
42
|
*/
|
|
43
43
|
hasActor(actor: vtkProp): boolean;
|
|
@@ -61,7 +61,7 @@ export interface vtkAbstractWidget extends vtkProp, vtkInteractorObserver {
|
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
63
|
* Place a widget at the given bounds.
|
|
64
|
-
*
|
|
64
|
+
*
|
|
65
65
|
* @param {Bounds} bounds
|
|
66
66
|
*/
|
|
67
67
|
placeWidget(bounds: Bounds): void;
|
|
@@ -73,22 +73,22 @@ export interface vtkAbstractWidget extends vtkProp, vtkInteractorObserver {
|
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
75
|
* Set the place factor.
|
|
76
|
-
*
|
|
76
|
+
*
|
|
77
77
|
* @param {Number} factor The place factor.
|
|
78
78
|
*/
|
|
79
79
|
setPlaceFactor(factor: number): void;
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
* Get the `vtkWidgetRepresentation` instance associated with the given `vtkActor` instance.
|
|
83
|
-
*
|
|
84
|
-
* @param {vtkProp} actor
|
|
83
|
+
*
|
|
84
|
+
* @param {vtkProp} actor
|
|
85
85
|
*/
|
|
86
86
|
getRepresentationFromActor(actor: vtkProp): vtkWidgetRepresentation;
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
89
|
* Update all the widget representations for render.
|
|
90
|
-
*
|
|
91
|
-
* @param {RenderingTypes} renderingType Default value if `RenderingTypes.FRONT_BUFFER`
|
|
90
|
+
*
|
|
91
|
+
* @param {RenderingTypes} renderingType Default value if `RenderingTypes.FRONT_BUFFER`
|
|
92
92
|
*/
|
|
93
93
|
updateRepresentationForRender(renderingType: RenderingTypes): void;
|
|
94
94
|
|
|
@@ -97,11 +97,10 @@ export interface vtkAbstractWidget extends vtkProp, vtkInteractorObserver {
|
|
|
97
97
|
*/
|
|
98
98
|
getViewWidgets(): vtkAbstractWidget[];
|
|
99
99
|
|
|
100
|
-
|
|
101
100
|
/**
|
|
102
101
|
* Set the context visibility.
|
|
103
|
-
*
|
|
104
|
-
* @param {Boolean} visible
|
|
102
|
+
*
|
|
103
|
+
* @param {Boolean} visible
|
|
105
104
|
*/
|
|
106
105
|
setContextVisibility(visible: boolean): void;
|
|
107
106
|
|
|
@@ -112,8 +111,8 @@ export interface vtkAbstractWidget extends vtkProp, vtkInteractorObserver {
|
|
|
112
111
|
|
|
113
112
|
/**
|
|
114
113
|
* Defines if the handles should be visible or not.
|
|
115
|
-
*
|
|
116
|
-
* @param {Boolean} visible
|
|
114
|
+
*
|
|
115
|
+
* @param {Boolean} visible
|
|
117
116
|
*/
|
|
118
117
|
setHandleVisibility(visible: boolean): void;
|
|
119
118
|
|
|
@@ -124,7 +123,7 @@ export interface vtkAbstractWidget extends vtkProp, vtkInteractorObserver {
|
|
|
124
123
|
|
|
125
124
|
/**
|
|
126
125
|
* Set the widget manager associated with the widget instance.
|
|
127
|
-
*
|
|
126
|
+
*
|
|
128
127
|
* @param {vtkWidgetManager} wm The widget manager instance
|
|
129
128
|
*/
|
|
130
129
|
setWidgetManager(wm: vtkWidgetManager): void;
|
|
@@ -146,15 +145,18 @@ export interface vtkAbstractWidget extends vtkProp, vtkInteractorObserver {
|
|
|
146
145
|
|
|
147
146
|
/**
|
|
148
147
|
* Register a callback to be invoked when the `ActivateHandle` event occurs.
|
|
149
|
-
*
|
|
148
|
+
*
|
|
150
149
|
* @param {EventHandler} cb The callback to register
|
|
151
150
|
* @param {Number} [priority] Priority of this subscription
|
|
152
151
|
*/
|
|
153
|
-
onActivateHandle(
|
|
152
|
+
onActivateHandle(
|
|
153
|
+
cb: EventHandler,
|
|
154
|
+
priority?: number
|
|
155
|
+
): Readonly<vtkSubscription>;
|
|
154
156
|
|
|
155
157
|
/**
|
|
156
158
|
* Invoke the `ActivateHandle` event with the given payload.
|
|
157
|
-
*
|
|
159
|
+
*
|
|
158
160
|
* @param args The event payload
|
|
159
161
|
*/
|
|
160
162
|
invokeActivateHandle(...args: unknown[]): void;
|
|
@@ -167,11 +169,15 @@ export interface vtkAbstractWidget extends vtkProp, vtkInteractorObserver {
|
|
|
167
169
|
* @param model object on which data structure will be bounds (protected)
|
|
168
170
|
* @param initialValues (default: {})
|
|
169
171
|
*/
|
|
170
|
-
export function extend(
|
|
172
|
+
export function extend(
|
|
173
|
+
publicAPI: object,
|
|
174
|
+
model: object,
|
|
175
|
+
initialValues?: object
|
|
176
|
+
): void;
|
|
171
177
|
|
|
172
178
|
/**
|
|
173
179
|
* Method used to create a new instance of vtkAbstractWidget
|
|
174
|
-
*
|
|
180
|
+
*
|
|
175
181
|
* @param initialValues For pre-setting some of its content
|
|
176
182
|
*/
|
|
177
183
|
export function newInstance(initialValues?: object): vtkAbstractWidget;
|
|
@@ -180,8 +186,8 @@ export function newInstance(initialValues?: object): vtkAbstractWidget;
|
|
|
180
186
|
* vtkAbstractWidget is an abstract class to construct a widget.
|
|
181
187
|
*/
|
|
182
188
|
export declare const vtkAbstractWidget: {
|
|
183
|
-
|
|
184
|
-
|
|
189
|
+
newInstance: typeof newInstance;
|
|
190
|
+
extend: typeof extend;
|
|
185
191
|
};
|
|
186
192
|
|
|
187
193
|
export default vtkAbstractWidget;
|
|
@@ -12,12 +12,14 @@ export interface IGetWidgetForViewParams {
|
|
|
12
12
|
initialValues?: object;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
export interface vtkAbstractWidgetFactory<
|
|
15
|
+
export interface vtkAbstractWidgetFactory<
|
|
16
|
+
WidgetInstance extends vtkAbstractWidget
|
|
17
|
+
> extends vtkObject {
|
|
16
18
|
/**
|
|
17
|
-
* Will return the widget associated with the view with Id id `locator.viewId`.
|
|
19
|
+
* Will return the widget associated with the view with Id id `locator.viewId`.
|
|
18
20
|
* If there is no widget associated with the view, a new widget will be constructed, provided
|
|
19
21
|
* that the renderer, viewType, and optionally initialValues are also provided.
|
|
20
|
-
*
|
|
22
|
+
*
|
|
21
23
|
* @param {IGetWidgetForViewParams} locator
|
|
22
24
|
*/
|
|
23
25
|
getWidgetForView(locator: IGetWidgetForViewParams): Nullable<WidgetInstance>;
|
|
@@ -34,43 +36,43 @@ export interface vtkAbstractWidgetFactory<WidgetInstance extends vtkAbstractWidg
|
|
|
34
36
|
|
|
35
37
|
/**
|
|
36
38
|
* Set the visiblity on each underlying view widget.
|
|
37
|
-
*
|
|
39
|
+
*
|
|
38
40
|
* @param {Boolean} visible
|
|
39
41
|
*/
|
|
40
|
-
setVisibility(visible: boolean): void
|
|
42
|
+
setVisibility(visible: boolean): void;
|
|
41
43
|
|
|
42
44
|
/**
|
|
43
45
|
* Set the pickable flag for each underlying view widget.
|
|
44
|
-
*
|
|
45
|
-
* @param {Boolean} pickable
|
|
46
|
+
*
|
|
47
|
+
* @param {Boolean} pickable
|
|
46
48
|
*/
|
|
47
|
-
setPickable(pickable: boolean): void
|
|
49
|
+
setPickable(pickable: boolean): void;
|
|
48
50
|
|
|
49
51
|
/**
|
|
50
52
|
* Set the dragable flag for each underlying view widget.
|
|
51
|
-
*
|
|
52
|
-
* @param {Boolean} dragable
|
|
53
|
+
*
|
|
54
|
+
* @param {Boolean} dragable
|
|
53
55
|
*/
|
|
54
|
-
setDragable(dragable: boolean): void
|
|
56
|
+
setDragable(dragable: boolean): void;
|
|
55
57
|
|
|
56
58
|
/**
|
|
57
59
|
* Set the context visibility for each associated view widget.
|
|
58
|
-
*
|
|
59
|
-
* @param {Boolean} visible
|
|
60
|
+
*
|
|
61
|
+
* @param {Boolean} visible
|
|
60
62
|
*/
|
|
61
|
-
setContextVisibility(visible: boolean): void
|
|
63
|
+
setContextVisibility(visible: boolean): void;
|
|
62
64
|
|
|
63
65
|
/**
|
|
64
66
|
* Set the handles visibility for each underlying view widget.
|
|
65
|
-
*
|
|
66
|
-
* @param {Boolean} visible
|
|
67
|
+
*
|
|
68
|
+
* @param {Boolean} visible
|
|
67
69
|
*/
|
|
68
|
-
setHandleVisiblity(visible: boolean): void
|
|
70
|
+
setHandleVisiblity(visible: boolean): void;
|
|
69
71
|
|
|
70
72
|
/**
|
|
71
73
|
* Place a new widget at the given bounds.
|
|
72
|
-
*
|
|
73
|
-
* @param {Bounds} bounds
|
|
74
|
+
*
|
|
75
|
+
* @param {Bounds} bounds
|
|
74
76
|
*/
|
|
75
77
|
placeWidget(bounds: Bounds): void;
|
|
76
78
|
|
|
@@ -81,8 +83,8 @@ export interface vtkAbstractWidgetFactory<WidgetInstance extends vtkAbstractWidg
|
|
|
81
83
|
|
|
82
84
|
/**
|
|
83
85
|
* Set the place factor.
|
|
84
|
-
*
|
|
85
|
-
* @param {Number} factor
|
|
86
|
+
*
|
|
87
|
+
* @param {Number} factor
|
|
86
88
|
*/
|
|
87
89
|
setPlaceFactor(factor: number): void;
|
|
88
90
|
|
|
@@ -93,15 +95,18 @@ export interface vtkAbstractWidgetFactory<WidgetInstance extends vtkAbstractWidg
|
|
|
93
95
|
|
|
94
96
|
/**
|
|
95
97
|
* Register a callback to be called when the WidgetChange event arise.
|
|
96
|
-
*
|
|
98
|
+
*
|
|
97
99
|
* @param {EventHandler} cb The callback to be invoked.
|
|
98
100
|
* @param {Number} [priority] The priority of this subscription
|
|
99
101
|
*/
|
|
100
|
-
onWidgetChangeEvent(
|
|
102
|
+
onWidgetChangeEvent(
|
|
103
|
+
cb: EventHandler,
|
|
104
|
+
priority?: number
|
|
105
|
+
): Readonly<vtkSubscription>;
|
|
101
106
|
|
|
102
107
|
/**
|
|
103
108
|
* Invoke the WidgetChange event
|
|
104
|
-
*
|
|
109
|
+
*
|
|
105
110
|
* @param args The event payload
|
|
106
111
|
*/
|
|
107
112
|
invokeWidgetChangeEvent(...args: unknown[]): void;
|
|
@@ -112,7 +117,7 @@ export interface vtkAbstractWidgetFactory<WidgetInstance extends vtkAbstractWidg
|
|
|
112
117
|
* This is because typescript is completely "structural" and doesn't have any way to declare "nominal" types
|
|
113
118
|
* See: https://github.com/microsoft/TypeScript/issues/202
|
|
114
119
|
* For example, in this code, widgetInstance is a vtkResliceCursorWidgetCPRInstance:
|
|
115
|
-
*
|
|
120
|
+
*
|
|
116
121
|
* import vtkResliceCursorWidget from '@kitware/vtk.js/Widgets/Widgets3D/ResliceCursorWidget';
|
|
117
122
|
* import widgetBehavior from '@kitware/vtk.js/Widgets/Widgets3D/ResliceCursorWidget/cprBehavior';
|
|
118
123
|
*
|
|
@@ -123,9 +128,14 @@ export interface vtkAbstractWidgetFactory<WidgetInstance extends vtkAbstractWidg
|
|
|
123
128
|
* const widgetInstance = widgetManager.addWidget(widget);
|
|
124
129
|
*/
|
|
125
130
|
declare const ExtendSymbol: unique symbol;
|
|
126
|
-
export type ExtendWidgetBehavior<WidgetInstance> = ((
|
|
127
|
-
|
|
128
|
-
|
|
131
|
+
export type ExtendWidgetBehavior<WidgetInstance> = ((
|
|
132
|
+
publicAPI: object,
|
|
133
|
+
model: object
|
|
134
|
+
) => void) & { [ExtendSymbol]: WidgetInstance };
|
|
135
|
+
|
|
136
|
+
export interface IAbstractWidgetFactoryInitialValues<
|
|
137
|
+
WidgetInstance extends vtkAbstractWidget = vtkAbstractWidget
|
|
138
|
+
> {
|
|
129
139
|
behavior?: ExtendWidgetBehavior<WidgetInstance>;
|
|
130
140
|
}
|
|
131
141
|
|
|
@@ -136,18 +146,28 @@ export interface IAbstractWidgetFactoryInitialValues<WidgetInstance extends vtkA
|
|
|
136
146
|
* @param model object on which data structure will be bounds (protected)
|
|
137
147
|
* @param initialValues (default: {})
|
|
138
148
|
*/
|
|
139
|
-
export function extend<
|
|
149
|
+
export function extend<
|
|
150
|
+
WidgetInstance extends vtkAbstractWidget = vtkAbstractWidget
|
|
151
|
+
>(
|
|
152
|
+
publicAPI: object,
|
|
153
|
+
model: object,
|
|
154
|
+
initialValues?: IAbstractWidgetFactoryInitialValues<WidgetInstance>
|
|
155
|
+
): void;
|
|
140
156
|
|
|
141
157
|
/**
|
|
142
158
|
* Method used to create a new instance of vtkAbstractWidgetFactory
|
|
143
|
-
*
|
|
159
|
+
*
|
|
144
160
|
* @param initialValues for pre-setting some of its content
|
|
145
161
|
*/
|
|
146
|
-
export function newInstance<
|
|
162
|
+
export function newInstance<
|
|
163
|
+
WidgetInstance extends vtkAbstractWidget = vtkAbstractWidget
|
|
164
|
+
>(
|
|
165
|
+
initialValues?: IAbstractWidgetFactoryInitialValues<WidgetInstance>
|
|
166
|
+
): vtkAbstractWidgetFactory<WidgetInstance>;
|
|
147
167
|
|
|
148
168
|
export declare const vtkAbstractWidgetFactory: {
|
|
149
|
-
|
|
150
|
-
|
|
169
|
+
newInstance: typeof newInstance;
|
|
170
|
+
extend: typeof extend;
|
|
151
171
|
};
|
|
152
172
|
|
|
153
173
|
export default vtkAbstractWidgetFactory;
|
|
@@ -5,23 +5,23 @@ export declare enum ViewTypes {
|
|
|
5
5
|
VOLUME = 3,
|
|
6
6
|
YZ_PLANE = 4,
|
|
7
7
|
XZ_PLANE = 5,
|
|
8
|
-
XY_PLANE = 6
|
|
8
|
+
XY_PLANE = 6,
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export declare enum RenderingTypes {
|
|
12
12
|
PICKING_BUFFER = 0,
|
|
13
|
-
FRONT_BUFFER = 1
|
|
13
|
+
FRONT_BUFFER = 1,
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export declare enum CaptureOn {
|
|
17
17
|
MOUSE_MOVE = 0,
|
|
18
|
-
MOUSE_RELEASE = 1
|
|
18
|
+
MOUSE_RELEASE = 1,
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
declare const _default: {
|
|
22
22
|
ViewTypes: typeof ViewTypes;
|
|
23
23
|
RenderingTypes: typeof RenderingTypes;
|
|
24
24
|
CaptureOn: typeof CaptureOn;
|
|
25
|
-
}
|
|
25
|
+
};
|
|
26
26
|
|
|
27
27
|
export default _default;
|
|
@@ -32,10 +32,12 @@ export interface IRenderingComponents {
|
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* Extract the rendering components from the given renderer.
|
|
35
|
-
*
|
|
35
|
+
*
|
|
36
36
|
* @param {vtkRenderer} renderer The vtkRenderer instance.
|
|
37
37
|
*/
|
|
38
|
-
export function extractRenderingComponents(
|
|
38
|
+
export function extractRenderingComponents(
|
|
39
|
+
renderer: vtkRenderer
|
|
40
|
+
): IRenderingComponents;
|
|
39
41
|
|
|
40
42
|
/**
|
|
41
43
|
* This method returns the world distance that corresponds to the height of a
|
|
@@ -47,10 +49,10 @@ export function getPixelWorldHeightAtCoord(coord: []): Number;
|
|
|
47
49
|
|
|
48
50
|
export interface vtkWidgetManager extends vtkObject {
|
|
49
51
|
/**
|
|
50
|
-
* The the captureOn value.
|
|
52
|
+
* The the captureOn value.
|
|
51
53
|
* `CaptureOn.MOUSE_MOVE`: captures small region when moving mouse
|
|
52
54
|
* `CaptureOn.MOUSE_RELEASE`: captures entire region when mouse button is released
|
|
53
|
-
*
|
|
55
|
+
*
|
|
54
56
|
* @param {CaptureOn} captureOn
|
|
55
57
|
*/
|
|
56
58
|
setCaptureOn(captureOn: CaptureOn): boolean;
|
|
@@ -62,7 +64,7 @@ export interface vtkWidgetManager extends vtkObject {
|
|
|
62
64
|
|
|
63
65
|
/**
|
|
64
66
|
* The the view type.
|
|
65
|
-
*
|
|
67
|
+
*
|
|
66
68
|
* @param {ViewTypes} type
|
|
67
69
|
*/
|
|
68
70
|
setViewType(type: ViewTypes): boolean;
|
|
@@ -116,15 +118,15 @@ export interface vtkWidgetManager extends vtkObject {
|
|
|
116
118
|
|
|
117
119
|
/**
|
|
118
120
|
* Set the renderer.
|
|
119
|
-
*
|
|
121
|
+
*
|
|
120
122
|
* @param {vtkRenderer} renderer
|
|
121
123
|
*/
|
|
122
124
|
setRenderer(renderer: vtkRenderer): void;
|
|
123
125
|
|
|
124
126
|
/**
|
|
125
|
-
* Register a widget on the widget manager instance.
|
|
126
|
-
* Please note that one should link the widget manager to a view before calling this method.
|
|
127
|
-
*
|
|
127
|
+
* Register a widget on the widget manager instance.
|
|
128
|
+
* Please note that one should link the widget manager to a view before calling this method.
|
|
129
|
+
*
|
|
128
130
|
* @param {vtkAbstractWidgetFactory} widget The abstract widget factory.
|
|
129
131
|
* @param {ViewTypes} [viewType]
|
|
130
132
|
* @param {Object} [initialValues]
|
|
@@ -133,7 +135,9 @@ export interface vtkWidgetManager extends vtkObject {
|
|
|
133
135
|
widget: WidgetFactory,
|
|
134
136
|
viewType?: ViewTypes,
|
|
135
137
|
initialValues?: object
|
|
136
|
-
): WidgetFactory extends vtkAbstractWidgetFactory<infer WidgetInstance>
|
|
138
|
+
): WidgetFactory extends vtkAbstractWidgetFactory<infer WidgetInstance>
|
|
139
|
+
? WidgetInstance
|
|
140
|
+
: never;
|
|
137
141
|
|
|
138
142
|
/**
|
|
139
143
|
* Unregister all widgets from the widget manager.
|
|
@@ -142,14 +146,14 @@ export interface vtkWidgetManager extends vtkObject {
|
|
|
142
146
|
|
|
143
147
|
/**
|
|
144
148
|
* Remove a widget from the widget manager.
|
|
145
|
-
*
|
|
149
|
+
*
|
|
146
150
|
* @param {vtkAbstractWidget | vtkAbstractWidgetFactory} widget The widget to remove
|
|
147
151
|
*/
|
|
148
152
|
removeWidget(widget: vtkAbstractWidget | vtkAbstractWidgetFactory<any>): void;
|
|
149
153
|
|
|
150
154
|
/**
|
|
151
155
|
* Given x and y parameter, get selected data.
|
|
152
|
-
*
|
|
156
|
+
*
|
|
153
157
|
* @param {Number} x
|
|
154
158
|
* @param {Number} y
|
|
155
159
|
*/
|
|
@@ -162,7 +166,7 @@ export interface vtkWidgetManager extends vtkObject {
|
|
|
162
166
|
|
|
163
167
|
/**
|
|
164
168
|
* Given the focus to the given widget instance.
|
|
165
|
-
*
|
|
169
|
+
*
|
|
166
170
|
* @param {vtkAbstractWidget | vtkAbstractWidgetFactory} widget The widget instance which should get the focus.
|
|
167
171
|
*/
|
|
168
172
|
grabFocus(widget: vtkAbstractWidget | vtkAbstractWidgetFactory<any>): void;
|
|
@@ -211,10 +215,12 @@ export function extend(
|
|
|
211
215
|
|
|
212
216
|
/**
|
|
213
217
|
* Method used to create a new instance of vtkCellArray
|
|
214
|
-
*
|
|
218
|
+
*
|
|
215
219
|
* @param initialValues for pre-setting some of its content
|
|
216
220
|
*/
|
|
217
|
-
export function newInstance(
|
|
221
|
+
export function newInstance(
|
|
222
|
+
initialValues?: IWidgetManagerInitialValues
|
|
223
|
+
): vtkWidgetManager;
|
|
218
224
|
|
|
219
225
|
export declare const vtkWidgetManager: {
|
|
220
226
|
newInstance: typeof newInstance;
|