@kitware/vtk.js 24.19.1 → 25.0.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/BREAKING_CHANGES.md +5 -0
- package/Common/Core/DataArray.d.ts +1 -1
- package/Common/Core/Math/index.js +360 -337
- package/Common/Core/Math.d.ts +70 -8
- package/Common/Core/Math.js +2 -1
- package/Common/DataModel/DataSetAttributes/FieldData.d.ts +1 -1
- package/Common/DataModel/Line.js +1 -3
- package/Common/Transform/LandmarkTransform.js +11 -24
- package/Filters/General/OBBTree.js +21 -23
- package/Filters/Texture/TextureMapToPlane.js +6 -15
- package/IO/Core/HttpSceneLoader.d.ts +11 -2
- package/Interaction/Manipulators/MouseCameraTrackballRollManipulator.js +1 -1
- package/Interaction/Manipulators/MouseCameraUnicamRotateManipulator.js +1 -1
- package/Interaction/Style/InteractorStyleTrackballCamera.js +1 -1
- package/Interaction/Widgets/PiecewiseGaussianWidget.js +1 -1
- package/Proxy/Core/View2DProxy.js +1 -1
- package/Rendering/Core/Camera.d.ts +12 -1
- package/Rendering/Core/CellPicker.d.ts +3 -3
- package/Rendering/Core/ColorTransferFunction.js +1 -1
- package/Rendering/Core/Coordinate.d.ts +7 -7
- package/Rendering/Core/Coordinate.js +1 -1
- package/Rendering/Core/CubeAxesActor.js +1 -1
- package/Rendering/Core/Glyph3DMapper.js +1 -1
- package/Rendering/Core/ImageMapper.d.ts +1 -1
- package/Rendering/Core/ImageMapper.js +2 -3
- package/Rendering/Core/ImageSlice.d.ts +4 -4
- package/Rendering/Core/InteractorObserver.d.ts +2 -2
- package/Rendering/Core/Mapper.js +1 -1
- package/Rendering/Core/Picker.d.ts +1 -1
- package/Rendering/Core/Prop3D.js +1 -1
- package/Rendering/Core/RenderWindow.d.ts +6 -6
- package/Rendering/Core/RenderWindowInteractor.js +1 -1
- package/Rendering/Core/Renderer.d.ts +8 -9
- package/Rendering/Core/Renderer.js +1 -1
- package/Rendering/Core/ScalarBarActor.js +1 -1
- package/Rendering/Core/VolumeMapper.js +1 -1
- package/Rendering/Core/VolumeProperty.d.ts +2 -2
- package/Rendering/Misc/SynchronizableRenderWindow.d.ts +1 -1
- package/Rendering/OpenGL/PolyDataMapper2D.js +1 -1
- package/Rendering/OpenGL/RenderWindow.d.ts +7 -7
- package/Rendering/OpenGL/Texture.js +1 -1
- package/Widgets/Core/WidgetManager.d.ts +1 -1
- package/Widgets/Representations/HandleRepresentation.js +2 -1
- package/Widgets/Representations/PolyLineRepresentation.js +1 -1
- package/Widgets/Widgets3D/AngleWidget/state.js +2 -2
- package/Widgets/Widgets3D/AngleWidget.js +2 -2
- package/Widgets/Widgets3D/DistanceWidget/state.js +2 -2
- package/Widgets/Widgets3D/DistanceWidget.js +1 -1
- package/Widgets/Widgets3D/EllipseWidget.js +1 -4
- package/Widgets/Widgets3D/ImageCroppingWidget/state.js +1 -1
- package/Widgets/Widgets3D/ImageCroppingWidget.js +2 -1
- package/Widgets/Widgets3D/LabelWidget/state.js +1 -1
- package/Widgets/Widgets3D/LabelWidget.js +1 -1
- package/Widgets/Widgets3D/LineWidget/helpers.js +1 -1
- package/Widgets/Widgets3D/LineWidget/state.js +3 -3
- package/Widgets/Widgets3D/LineWidget.js +1 -8
- package/Widgets/Widgets3D/PolyLineWidget.js +2 -8
- package/Widgets/Widgets3D/RectangleWidget.js +1 -4
- package/Widgets/Widgets3D/ResliceCursorWidget/behavior.js +1 -1
- package/Widgets/Widgets3D/ResliceCursorWidget/helpers.js +1 -1
- package/Widgets/Widgets3D/SphereWidget.js +4 -12
- package/Widgets/Widgets3D/SplineWidget/state.js +2 -2
- package/Widgets/Widgets3D/SplineWidget.js +2 -5
- package/package.json +1 -1
- package/types.d.ts +23 -13
|
@@ -101,7 +101,7 @@ export interface vtkInteractorObserver extends vtkObject {
|
|
|
101
101
|
/**
|
|
102
102
|
* Transform from world to display coordinates.
|
|
103
103
|
*
|
|
104
|
-
* @param {vtkRenderer} renderer
|
|
104
|
+
* @param {vtkRenderer} renderer The vtkRenderer instance.
|
|
105
105
|
* @param {Number} x
|
|
106
106
|
* @param {Number} y
|
|
107
107
|
* @param {Number} z
|
|
@@ -116,7 +116,7 @@ export interface vtkInteractorObserver extends vtkObject {
|
|
|
116
116
|
/**
|
|
117
117
|
* Transform from display to world coordinates.
|
|
118
118
|
*
|
|
119
|
-
* @param {vtkRenderer} renderer
|
|
119
|
+
* @param {vtkRenderer} renderer The vtkRenderer instance.
|
|
120
120
|
* @param {Number} x
|
|
121
121
|
* @param {Number} y
|
|
122
122
|
* @param {Number} z
|
package/Rendering/Core/Mapper.js
CHANGED
|
@@ -4,7 +4,7 @@ import vtkAbstractMapper3D from './AbstractMapper3D.js';
|
|
|
4
4
|
import vtkDataArray from '../../Common/Core/DataArray.js';
|
|
5
5
|
import vtkImageData from '../../Common/DataModel/ImageData.js';
|
|
6
6
|
import vtkLookupTable from '../../Common/Core/LookupTable.js';
|
|
7
|
-
import {
|
|
7
|
+
import { O as createUninitializedBounds, i as isNan } from '../../Common/Core/Math/index.js';
|
|
8
8
|
import vtkScalarsToColors from '../../Common/Core/ScalarsToColors/Constants.js';
|
|
9
9
|
import CoincidentTopologyHelper from './Mapper/CoincidentTopologyHelper.js';
|
|
10
10
|
import Constants from './Mapper/Constants.js';
|
|
@@ -73,7 +73,7 @@ export interface vtkPicker extends vtkAbstractPicker {
|
|
|
73
73
|
/**
|
|
74
74
|
* Perform pick operation with selection point provided.
|
|
75
75
|
* @param selection
|
|
76
|
-
* @param {vtkRenderer} renderer
|
|
76
|
+
* @param {vtkRenderer} renderer The vtkRenderer instance.
|
|
77
77
|
*/
|
|
78
78
|
pick(selection: any, renderer: vtkRenderer): any;
|
|
79
79
|
|
package/Rendering/Core/Prop3D.js
CHANGED
|
@@ -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 {
|
|
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
|
|
@@ -38,7 +38,7 @@ export interface vtkRenderWindow extends vtkObject {
|
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* Add renderer
|
|
41
|
-
* @param renderer
|
|
41
|
+
* @param {vtkRenderer} renderer The vtkRenderer instance.
|
|
42
42
|
*/
|
|
43
43
|
addRenderer(renderer: vtkRenderer): void;
|
|
44
44
|
|
|
@@ -53,7 +53,7 @@ export interface vtkRenderWindow extends vtkObject {
|
|
|
53
53
|
* @param {String} format
|
|
54
54
|
* @param {*} opts
|
|
55
55
|
*/
|
|
56
|
-
captureImages(format?: string, opts?: any):
|
|
56
|
+
captureImages(format?: string, opts?: any): Promise<string>[];
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
59
|
*
|
|
@@ -120,14 +120,14 @@ export interface vtkRenderWindow extends vtkObject {
|
|
|
120
120
|
|
|
121
121
|
/**
|
|
122
122
|
*
|
|
123
|
-
* @param name
|
|
124
|
-
* @param initialValues
|
|
123
|
+
* @param {String} name
|
|
124
|
+
* @param {} [initialValues]
|
|
125
125
|
*/
|
|
126
|
-
newAPISpecificView(name: string, initialValues
|
|
126
|
+
newAPISpecificView(name: string, initialValues?: object): any;
|
|
127
127
|
|
|
128
128
|
/**
|
|
129
129
|
* Remove renderer
|
|
130
|
-
* @param renderer
|
|
130
|
+
* @param {vtkRenderer} renderer The vtkRenderer instance.
|
|
131
131
|
*/
|
|
132
132
|
removeRenderer(renderer: vtkRenderer): void;
|
|
133
133
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
2
2
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
3
|
import macro from '../../macros.js';
|
|
4
|
-
import {
|
|
4
|
+
import { B as degreesFromRadians } from '../../Common/Core/Math/index.js';
|
|
5
5
|
import Constants from './RenderWindowInteractor/Constants.js';
|
|
6
6
|
|
|
7
7
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -3,11 +3,10 @@ import { Bounds, Nullable } from './../../types';
|
|
|
3
3
|
import vtkCamera from './Camera';
|
|
4
4
|
import vtkLight from './Light';
|
|
5
5
|
import vtkRenderWindow from './RenderWindow';
|
|
6
|
-
import
|
|
6
|
+
import vtkProp from './Prop';
|
|
7
7
|
import vtkViewport, { IViewportInitialValues } from './Viewport';
|
|
8
8
|
import vtkVolume from './Volume';
|
|
9
9
|
import vtkTexture from './Texture';
|
|
10
|
-
import vtkActor from './Actor';
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
export interface IRendererInitialValues extends IViewportInitialValues {
|
|
@@ -19,7 +18,7 @@ export interface IRendererInitialValues extends IViewportInitialValues {
|
|
|
19
18
|
twoSidedLighting?: boolean;
|
|
20
19
|
lastRenderTimeInSeconds?: number;
|
|
21
20
|
lights?: vtkLight[];
|
|
22
|
-
actors?:
|
|
21
|
+
actors?: vtkProp[];
|
|
23
22
|
volumes?: vtkVolume[];
|
|
24
23
|
lightFollowCamera?: boolean;
|
|
25
24
|
numberOfPropsRendered?: number;
|
|
@@ -48,9 +47,9 @@ export interface vtkRenderer extends vtkViewport {
|
|
|
48
47
|
|
|
49
48
|
/**
|
|
50
49
|
* Add different types of props to the renderer.
|
|
51
|
-
* @param {
|
|
50
|
+
* @param {vtkProp} actor The vtkProp instance.
|
|
52
51
|
*/
|
|
53
|
-
addActor(actor:
|
|
52
|
+
addActor(actor: vtkProp): boolean;
|
|
54
53
|
|
|
55
54
|
/**
|
|
56
55
|
* Add a light to the list of lights.
|
|
@@ -93,13 +92,13 @@ export interface vtkRenderer extends vtkViewport {
|
|
|
93
92
|
* Return any actors in this renderer.
|
|
94
93
|
*
|
|
95
94
|
*/
|
|
96
|
-
getActors():
|
|
95
|
+
getActors(): vtkProp[];
|
|
97
96
|
|
|
98
97
|
/**
|
|
99
98
|
* Return any actors in this renderer.
|
|
100
99
|
*
|
|
101
100
|
*/
|
|
102
|
-
getActorsByReference():
|
|
101
|
+
getActorsByReference(): vtkProp[];
|
|
103
102
|
|
|
104
103
|
/**
|
|
105
104
|
*
|
|
@@ -474,9 +473,9 @@ export interface vtkRenderer extends vtkViewport {
|
|
|
474
473
|
|
|
475
474
|
/**
|
|
476
475
|
*
|
|
477
|
-
* @param {
|
|
476
|
+
* @param {vtkProp} actor
|
|
478
477
|
*/
|
|
479
|
-
removeActor(actor:
|
|
478
|
+
removeActor(actor: vtkProp): void;
|
|
480
479
|
|
|
481
480
|
/**
|
|
482
481
|
*
|
|
@@ -2,7 +2,7 @@ import { mat4, vec3 } from 'gl-matrix';
|
|
|
2
2
|
import { newInstance as newInstance$1, get, setGet, getArray, setGetArray, moveToProtected, vtkDebugMacro as vtkDebugMacro$1, vtkErrorMacro as vtkErrorMacro$1, vtkWarningMacro as vtkWarningMacro$1 } from '../../macros.js';
|
|
3
3
|
import vtkCamera from './Camera.js';
|
|
4
4
|
import vtkLight from './Light.js';
|
|
5
|
-
import {
|
|
5
|
+
import { Q as areBoundsInitialized, u as uninitializeBounds, r as radiansFromDegrees, d as dot, O as createUninitializedBounds } from '../../Common/Core/Math/index.js';
|
|
6
6
|
import vtkViewport from './Viewport.js';
|
|
7
7
|
import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
|
2
2
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
3
|
import { vec3, mat4 } from 'gl-matrix';
|
|
4
4
|
import * as d3 from 'd3-scale';
|
|
5
|
-
import {
|
|
5
|
+
import { N as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
|
|
6
6
|
import macro from '../../macros.js';
|
|
7
7
|
import vtkActor from './Actor.js';
|
|
8
8
|
import vtkDataArray from '../../Common/Core/DataArray.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import macro from '../../macros.js';
|
|
2
|
-
import {
|
|
2
|
+
import { O as createUninitializedBounds, D as clampValue } from '../../Common/Core/Math/index.js';
|
|
3
3
|
import Constants from './VolumeMapper/Constants.js';
|
|
4
4
|
import vtkAbstractMapper from './AbstractMapper.js';
|
|
5
5
|
|
|
@@ -252,10 +252,10 @@ export interface vtkVolumeProperty extends vtkObject {
|
|
|
252
252
|
|
|
253
253
|
/**
|
|
254
254
|
*
|
|
255
|
-
* @param {
|
|
255
|
+
* @param {Boolean} index
|
|
256
256
|
* @param {Number} value
|
|
257
257
|
*/
|
|
258
|
-
setUseGradientOpacity(index:
|
|
258
|
+
setUseGradientOpacity(index: boolean, value: number): boolean;
|
|
259
259
|
|
|
260
260
|
/**
|
|
261
261
|
*
|
|
@@ -40,7 +40,7 @@ export interface IViewState {
|
|
|
40
40
|
// vtk object mtime.
|
|
41
41
|
mtime: number;
|
|
42
42
|
// ID of the parent. Null for the root.
|
|
43
|
-
parent?: string
|
|
43
|
+
parent?: Nullable<string>;
|
|
44
44
|
properties?: {[key: string]: any};
|
|
45
45
|
// Child objects.
|
|
46
46
|
dependencies?: IViewState[];
|
|
@@ -8,7 +8,7 @@ import { v as vtkPolyData2DVS } from './glsl/vtkPolyData2DVS.glsl.js';
|
|
|
8
8
|
import vtkReplacementShaderMapper from './ReplacementShaderMapper.js';
|
|
9
9
|
import vtkShaderProgram from './ShaderProgram.js';
|
|
10
10
|
import vtkViewNode from '../SceneGraph/ViewNode.js';
|
|
11
|
-
import {
|
|
11
|
+
import { L as round } from '../../Common/Core/Math/index.js';
|
|
12
12
|
import { DisplayLocation } from '../Core/Property2D/Constants.js';
|
|
13
13
|
import { registerOverride } from './ViewNodeFactory.js';
|
|
14
14
|
|
|
@@ -137,7 +137,7 @@ export interface vtkOpenGLRenderWindow extends vtkOpenGLRenderWindowBase {
|
|
|
137
137
|
* @param {Number} x
|
|
138
138
|
* @param {Number} y
|
|
139
139
|
* @param {Number} z
|
|
140
|
-
* @param {vtkRenderer} renderer
|
|
140
|
+
* @param {vtkRenderer} renderer The vtkRenderer instance.
|
|
141
141
|
*/
|
|
142
142
|
worldToView(x: number, y: number, z: number, renderer: vtkRenderer): Vector3;
|
|
143
143
|
|
|
@@ -146,7 +146,7 @@ export interface vtkOpenGLRenderWindow extends vtkOpenGLRenderWindowBase {
|
|
|
146
146
|
* @param {Number} x
|
|
147
147
|
* @param {Number} y
|
|
148
148
|
* @param {Number} z
|
|
149
|
-
* @param {vtkRenderer} renderer
|
|
149
|
+
* @param {vtkRenderer} renderer The vtkRenderer instance.
|
|
150
150
|
*/
|
|
151
151
|
viewToWorld(x: number, y: number, z: number, renderer: vtkRenderer): Vector3;
|
|
152
152
|
|
|
@@ -155,7 +155,7 @@ export interface vtkOpenGLRenderWindow extends vtkOpenGLRenderWindowBase {
|
|
|
155
155
|
* @param {Number} x
|
|
156
156
|
* @param {Number} y
|
|
157
157
|
* @param {Number} z
|
|
158
|
-
* @param {vtkRenderer} renderer
|
|
158
|
+
* @param {vtkRenderer} renderer The vtkRenderer instance.
|
|
159
159
|
*/
|
|
160
160
|
worldToDisplay(x: number, y: number, z: number, renderer: vtkRenderer): Vector3;
|
|
161
161
|
|
|
@@ -164,7 +164,7 @@ export interface vtkOpenGLRenderWindow extends vtkOpenGLRenderWindowBase {
|
|
|
164
164
|
* @param {Number} x
|
|
165
165
|
* @param {Number} y
|
|
166
166
|
* @param {Number} z
|
|
167
|
-
* @param {vtkRenderer} renderer
|
|
167
|
+
* @param {vtkRenderer} renderer The vtkRenderer instance.
|
|
168
168
|
*/
|
|
169
169
|
displayToWorld(x: number, y: number, z: number, renderer: vtkRenderer): Vector3;
|
|
170
170
|
|
|
@@ -173,7 +173,7 @@ export interface vtkOpenGLRenderWindow extends vtkOpenGLRenderWindowBase {
|
|
|
173
173
|
* @param {Number} x
|
|
174
174
|
* @param {Number} y
|
|
175
175
|
* @param {Number} z
|
|
176
|
-
* @param {vtkRenderer} renderer
|
|
176
|
+
* @param {vtkRenderer} renderer The vtkRenderer instance.
|
|
177
177
|
*/
|
|
178
178
|
normalizedDisplayToViewport(x: number, y: number, z: number, renderer: vtkRenderer): Vector3;
|
|
179
179
|
|
|
@@ -182,7 +182,7 @@ export interface vtkOpenGLRenderWindow extends vtkOpenGLRenderWindowBase {
|
|
|
182
182
|
* @param {Number} x
|
|
183
183
|
* @param {Number} y
|
|
184
184
|
* @param {Number} z
|
|
185
|
-
* @param {vtkRenderer} renderer
|
|
185
|
+
* @param {vtkRenderer} renderer The vtkRenderer instance.
|
|
186
186
|
*/
|
|
187
187
|
viewportToNormalizedViewport(x: number, y: number, z: number, renderer: vtkRenderer): Vector3;
|
|
188
188
|
|
|
@@ -207,7 +207,7 @@ export interface vtkOpenGLRenderWindow extends vtkOpenGLRenderWindowBase {
|
|
|
207
207
|
* @param {Number} x
|
|
208
208
|
* @param {Number} y
|
|
209
209
|
* @param {Number} z
|
|
210
|
-
* @param {vtkRenderer} renderer
|
|
210
|
+
* @param {vtkRenderer} renderer The vtkRenderer instance.
|
|
211
211
|
*/
|
|
212
212
|
viewportToNormalizedDisplay(x: number, y: number, z: number, renderer: vtkRenderer): Vector3;
|
|
213
213
|
|
|
@@ -3,7 +3,7 @@ import Constants from './Texture/Constants.js';
|
|
|
3
3
|
import HalfFloat from '../../Common/Core/HalfFloat.js';
|
|
4
4
|
import { newInstance as newInstance$1, obj, set, setGet, get, newTypedArray, vtkDebugMacro as vtkDebugMacro$1, vtkErrorMacro as vtkErrorMacro$1, vtkWarningMacro as vtkWarningMacro$1 } from '../../macros.js';
|
|
5
5
|
import vtkDataArray from '../../Common/Core/DataArray.js';
|
|
6
|
-
import {
|
|
6
|
+
import { R as isPowerOfTwo, N as nearestPowerOfTwo } from '../../Common/Core/Math/index.js';
|
|
7
7
|
import vtkViewNode from '../SceneGraph/ViewNode.js';
|
|
8
8
|
import { registerOverride } from './ViewNodeFactory.js';
|
|
9
9
|
|
|
@@ -33,7 +33,7 @@ export interface IRenderingComponents {
|
|
|
33
33
|
/**
|
|
34
34
|
* Extract the rendering components from the given renderer.
|
|
35
35
|
*
|
|
36
|
-
* @param renderer
|
|
36
|
+
* @param {vtkRenderer} renderer The vtkRenderer instance.
|
|
37
37
|
*/
|
|
38
38
|
export function extractRenderingComponents(renderer: vtkRenderer): IRenderingComponents;
|
|
39
39
|
|
|
@@ -23,7 +23,8 @@ var DEFAULT_VALUES = {
|
|
|
23
23
|
useActiveColor: true,
|
|
24
24
|
behavior: Behavior.HANDLE,
|
|
25
25
|
pickable: true,
|
|
26
|
-
dragable: true
|
|
26
|
+
dragable: true,
|
|
27
|
+
scaleInPixels: true
|
|
27
28
|
}; // ----------------------------------------------------------------------------
|
|
28
29
|
|
|
29
30
|
function extend(publicAPI, model) {
|
|
@@ -2,7 +2,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
2
2
|
import macro from '../../macros.js';
|
|
3
3
|
import vtkActor from '../../Rendering/Core/Actor.js';
|
|
4
4
|
import vtkMapper from '../../Rendering/Core/Mapper.js';
|
|
5
|
-
import {
|
|
5
|
+
import { C as areEquals } from '../../Common/Core/Math/index.js';
|
|
6
6
|
import vtkBoundingBox from '../../Common/DataModel/BoundingBox.js';
|
|
7
7
|
import vtkPolyData from '../../Common/DataModel/PolyData.js';
|
|
8
8
|
import vtkTubeFilter from '../../Filters/General/TubeFilter.js';
|
|
@@ -6,7 +6,7 @@ function generateState() {
|
|
|
6
6
|
mixins: ['origin', 'color', 'scale1', 'visible', 'manipulator'],
|
|
7
7
|
name: 'moveHandle',
|
|
8
8
|
initialValues: {
|
|
9
|
-
scale1:
|
|
9
|
+
scale1: 30,
|
|
10
10
|
visible: false
|
|
11
11
|
}
|
|
12
12
|
}).addDynamicMixinState({
|
|
@@ -14,7 +14,7 @@ function generateState() {
|
|
|
14
14
|
mixins: ['origin', 'color', 'scale1', 'visible', 'manipulator'],
|
|
15
15
|
name: 'handle',
|
|
16
16
|
initialValues: {
|
|
17
|
-
scale1:
|
|
17
|
+
scale1: 30
|
|
18
18
|
}
|
|
19
19
|
}).build();
|
|
20
20
|
}
|
|
@@ -4,7 +4,7 @@ import vtkAbstractWidgetFactory from '../Core/AbstractWidgetFactory.js';
|
|
|
4
4
|
import vtkPlanePointManipulator from '../Manipulators/PlaneManipulator.js';
|
|
5
5
|
import vtkPolyLineRepresentation from '../Representations/PolyLineRepresentation.js';
|
|
6
6
|
import vtkSphereHandleRepresentation from '../Representations/SphereHandleRepresentation.js';
|
|
7
|
-
import { s as subtract,
|
|
7
|
+
import { s as subtract, S as angleBetweenVectors } from '../../Common/Core/Math/index.js';
|
|
8
8
|
import widgetBehavior from './AngleWidget/behavior.js';
|
|
9
9
|
import generateState from './AngleWidget/state.js';
|
|
10
10
|
import { ViewTypes } from '../Core/WidgetManager/Constants.js';
|
|
@@ -21,7 +21,7 @@ function vtkAngleWidget(publicAPI, model) {
|
|
|
21
21
|
var superClass = _objectSpread({}, publicAPI); // --- Widget Requirement ---------------------------------------------------
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
model.methodsToLink = ['activeScaleFactor', 'activeColor', 'useActiveColor', 'glyphResolution', 'defaultScale'];
|
|
24
|
+
model.methodsToLink = ['activeScaleFactor', 'activeColor', 'useActiveColor', 'glyphResolution', 'defaultScale', 'scaleInPixels'];
|
|
25
25
|
model.behavior = widgetBehavior;
|
|
26
26
|
model.widgetState = generateState();
|
|
27
27
|
|
|
@@ -6,7 +6,7 @@ function generateState() {
|
|
|
6
6
|
mixins: ['origin', 'color', 'scale1', 'visible', 'manipulator'],
|
|
7
7
|
name: 'moveHandle',
|
|
8
8
|
initialValues: {
|
|
9
|
-
scale1:
|
|
9
|
+
scale1: 30,
|
|
10
10
|
visible: false
|
|
11
11
|
}
|
|
12
12
|
}).addDynamicMixinState({
|
|
@@ -14,7 +14,7 @@ function generateState() {
|
|
|
14
14
|
mixins: ['origin', 'color', 'scale1', 'visible', 'manipulator'],
|
|
15
15
|
name: 'handle',
|
|
16
16
|
initialValues: {
|
|
17
|
-
scale1:
|
|
17
|
+
scale1: 30
|
|
18
18
|
}
|
|
19
19
|
}).build();
|
|
20
20
|
}
|
|
@@ -21,7 +21,7 @@ function vtkDistanceWidget(publicAPI, model) {
|
|
|
21
21
|
var superClass = _objectSpread({}, publicAPI); // --- Widget Requirement ---------------------------------------------------
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
model.methodsToLink = ['activeScaleFactor', 'activeColor', 'useActiveColor', 'glyphResolution', 'defaultScale'];
|
|
24
|
+
model.methodsToLink = ['activeScaleFactor', 'activeColor', 'useActiveColor', 'glyphResolution', 'defaultScale', 'scaleInPixels'];
|
|
25
25
|
model.behavior = widgetBehavior;
|
|
26
26
|
model.widgetState = generateState();
|
|
27
27
|
|
|
@@ -32,10 +32,7 @@ function vtkEllipseWidget(publicAPI, model) {
|
|
|
32
32
|
default:
|
|
33
33
|
return [{
|
|
34
34
|
builder: vtkSphereHandleRepresentation,
|
|
35
|
-
labels: ['moveHandle']
|
|
36
|
-
initialValues: {
|
|
37
|
-
scaleInPixels: true
|
|
38
|
-
}
|
|
35
|
+
labels: ['moveHandle']
|
|
39
36
|
}, {
|
|
40
37
|
builder: vtkCircleContextRepresentation,
|
|
41
38
|
labels: ['ellipseHandle']
|
|
@@ -101,7 +101,8 @@ function vtkImageCroppingWidget(publicAPI, model) {
|
|
|
101
101
|
}); // --- Widget Requirement ---------------------------------------------------
|
|
102
102
|
|
|
103
103
|
model.behavior = widgetBehavior;
|
|
104
|
-
model.widgetState = build();
|
|
104
|
+
model.widgetState = build();
|
|
105
|
+
model.methodsToLink = ['scaleInPixels']; // Given a view type (geometry, slice, volume), return a description
|
|
105
106
|
// of what representations to create and what widget state to pass
|
|
106
107
|
// to the respective representations.
|
|
107
108
|
|
|
@@ -21,7 +21,7 @@ function vtkLabelWidget(publicAPI, model) {
|
|
|
21
21
|
var superClass = _objectSpread({}, publicAPI); // --- Widget Requirement ---------------------------------------------------
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
model.methodsToLink = ['textProps', 'fontProperties', 'strokeFontProperties'];
|
|
24
|
+
model.methodsToLink = ['textProps', 'fontProperties', 'strokeFontProperties', 'scaleInPixels'];
|
|
25
25
|
model.behavior = widgetBehavior;
|
|
26
26
|
model.widgetState = generateState();
|
|
27
27
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as subtract, x as multiplyScalar, k as add,
|
|
1
|
+
import { s as subtract, x as multiplyScalar, k as add, C as areEquals } from '../../../Common/Core/Math/index.js';
|
|
2
2
|
|
|
3
3
|
function calculateTextPosition(model) {
|
|
4
4
|
var vector = [0, 0, 0];
|
|
@@ -12,7 +12,7 @@ function generateState() {
|
|
|
12
12
|
mixins: ['origin', 'color', 'scale1', 'visible', 'manipulator', 'shape'],
|
|
13
13
|
name: 'moveHandle',
|
|
14
14
|
initialValues: {
|
|
15
|
-
scale1:
|
|
15
|
+
scale1: 30,
|
|
16
16
|
visible: true
|
|
17
17
|
}
|
|
18
18
|
}).addStateFromMixin({
|
|
@@ -20,14 +20,14 @@ function generateState() {
|
|
|
20
20
|
mixins: ['origin', 'color', 'scale1', 'visible', 'manipulator', 'shape'],
|
|
21
21
|
name: 'handle1',
|
|
22
22
|
initialValues: {
|
|
23
|
-
scale1:
|
|
23
|
+
scale1: 30
|
|
24
24
|
}
|
|
25
25
|
}).addStateFromMixin({
|
|
26
26
|
labels: ['handle2'],
|
|
27
27
|
mixins: ['origin', 'color', 'scale1', 'visible', 'manipulator', 'shape'],
|
|
28
28
|
name: 'handle2',
|
|
29
29
|
initialValues: {
|
|
30
|
-
scale1:
|
|
30
|
+
scale1: 30
|
|
31
31
|
}
|
|
32
32
|
}).addStateFromMixin({
|
|
33
33
|
labels: ['SVGtext'],
|
|
@@ -26,7 +26,7 @@ function vtkLineWidget(publicAPI, model) {
|
|
|
26
26
|
model.widgetState = generateState();
|
|
27
27
|
model.behavior = widgetBehavior; // --- Widget Requirement ---------------------------------------------------
|
|
28
28
|
|
|
29
|
-
model.methodsToLink = ['activeScaleFactor', 'activeColor', 'useActiveColor', 'glyphResolution', 'defaultScale'];
|
|
29
|
+
model.methodsToLink = ['activeScaleFactor', 'activeColor', 'useActiveColor', 'glyphResolution', 'defaultScale', 'scaleInPixels'];
|
|
30
30
|
|
|
31
31
|
publicAPI.getRepresentationsForViewType = function (viewType) {
|
|
32
32
|
switch (viewType) {
|
|
@@ -39,9 +39,6 @@ function vtkLineWidget(publicAPI, model) {
|
|
|
39
39
|
builder: vtkArrowHandleRepresentation,
|
|
40
40
|
labels: ['handle1'],
|
|
41
41
|
initialValues: {
|
|
42
|
-
/* to scale handle size when zooming/dezooming, optional */
|
|
43
|
-
scaleInPixels: true,
|
|
44
|
-
|
|
45
42
|
/*
|
|
46
43
|
* This table sets the visibility of the handles' actors
|
|
47
44
|
* 1st actor is a displayActor, which hides a rendered object on the HTML layer.
|
|
@@ -69,9 +66,6 @@ function vtkLineWidget(publicAPI, model) {
|
|
|
69
66
|
builder: vtkArrowHandleRepresentation,
|
|
70
67
|
labels: ['handle2'],
|
|
71
68
|
initialValues: {
|
|
72
|
-
/* to scale handle size when zooming/dezooming, optional */
|
|
73
|
-
scaleInPixels: true,
|
|
74
|
-
|
|
75
69
|
/*
|
|
76
70
|
* This table sets the visibility of the handles' actors
|
|
77
71
|
* 1st actor is a displayActor, which hides a rendered object on the HTML layer.
|
|
@@ -99,7 +93,6 @@ function vtkLineWidget(publicAPI, model) {
|
|
|
99
93
|
builder: vtkArrowHandleRepresentation,
|
|
100
94
|
labels: ['moveHandle'],
|
|
101
95
|
initialValues: {
|
|
102
|
-
scaleInPixels: true,
|
|
103
96
|
visibilityFlagArray: [false, false],
|
|
104
97
|
coincidentTopologyParameters: {
|
|
105
98
|
Point: {
|
|
@@ -34,16 +34,10 @@ function vtkPolyLineWidget(publicAPI, model) {
|
|
|
34
34
|
default:
|
|
35
35
|
return [{
|
|
36
36
|
builder: vtkSphereHandleRepresentation,
|
|
37
|
-
labels: ['handles']
|
|
38
|
-
initialValues: {
|
|
39
|
-
scaleInPixels: true
|
|
40
|
-
}
|
|
37
|
+
labels: ['handles']
|
|
41
38
|
}, {
|
|
42
39
|
builder: vtkSphereHandleRepresentation,
|
|
43
|
-
labels: ['moveHandle']
|
|
44
|
-
initialValues: {
|
|
45
|
-
scaleInPixels: true
|
|
46
|
-
}
|
|
40
|
+
labels: ['moveHandle']
|
|
47
41
|
}, {
|
|
48
42
|
builder: vtkSVGLandmarkRepresentation,
|
|
49
43
|
initialValues: {
|
|
@@ -32,10 +32,7 @@ function vtkRectangleWidget(publicAPI, model) {
|
|
|
32
32
|
default:
|
|
33
33
|
return [{
|
|
34
34
|
builder: vtkSphereHandleRepresentation,
|
|
35
|
-
labels: ['moveHandle']
|
|
36
|
-
initialValues: {
|
|
37
|
-
scaleInPixels: true
|
|
38
|
-
}
|
|
35
|
+
labels: ['moveHandle']
|
|
39
36
|
}, {
|
|
40
37
|
builder: vtkRectangleContextRepresentation,
|
|
41
38
|
labels: ['rectangleHandle']
|
|
@@ -3,7 +3,7 @@ import macro from '../../../macros.js';
|
|
|
3
3
|
import vtkBoundingBox from '../../../Common/DataModel/BoundingBox.js';
|
|
4
4
|
import vtkLine from '../../../Common/DataModel/Line.js';
|
|
5
5
|
import vtkPlanePointManipulator from '../../Manipulators/PlaneManipulator.js';
|
|
6
|
-
import { s as subtract, l as normalize, d as dot, j as cross, m as multiplyAccumulate, x as multiplyScalar,
|
|
6
|
+
import { s as subtract, l as normalize, d as dot, j as cross, m as multiplyAccumulate, x as multiplyScalar, T as signedAngleBetweenVectors } from '../../../Common/Core/Math/index.js';
|
|
7
7
|
import { updateState, getAssociatedLinesName, boundPointOnPlane, rotateVector } from './helpers.js';
|
|
8
8
|
import { InteractionMethodsName, ScrollingMethods } from './Constants.js';
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ import vtkBoundingBox, { STATIC } from '../../../Common/DataModel/BoundingBox.js
|
|
|
3
3
|
import vtkCubeSource from '../../../Filters/Sources/CubeSource.js';
|
|
4
4
|
import vtkCutter from '../../../Filters/Core/Cutter.js';
|
|
5
5
|
import vtkPlane from '../../../Common/DataModel/Plane.js';
|
|
6
|
-
import { s as subtract, l as normalize, j as cross, x as multiplyScalar, m as multiplyAccumulate,
|
|
6
|
+
import { s as subtract, l as normalize, j as cross, x as multiplyScalar, m as multiplyAccumulate, T as signedAngleBetweenVectors } from '../../../Common/Core/Math/index.js';
|
|
7
7
|
import vtkMatrixBuilder from '../../../Common/Core/MatrixBuilder.js';
|
|
8
8
|
import { ViewTypes } from '../../Core/WidgetManager/Constants.js';
|
|
9
9
|
|
|
@@ -18,26 +18,18 @@ function vtkSphereWidget(publicAPI, model) {
|
|
|
18
18
|
var superClass = _objectSpread({}, publicAPI);
|
|
19
19
|
|
|
20
20
|
model.behavior = widgetBehavior;
|
|
21
|
+
model.methodsToLink = ['scaleInPixels'];
|
|
21
22
|
|
|
22
23
|
publicAPI.getRepresentationsForViewType = function (viewType) {
|
|
23
24
|
return [{
|
|
24
25
|
builder: vtkSphereHandleRepresentation,
|
|
25
|
-
labels: ['moveHandle']
|
|
26
|
-
initialValues: {
|
|
27
|
-
scaleInPixels: true
|
|
28
|
-
}
|
|
26
|
+
labels: ['moveHandle']
|
|
29
27
|
}, {
|
|
30
28
|
builder: vtkSphereHandleRepresentation,
|
|
31
|
-
labels: ['centerHandle']
|
|
32
|
-
initialValues: {
|
|
33
|
-
scaleInPixels: true
|
|
34
|
-
}
|
|
29
|
+
labels: ['centerHandle']
|
|
35
30
|
}, {
|
|
36
31
|
builder: vtkSphereHandleRepresentation,
|
|
37
|
-
labels: ['borderHandle']
|
|
38
|
-
initialValues: {
|
|
39
|
-
scaleInPixels: true
|
|
40
|
-
}
|
|
32
|
+
labels: ['borderHandle']
|
|
41
33
|
}, {
|
|
42
34
|
builder: vtkSphereContextRepresentation,
|
|
43
35
|
labels: ['sphereHandle']
|
|
@@ -29,7 +29,7 @@ function generateState() {
|
|
|
29
29
|
mixins: ['origin', 'color', 'scale1', 'visible', 'manipulator'],
|
|
30
30
|
name: 'moveHandle',
|
|
31
31
|
initialValues: {
|
|
32
|
-
scale1:
|
|
32
|
+
scale1: 10,
|
|
33
33
|
visible: false
|
|
34
34
|
}
|
|
35
35
|
}).addDynamicMixinState({
|
|
@@ -37,7 +37,7 @@ function generateState() {
|
|
|
37
37
|
mixins: ['origin', 'color', 'scale1', 'visible', 'manipulator'],
|
|
38
38
|
name: 'handle',
|
|
39
39
|
initialValues: {
|
|
40
|
-
scale1:
|
|
40
|
+
scale1: 10
|
|
41
41
|
}
|
|
42
42
|
}).build();
|
|
43
43
|
}
|
|
@@ -20,7 +20,7 @@ function vtkSplineWidget(publicAPI, model) {
|
|
|
20
20
|
var superClass = _objectSpread({}, publicAPI); // --- Widget Requirement ---------------------------------------------------
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
model.methodsToLink = ['boundaryCondition', 'close', 'outputBorder', 'fill', 'borderColor', 'errorBorderColor'];
|
|
23
|
+
model.methodsToLink = ['boundaryCondition', 'close', 'outputBorder', 'fill', 'borderColor', 'errorBorderColor', 'scaleInPixels'];
|
|
24
24
|
model.behavior = widgetBehavior;
|
|
25
25
|
model.widgetState = generateState();
|
|
26
26
|
|
|
@@ -33,10 +33,7 @@ function vtkSplineWidget(publicAPI, model) {
|
|
|
33
33
|
default:
|
|
34
34
|
return [{
|
|
35
35
|
builder: vtkSphereHandleRepresentation,
|
|
36
|
-
labels: ['handles', 'moveHandle']
|
|
37
|
-
initialValues: {
|
|
38
|
-
scaleInPixels: true
|
|
39
|
-
}
|
|
36
|
+
labels: ['handles', 'moveHandle']
|
|
40
37
|
}, {
|
|
41
38
|
builder: vtkSplineContextRepresentation,
|
|
42
39
|
labels: ['handles', 'moveHandle']
|