@kitware/vtk.js 24.9.0 → 24.10.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/Math/index.js +1 -1
- package/Common/Core/Math.js +1 -1
- package/Common/Core/ScalarsToColors/Constants.d.ts +18 -0
- package/Common/Core/ScalarsToColors.d.ts +6 -16
- package/Common/DataModel/Box.d.ts +4 -4
- package/Common/DataModel/CardinalSpline1D.d.ts +8 -4
- package/Common/DataModel/CardinalSpline1D.js +133 -4
- package/Common/DataModel/Cell.js +3 -1
- package/Common/DataModel/CellTypes.js +6 -1
- package/Common/DataModel/ITKHelper.d.ts +3 -3
- package/Common/DataModel/KochanekSpline1D.d.ts +8 -4
- package/Common/DataModel/KochanekSpline1D.js +103 -2
- package/Common/DataModel/Line.d.ts +8 -3
- package/Common/DataModel/Line.js +16 -11
- package/Common/DataModel/Plane.js +1 -1
- package/Common/DataModel/PolyData/Constants.d.ts +6 -0
- package/Common/DataModel/PolyLine.d.ts +63 -0
- package/Common/DataModel/PolyLine.js +84 -0
- package/Common/DataModel/Polygon.js +1 -1
- package/Common/DataModel/Spline1D/Constants.js +17 -0
- package/Common/DataModel/Spline1D.d.ts +20 -2
- package/Common/DataModel/Spline3D/Constants.d.ts +9 -0
- package/Common/DataModel/Spline3D.d.ts +4 -9
- package/Common/DataModel/Spline3D.js +20 -15
- package/Filters/General/ImageCropFilter.d.ts +9 -6
- package/Filters/Sources/LineSource.js +1 -1
- package/Filters/Sources/PlaneSource.js +1 -1
- package/Interaction/Manipulators/MouseCameraUnicamManipulator.js +1 -1
- package/Interaction/Manipulators/MouseCameraUnicamRotateManipulator.js +1 -1
- package/Interaction/Widgets/OrientationMarkerWidget/Constants.d.ts +11 -0
- package/Interaction/Widgets/OrientationMarkerWidget.d.ts +2 -6
- package/Rendering/Core/CellPicker.js +53 -32
- package/Rendering/Core/Mapper/Constants.d.ts +26 -0
- package/Rendering/Core/Mapper.d.ts +5 -21
- package/Rendering/Core/Property/Constants.d.ts +24 -0
- package/Rendering/Core/Property.d.ts +6 -20
- package/Rendering/Core/RenderWindowInteractor/Constants.d.ts +31 -0
- package/Rendering/Core/RenderWindowInteractor.d.ts +223 -121
- package/Rendering/Core/Viewport.d.ts +2 -4
- package/Rendering/Core/VolumeMapper/Constants.d.ts +19 -0
- package/Rendering/Core/VolumeMapper.d.ts +5 -9
- package/Rendering/Core/VolumeProperty.d.ts +5 -13
- package/Rendering/Misc/FullScreenRenderWindow.d.ts +3 -2
- package/Rendering/OpenGL/RenderWindow.d.ts +28 -10
- package/Widgets/Manipulators/LineManipulator.js +1 -1
- package/Widgets/Representations/ResliceCursorContextRepresentation.js +1 -1
- package/Widgets/Representations/SplineContextRepresentation.js +28 -9
- package/Widgets/Representations/WidgetRepresentation.js +1 -1
- package/Widgets/Widgets3D/AngleWidget.js +1 -1
- package/Widgets/Widgets3D/LineWidget/behavior.js +1 -1
- package/Widgets/Widgets3D/LineWidget/helpers.js +1 -1
- package/Widgets/Widgets3D/ResliceCursorWidget/behavior.js +1 -1
- package/Widgets/Widgets3D/ResliceCursorWidget/helpers.js +1 -1
- package/Widgets/Widgets3D/ResliceCursorWidget.js +1 -1
- package/Widgets/Widgets3D/SplineWidget/state.js +10 -0
- package/Widgets/Widgets3D/SplineWidget.js +1 -1
- package/index.d.ts +9 -0
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare enum BlendMode {
|
|
2
|
+
COMPOSITE_BLEND = 0,
|
|
3
|
+
MAXIMUM_INTENSITY_BLEND = 1,
|
|
4
|
+
MINIMUM_INTENSITY_BLEND = 2,
|
|
5
|
+
AVERAGE_INTENSITY_BLEND = 3,
|
|
6
|
+
ADDITIVE_INTENSITY_BLEND = 4,
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export declare enum FilterMode {
|
|
10
|
+
OFF = 0,
|
|
11
|
+
NORMALIZED = 1,
|
|
12
|
+
RAW = 2,
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare const _default: {
|
|
16
|
+
BlendMode: typeof BlendMode;
|
|
17
|
+
FilterMode: typeof FilterMode;
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { Bounds, Range } from './../../types';
|
|
2
2
|
import vtkAbstractMapper, { IAbstractMapperInitialValues } from './AbstractMapper';
|
|
3
|
-
|
|
4
|
-
export enum BlendMode {
|
|
5
|
-
COMPOSITE_BLEND,
|
|
6
|
-
MAXIMUM_INTENSITY_BLEND,
|
|
7
|
-
MINIMUM_INTENSITY_BLEND,
|
|
8
|
-
AVERAGE_INTENSITY_BLEND,
|
|
9
|
-
}
|
|
3
|
+
import { BlendMode, FilterMode } from './VolumeMapper/Constants';
|
|
10
4
|
|
|
11
5
|
/**
|
|
12
6
|
*
|
|
@@ -165,7 +159,9 @@ export function newInstance(initialValues?: IVolumeMapperInitialValues): vtkVolu
|
|
|
165
159
|
* A volume mapper that performs ray casting on the GPU using fragment programs.
|
|
166
160
|
*/
|
|
167
161
|
export declare const vtkVolumeMapper: {
|
|
168
|
-
newInstance: typeof newInstance
|
|
169
|
-
extend: typeof extend
|
|
162
|
+
newInstance: typeof newInstance;
|
|
163
|
+
extend: typeof extend;
|
|
164
|
+
BlendMode: typeof BlendMode;
|
|
165
|
+
FilterMode: typeof FilterMode;
|
|
170
166
|
};
|
|
171
167
|
export default vtkVolumeMapper;
|
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
import { vtkObject } from './../../interfaces';
|
|
2
|
-
|
|
3
|
-
export enum InterpolationType {
|
|
4
|
-
NEAREST,
|
|
5
|
-
LINEAR,
|
|
6
|
-
FAST_LINEAR,
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export enum OpacityMode {
|
|
10
|
-
FRACTIONAL,
|
|
11
|
-
PROPORTIONAL,
|
|
12
|
-
}
|
|
2
|
+
import { InterpolationType, OpacityMode } from './VolumeProperty/Constants';
|
|
13
3
|
|
|
14
4
|
interface IVolumePropertyInitialValues {
|
|
15
5
|
independentComponents?: boolean;
|
|
@@ -412,7 +402,9 @@ export function newInstance(initialValues?: IVolumePropertyInitialValues): vtkVo
|
|
|
412
402
|
* ```
|
|
413
403
|
*/
|
|
414
404
|
export declare const vtkVolumeProperty: {
|
|
415
|
-
newInstance: typeof newInstance
|
|
416
|
-
extend: typeof extend
|
|
405
|
+
newInstance: typeof newInstance;
|
|
406
|
+
extend: typeof extend;
|
|
407
|
+
InterpolationType: typeof InterpolationType;
|
|
408
|
+
OpacityMode: typeof OpacityMode;
|
|
417
409
|
};
|
|
418
410
|
export default vtkVolumeProperty;
|
|
@@ -13,10 +13,11 @@ import vtkRenderWindowInteractor from './../Core/RenderWindowInteractor';
|
|
|
13
13
|
*/
|
|
14
14
|
export interface IFullScreenRenderWindowInitialValues {
|
|
15
15
|
background?: RGBColor;
|
|
16
|
+
container?: HTMLElement
|
|
16
17
|
containerStyle?: object;
|
|
17
|
-
controlPanelStyle?: object
|
|
18
|
-
listenWindowResize?: boolean;
|
|
18
|
+
controlPanelStyle?: object;
|
|
19
19
|
controllerVisibility?: boolean;
|
|
20
|
+
listenWindowResize?: boolean;
|
|
20
21
|
resizeCallback?: any;
|
|
21
22
|
}
|
|
22
23
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { vtkAlgorithm, vtkObject } from './../../interfaces';
|
|
2
2
|
import { Nullable, Size, Vector2, Vector3 } from './../../types';
|
|
3
|
-
import { vtkRenderer } from './../Core/Renderer';
|
|
4
3
|
import { VtkDataTypes } from './../../Common/Core/DataArray';
|
|
4
|
+
import vtkRenderer from './../Core/Renderer';
|
|
5
5
|
import vtkTexture from './../Core/Texture';
|
|
6
6
|
import vtkViewStream from './../../IO/Core/ImageStream/ViewStream';
|
|
7
7
|
|
|
@@ -9,15 +9,33 @@ import vtkViewStream from './../../IO/Core/ImageStream/ViewStream';
|
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
11
|
export interface IOpenGLRenderWindowInitialValues {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
cullFaceEnabled?: boolean;
|
|
13
|
+
shaderCache?: null;
|
|
14
|
+
initialized?: boolean;
|
|
15
|
+
context?: WebGLRenderingContext | WebGL2RenderingContext;
|
|
16
|
+
canvas?: HTMLCanvasElement;
|
|
17
|
+
cursorVisibility?: boolean;
|
|
18
|
+
cursor?: string;
|
|
19
|
+
textureUnitManager?: null;
|
|
20
|
+
textureResourceIds?: null;
|
|
21
|
+
containerSize?: Size;
|
|
22
|
+
renderPasses?: any[];
|
|
23
|
+
notifyStartCaptureImage?: boolean;
|
|
24
|
+
webgl2?: boolean;
|
|
25
|
+
defaultToWebgl2?: boolean;
|
|
26
|
+
activeFramebuffer?: any;
|
|
27
|
+
xrSession?: any;
|
|
28
|
+
xrSessionIsAR?: boolean;
|
|
29
|
+
xrReferenceSpace?: any;
|
|
30
|
+
xrSupported?: boolean;
|
|
31
|
+
imageFormat?: 'image/png';
|
|
32
|
+
useOffScreen?: boolean;
|
|
33
|
+
useBackgroundImage?: boolean;
|
|
16
34
|
}
|
|
17
35
|
|
|
18
|
-
export interface
|
|
19
|
-
resetCamera: boolean
|
|
20
|
-
size: Size
|
|
36
|
+
export interface ICaptureOptions {
|
|
37
|
+
resetCamera: boolean;
|
|
38
|
+
size: Size;
|
|
21
39
|
scale: number
|
|
22
40
|
}
|
|
23
41
|
|
|
@@ -278,9 +296,9 @@ export interface vtkOpenGLRenderWindow extends vtkOpenGLRenderWindowBase {
|
|
|
278
296
|
* size is assumed. The default format is "image/png". Returns a promise
|
|
279
297
|
* that resolves to the captured screenshot.
|
|
280
298
|
* @param {String} format
|
|
281
|
-
* @param {
|
|
299
|
+
* @param {ICaptureOptions} options
|
|
282
300
|
*/
|
|
283
|
-
captureNextImage(format: string, options:
|
|
301
|
+
captureNextImage(format: string, options: ICaptureOptions): Nullable<Promise<string>>;
|
|
284
302
|
|
|
285
303
|
/**
|
|
286
304
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import macro from '../../macros.js';
|
|
3
|
-
import {
|
|
3
|
+
import { s as subtract, j as cross, d as dot, x as multiplyScalar, k as add } from '../../Common/Core/Math/index.js';
|
|
4
4
|
import vtkAbstractManipulator from './AbstractManipulator.js';
|
|
5
5
|
|
|
6
6
|
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; }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
3
3
|
import macro from '../../macros.js';
|
|
4
|
-
import {
|
|
4
|
+
import { s as subtract, m as multiplyAccumulate, l as normalize, j as cross } from '../../Common/Core/Math/index.js';
|
|
5
5
|
import vtkActor from '../../Rendering/Core/Actor.js';
|
|
6
6
|
import vtkCylinderSource from '../../Filters/Sources/CylinderSource.js';
|
|
7
7
|
import vtkMapper from '../../Rendering/Core/Mapper.js';
|
|
@@ -70,19 +70,23 @@ function vtkSplineContextRepresentation(publicAPI, model) {
|
|
|
70
70
|
|
|
71
71
|
var numVertices = inPoints.length;
|
|
72
72
|
|
|
73
|
-
if (model.close) {
|
|
73
|
+
if (!model.close) {
|
|
74
|
+
--numVertices;
|
|
75
|
+
} else {
|
|
74
76
|
inPoints.push(inPoints[0]);
|
|
75
77
|
}
|
|
76
78
|
|
|
77
79
|
var spline = vtkSpline3D.newInstance({
|
|
78
|
-
close:
|
|
80
|
+
close: widgetState.getSplineClose(),
|
|
79
81
|
kind: widgetState.getSplineKind(),
|
|
80
82
|
tension: widgetState.getSplineTension(),
|
|
81
83
|
bias: widgetState.getSplineBias(),
|
|
82
|
-
continuity: widgetState.getSplineContinuity()
|
|
84
|
+
continuity: widgetState.getSplineContinuity(),
|
|
85
|
+
boundaryCondition: widgetState.getSplineBoundaryCondition(),
|
|
86
|
+
boundaryConditionValues: widgetState.getSplineBoundaryConditionValues()
|
|
83
87
|
});
|
|
84
88
|
spline.computeCoefficients(inPoints);
|
|
85
|
-
var outPoints = new Float32Array(3 * numVertices * model.resolution);
|
|
89
|
+
var outPoints = new Float32Array(3 * ((numVertices + !model.close) * model.resolution));
|
|
86
90
|
var outCells = new Uint32Array(numVertices * model.resolution + 2);
|
|
87
91
|
outCells[0] = numVertices * model.resolution + 1;
|
|
88
92
|
outCells[numVertices * model.resolution + 1] = 0;
|
|
@@ -98,9 +102,20 @@ function vtkSplineContextRepresentation(publicAPI, model) {
|
|
|
98
102
|
}
|
|
99
103
|
}
|
|
100
104
|
|
|
105
|
+
if (model.close) {
|
|
106
|
+
outCells[numVertices * model.resolution + 1] = 0;
|
|
107
|
+
} else {
|
|
108
|
+
var lastPointIndex = numVertices * model.resolution + 1;
|
|
109
|
+
var lastPoint = spline.getPoint(numVertices, 0);
|
|
110
|
+
outPoints[3 * lastPointIndex + 0] = lastPoint[0];
|
|
111
|
+
outPoints[3 * lastPointIndex + 1] = lastPoint[1];
|
|
112
|
+
outPoints[3 * lastPointIndex + 2] = lastPoint[2];
|
|
113
|
+
outCells[numVertices * model.resolution + 1] = lastPointIndex;
|
|
114
|
+
}
|
|
115
|
+
|
|
101
116
|
polydata.getPoints().setData(outPoints);
|
|
102
117
|
|
|
103
|
-
if (model.fill) {
|
|
118
|
+
if (model.fill && model.close) {
|
|
104
119
|
polydata.getPolys().setData(outCells);
|
|
105
120
|
}
|
|
106
121
|
|
|
@@ -115,9 +130,12 @@ function vtkSplineContextRepresentation(publicAPI, model) {
|
|
|
115
130
|
return model.state;
|
|
116
131
|
};
|
|
117
132
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
133
|
+
function updateAreaVisibility() {
|
|
134
|
+
model.pipelines.area.actor.setVisibility(model.fill && model.close);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
publicAPI.setFill = macro.chain(publicAPI.setFill, updateAreaVisibility);
|
|
138
|
+
publicAPI.setClose = macro.chain(publicAPI.setClose, updateAreaVisibility);
|
|
121
139
|
publicAPI.setOutputBorder = macro.chain(publicAPI.setOutputBorder, function (v) {
|
|
122
140
|
return model.pipelines.border.actor.setVisibility(v);
|
|
123
141
|
});
|
|
@@ -130,6 +148,7 @@ var DEFAULT_VALUES = {
|
|
|
130
148
|
resolution: 16,
|
|
131
149
|
close: true,
|
|
132
150
|
fill: true,
|
|
151
|
+
// boundaryCondition : BoundaryCondition.DEFAULT
|
|
133
152
|
outputBorder: false,
|
|
134
153
|
borderColor: [0.1, 1, 0.1],
|
|
135
154
|
errorBorderColor: [1, 0, 0]
|
|
@@ -140,7 +159,7 @@ function extend(publicAPI, model) {
|
|
|
140
159
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
141
160
|
vtkContextRepresentation.extend(publicAPI, model, initialValues);
|
|
142
161
|
macro.get(publicAPI, model, ['mapper']);
|
|
143
|
-
macro.setGet(publicAPI, model, ['resolution', 'close', 'fill', 'outputBorder']);
|
|
162
|
+
macro.setGet(publicAPI, model, ['resolution', 'close', 'boundaryCondition', 'fill', 'outputBorder']);
|
|
144
163
|
macro.setGetArray(publicAPI, model, ['borderColor', 'errorBorderColor'], 3); // Object specific methods
|
|
145
164
|
|
|
146
165
|
vtkSplineContextRepresentation(publicAPI, model);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
2
2
|
import macro from '../../macros.js';
|
|
3
3
|
import vtkProp from '../../Rendering/Core/Prop.js';
|
|
4
|
-
import {
|
|
4
|
+
import { s as subtract, d as dot } from '../../Common/Core/Math/index.js';
|
|
5
5
|
import { Behavior } from './WidgetRepresentation/Constants.js';
|
|
6
6
|
import { RenderingTypes } from '../Core/WidgetManager/Constants.js';
|
|
7
7
|
import { CATEGORIES } from '../../Rendering/Core/Mapper/CoincidentTopologyHelper.js';
|
|
@@ -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 {
|
|
7
|
+
import { s as subtract, R 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';
|
|
@@ -2,7 +2,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
2
2
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
3
3
|
import Constants from './Constants.js';
|
|
4
4
|
import macro from '../../../macros.js';
|
|
5
|
-
import {
|
|
5
|
+
import { s as subtract, k as add, l as normalize } from '../../../Common/Core/Math/index.js';
|
|
6
6
|
import { getNumberOfPlacedHandles, isHandlePlaced, calculateTextPosition, updateTextPosition, getPoint } from './helpers.js';
|
|
7
7
|
|
|
8
8
|
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; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { s as subtract, x as multiplyScalar, k as add, B as areEquals } from '../../../Common/Core/Math/index.js';
|
|
2
2
|
|
|
3
3
|
function calculateTextPosition(model) {
|
|
4
4
|
var vector = [0, 0, 0];
|
|
@@ -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 { x as multiplyScalar,
|
|
6
|
+
import { x as multiplyScalar, s as subtract, l as normalize, d as dot, j as cross, m as multiplyAccumulate, S 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 {
|
|
6
|
+
import { s as subtract, l as normalize, j as cross, x as multiplyScalar, m as multiplyAccumulate, S 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
|
|
|
@@ -4,7 +4,7 @@ import vtkAbstractWidgetFactory from '../Core/AbstractWidgetFactory.js';
|
|
|
4
4
|
import vtkPlane from '../../Common/DataModel/Plane.js';
|
|
5
5
|
import vtkPlaneSource from '../../Filters/Sources/PlaneSource.js';
|
|
6
6
|
import vtkResliceCursorContextRepresentation from '../Representations/ResliceCursorContextRepresentation.js';
|
|
7
|
-
import { f as distance2BetweenPoints, m as multiplyAccumulate,
|
|
7
|
+
import { f as distance2BetweenPoints, m as multiplyAccumulate, s as subtract, l as normalize, x as multiplyScalar, k as add } from '../../Common/Core/Math/index.js';
|
|
8
8
|
import widgetBehavior from './ResliceCursorWidget/behavior.js';
|
|
9
9
|
import generateState from './ResliceCursorWidget/state.js';
|
|
10
10
|
import { updateState, transformPlane, boundPlane } from './ResliceCursorWidget/helpers.js';
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import vtkStateBuilder from '../../Core/StateBuilder.js';
|
|
2
2
|
import { splineKind } from '../../../Common/DataModel/Spline3D/Constants.js';
|
|
3
|
+
import { BoundaryCondition } from '../../../Common/DataModel/Spline1D/Constants.js';
|
|
3
4
|
|
|
4
5
|
function generateState() {
|
|
5
6
|
return vtkStateBuilder.createBuilder().addField({
|
|
6
7
|
name: 'splineKind',
|
|
7
8
|
initialValue: splineKind.KOCHANEK_SPLINE
|
|
9
|
+
}).addField({
|
|
10
|
+
name: 'splineClose',
|
|
11
|
+
initialValue: true
|
|
12
|
+
}).addField({
|
|
13
|
+
name: 'splineBoundaryCondition',
|
|
14
|
+
initialValue: BoundaryCondition.DEFAULT
|
|
15
|
+
}).addField({
|
|
16
|
+
name: 'splineBoundaryConditionValues',
|
|
17
|
+
initialValue: [0, 0, 0]
|
|
8
18
|
}).addField({
|
|
9
19
|
name: 'splineTension',
|
|
10
20
|
initialValue: 0
|
|
@@ -20,7 +20,7 @@ function vtkSplineWidget(publicAPI, model) {
|
|
|
20
20
|
var superClass = _objectSpread({}, publicAPI); // --- Widget Requirement ---------------------------------------------------
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
model.methodsToLink = ['outputBorder', 'fill', 'borderColor', 'errorBorderColor'];
|
|
23
|
+
model.methodsToLink = ['boundaryCondition', 'close', 'outputBorder', 'fill', 'borderColor', 'errorBorderColor'];
|
|
24
24
|
model.behavior = widgetBehavior;
|
|
25
25
|
model.widgetState = generateState();
|
|
26
26
|
|
package/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
/// <reference path="./Common/Core/Points.d.ts" />
|
|
14
14
|
/// <reference path="./Common/Core/PriorityQueue.d.ts" />
|
|
15
15
|
/// <reference path="./Common/Core/ProgressHandler.d.ts" />
|
|
16
|
+
/// <reference path="./Common/Core/ScalarsToColors/Constants.d.ts" />
|
|
16
17
|
/// <reference path="./Common/Core/ScalarsToColors.d.ts" />
|
|
17
18
|
/// <reference path="./Common/Core/StringArray.d.ts" />
|
|
18
19
|
/// <reference path="./Common/Core/URLExtract.d.ts" />
|
|
@@ -32,11 +33,14 @@
|
|
|
32
33
|
/// <reference path="./Common/DataModel/PiecewiseFunction.d.ts" />
|
|
33
34
|
/// <reference path="./Common/DataModel/Plane.d.ts" />
|
|
34
35
|
/// <reference path="./Common/DataModel/PointSet.d.ts" />
|
|
36
|
+
/// <reference path="./Common/DataModel/PolyData/Constants.d.ts" />
|
|
35
37
|
/// <reference path="./Common/DataModel/PolyData.d.ts" />
|
|
36
38
|
/// <reference path="./Common/DataModel/Polygon.d.ts" />
|
|
39
|
+
/// <reference path="./Common/DataModel/PolyLine.d.ts" />
|
|
37
40
|
/// <reference path="./Common/DataModel/SelectionNode.d.ts" />
|
|
38
41
|
/// <reference path="./Common/DataModel/Sphere.d.ts" />
|
|
39
42
|
/// <reference path="./Common/DataModel/Spline1D.d.ts" />
|
|
43
|
+
/// <reference path="./Common/DataModel/Spline3D/Constants.d.ts" />
|
|
40
44
|
/// <reference path="./Common/DataModel/Spline3D.d.ts" />
|
|
41
45
|
/// <reference path="./Common/DataModel/Triangle.d.ts" />
|
|
42
46
|
/// <reference path="./Common/Transform/LandmarkTransform.d.ts" />
|
|
@@ -62,6 +66,7 @@
|
|
|
62
66
|
/// <reference path="./Filters/Sources/SphereSource.d.ts" />
|
|
63
67
|
/// <reference path="./Filters/Texture/TextureMapToPlane.d.ts" />
|
|
64
68
|
/// <reference path="./Filters/Texture/TextureMapToSphere.d.ts" />
|
|
69
|
+
/// <reference path="./Interaction/Widgets/OrientationMarkerWidget/Constants.d.ts" />
|
|
65
70
|
/// <reference path="./Interaction/Widgets/OrientationMarkerWidget.d.ts" />
|
|
66
71
|
/// <reference path="./IO/Core/DataAccessHelper/HtmlDataAccessHelper.d.ts" />
|
|
67
72
|
/// <reference path="./IO/Core/DataAccessHelper/HttpDataAccessHelper.d.ts" />
|
|
@@ -107,6 +112,7 @@
|
|
|
107
112
|
/// <reference path="./Rendering/Core/ImageProperty.d.ts" />
|
|
108
113
|
/// <reference path="./Rendering/Core/ImageSlice.d.ts" />
|
|
109
114
|
/// <reference path="./Rendering/Core/Light.d.ts" />
|
|
115
|
+
/// <reference path="./Rendering/Core/Mapper/Constants.d.ts" />
|
|
110
116
|
/// <reference path="./Rendering/Core/Mapper.d.ts" />
|
|
111
117
|
/// <reference path="./Rendering/Core/Mapper2D.d.ts" />
|
|
112
118
|
/// <reference path="./Rendering/Core/Picker.d.ts" />
|
|
@@ -114,10 +120,12 @@
|
|
|
114
120
|
/// <reference path="./Rendering/Core/PointPicker.d.ts" />
|
|
115
121
|
/// <reference path="./Rendering/Core/Prop.d.ts" />
|
|
116
122
|
/// <reference path="./Rendering/Core/Prop3D.d.ts" />
|
|
123
|
+
/// <reference path="./Rendering/Core/Property/Constants.d.ts" />
|
|
117
124
|
/// <reference path="./Rendering/Core/Property.d.ts" />
|
|
118
125
|
/// <reference path="./Rendering/Core/Property2D.d.ts" />
|
|
119
126
|
/// <reference path="./Rendering/Core/Renderer.d.ts" />
|
|
120
127
|
/// <reference path="./Rendering/Core/RenderWindow.d.ts" />
|
|
128
|
+
/// <reference path="./Rendering/Core/RenderWindowInteractor/Constants.d.ts" />
|
|
121
129
|
/// <reference path="./Rendering/Core/RenderWindowInteractor.d.ts" />
|
|
122
130
|
/// <reference path="./Rendering/Core/ScalarBarActor.d.ts" />
|
|
123
131
|
/// <reference path="./Rendering/Core/Skybox.d.ts" />
|
|
@@ -126,6 +134,7 @@
|
|
|
126
134
|
/// <reference path="./Rendering/Core/Texture.d.ts" />
|
|
127
135
|
/// <reference path="./Rendering/Core/Viewport.d.ts" />
|
|
128
136
|
/// <reference path="./Rendering/Core/Volume.d.ts" />
|
|
137
|
+
/// <reference path="./Rendering/Core/VolumeMapper/Constants.d.ts" />
|
|
129
138
|
/// <reference path="./Rendering/Core/VolumeMapper.d.ts" />
|
|
130
139
|
/// <reference path="./Rendering/Core/VolumeProperty.d.ts" />
|
|
131
140
|
/// <reference path="./Rendering/Misc/CanvasView.d.ts" />
|