@kitware/vtk.js 23.4.2 → 23.4.4
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/Constants.js +12 -0
- 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/DataModel/AbstractPointLocator.d.ts +54 -0
- package/Common/DataModel/AbstractPointLocator.js +40 -0
- package/Common/DataModel/BoundingBox.d.ts +659 -0
- package/Common/DataModel/Collection.d.ts +118 -0
- package/Common/DataModel/Collection.js +113 -0
- package/Common/DataModel/DataSet/Constants.d.ts +27 -0
- package/Common/DataModel/EdgeLocator.d.ts +79 -0
- package/Common/DataModel/EdgeLocator.js +85 -0
- package/Common/DataModel/ITKHelper.d.ts +54 -0
- package/Common/DataModel/IncrementalOctreeNode.d.ts +297 -0
- package/Common/DataModel/IncrementalOctreeNode.js +640 -0
- package/Common/DataModel/IncrementalOctreePointLocator.d.ts +61 -0
- package/Common/DataModel/IncrementalOctreePointLocator.js +398 -0
- package/Common/DataModel/Locator.d.ts +43 -0
- package/Common/DataModel/Locator.js +37 -0
- 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 +77 -0
- package/Common/DataModel/Polygon/Constants.js +12 -0
- package/Common/DataModel/Polygon.js +1 -1
- package/Common/DataModel/Quad/Constants.js +9 -0
- package/Common/DataModel/Quad.d.ts +91 -0
- package/Common/DataModel/Quad.js +235 -0
- package/Common/DataModel/SelectionNode/Constants.d.ts +27 -0
- package/Common/DataModel/Spline1D/Constants.js +17 -0
- package/Common/DataModel/Spline3D/Constants.d.ts +9 -0
- package/Common/Transform/Transform.js +51 -0
- package/Filters/Core/PolyDataNormals.js +124 -0
- package/Filters/General/ClipClosedSurface/Constants.js +10 -0
- package/Filters/General/ClipClosedSurface.d.ts +95 -0
- package/Filters/General/ClipClosedSurface.js +972 -0
- package/Filters/General/ContourTriangulator/Constants.js +6 -0
- package/Filters/General/ContourTriangulator/helper.js +1951 -0
- package/Filters/General/ContourTriangulator.d.ts +136 -0
- package/Filters/General/ContourTriangulator.js +202 -0
- package/Filters/General/ImageMarchingCubes.js +1 -1
- package/Filters/General/MoleculeToRepresentation.js +1 -1
- package/Filters/General/OBBTree/OBBNode.js +82 -0
- package/Filters/General/OBBTree/helper.js +92 -0
- package/Filters/General/OBBTree.js +1243 -0
- package/Filters/General/TubeFilter.js +1 -1
- package/Filters/Sources/LineSource.js +1 -1
- package/Filters/Sources/PlaneSource.js +1 -1
- package/Filters/Texture/TextureMapToPlane.js +1 -1
- package/Interaction/Manipulators/CompositeCameraManipulator.d.ts +68 -0
- package/Interaction/Manipulators/CompositeGestureManipulator.d.ts +168 -0
- package/Interaction/Manipulators/CompositeKeyboardManipulator.d.ts +48 -0
- package/Interaction/Manipulators/CompositeMouseManipulator.d.ts +149 -0
- package/Interaction/Manipulators/CompositeVRManipulator.d.ts +44 -0
- package/Interaction/Manipulators/GestureCameraManipulator.d.ts +34 -0
- package/Interaction/Manipulators/KeyboardCameraManipulator.js +1 -1
- package/Interaction/Manipulators/MouseBoxSelectorManipulator.d.ts +88 -0
- package/Interaction/Manipulators/MouseCameraAxisRotateManipulator.js +1 -1
- package/Interaction/Manipulators/MouseCameraTrackballMultiRotateManipulator.d.ts +32 -0
- package/Interaction/Manipulators/MouseCameraTrackballPanManipulator.d.ts +33 -0
- package/Interaction/Manipulators/MouseCameraTrackballPanManipulator.js +1 -1
- package/Interaction/Manipulators/MouseCameraTrackballRollManipulator.d.ts +33 -0
- package/Interaction/Manipulators/MouseCameraTrackballRotateManipulator.d.ts +67 -0
- package/Interaction/Manipulators/MouseCameraTrackballRotateManipulator.js +1 -1
- package/Interaction/Manipulators/MouseCameraTrackballZoomManipulator.d.ts +45 -0
- package/Interaction/Manipulators/MouseCameraTrackballZoomToMouseManipulator.d.ts +26 -0
- package/Interaction/Manipulators/MouseCameraUnicamManipulator.js +1 -1
- package/Interaction/Manipulators/MouseCameraUnicamRotateManipulator.js +1 -1
- package/Interaction/Manipulators/MouseRangeManipulator.d.ts +53 -0
- package/Interaction/Style/InteractorStyleImage.d.ts +107 -0
- package/Interaction/Style/InteractorStyleMPRSlice.js +1 -1
- package/Interaction/Style/InteractorStyleManipulator.d.ts +348 -0
- package/Interaction/Style/InteractorStyleTrackballCamera.d.ts +170 -0
- package/Interaction/Widgets/ImageCroppingRegionsWidget.js +1 -1
- package/Interaction/Widgets/LabelRepresentation.js +1 -1
- package/Interaction/Widgets/OrientationMarkerWidget/Constants.d.ts +11 -0
- package/Interaction/Widgets/ResliceCursor/ResliceCursor.js +1 -1
- package/Interaction/Widgets/ResliceCursor/ResliceCursorLineRepresentation.js +1 -1
- package/Interaction/Widgets/ResliceCursor/ResliceCursorRepresentation.js +1 -1
- package/Proxy/Core/AbstractRepresentationProxy.d.ts +24 -0
- package/Proxy/Core/LookupTableProxy.d.ts +45 -0
- package/Proxy/Core/PiecewiseFunctionProxy.d.ts +62 -0
- package/Proxy/Core/ProxyManager.d.ts +115 -0
- package/Proxy/Core/SourceProxy.d.ts +22 -0
- package/Proxy/Core/View2DProxy.d.ts +7 -0
- package/Proxy/Core/View2DProxy.js +1 -1
- package/Proxy/Core/ViewProxy.d.ts +86 -0
- package/Proxy/Representations/SliceRepresentationProxy.d.ts +27 -0
- package/Proxy/Representations/VolumeRepresentationProxy.d.ts +44 -0
- package/README.md +2 -2
- package/Rendering/Core/AbstractImageMapper/helper.js +127 -0
- package/Rendering/Core/AbstractImageMapper.d.ts +82 -0
- package/Rendering/Core/AbstractImageMapper.js +44 -0
- package/Rendering/Core/Camera.js +1 -1
- package/Rendering/Core/CellPicker.js +1 -1
- package/Rendering/Core/ColorTransferFunction/ColorMaps.d.ts +24 -0
- package/Rendering/Core/ColorTransferFunction/Constants.d.ts +17 -0
- package/Rendering/Core/ColorTransferFunction.js +1 -1
- package/Rendering/Core/Coordinate/Constants.d.ts +14 -0
- package/Rendering/Core/Coordinate.js +1 -1
- package/Rendering/Core/Glyph3DMapper/Constants.d.ts +17 -0
- package/Rendering/Core/Glyph3DMapper.js +1 -1
- package/Rendering/Core/HardwareSelector.d.ts +84 -0
- package/Rendering/Core/ImageArrayMapper.d.ts +253 -0
- package/Rendering/Core/ImageArrayMapper.js +242 -0
- package/Rendering/Core/ImageMapper/Constants.d.ts +14 -0
- package/Rendering/Core/ImageMapper.js +1 -1
- package/Rendering/Core/ImageProperty/Constants.d.ts +9 -0
- package/Rendering/Core/ImageResliceMapper/Constants.d.ts +11 -0
- package/Rendering/Core/ImageResliceMapper/Constants.js +11 -0
- package/Rendering/Core/ImageResliceMapper.d.ts +245 -0
- package/Rendering/Core/ImageResliceMapper.js +70 -0
- package/Rendering/Core/InteractorObserver.d.ts +132 -0
- package/Rendering/Core/InteractorStyle/Constants.d.ts +16 -0
- package/Rendering/Core/InteractorStyle.d.ts +229 -0
- package/Rendering/Core/Light.js +1 -1
- package/Rendering/Core/Mapper/Constants.d.ts +26 -0
- package/Rendering/Core/Mapper.js +1 -1
- package/Rendering/Core/Picker.js +1 -1
- package/Rendering/Core/Prop/Constants.d.ts +9 -0
- package/Rendering/Core/Prop/Constants.js +9 -0
- package/Rendering/Core/Property/Constants.d.ts +24 -0
- package/Rendering/Core/Property2D/Constants.d.ts +9 -0
- package/Rendering/Core/RenderWindow.js +1 -1
- package/Rendering/Core/RenderWindowInteractor/Constants.d.ts +31 -0
- package/Rendering/Core/Renderer.js +1 -1
- package/Rendering/Core/VolumeMapper/Constants.d.ts +20 -0
- package/Rendering/Core/VolumeMapper.js +1 -1
- package/Rendering/Core/VolumeProperty/Constants.d.ts +16 -0
- package/Rendering/Misc/SynchronizableRenderWindow/BehaviorManager/CameraSynchronizer.js +129 -0
- package/Rendering/Misc/SynchronizableRenderWindow/BehaviorManager.js +131 -0
- package/Rendering/Misc/SynchronizableRenderWindow/ObjectManager.d.ts +80 -0
- package/Rendering/Misc/SynchronizableRenderWindow/ObjectManager.js +763 -0
- package/Rendering/OpenGL/HardwareSelector/Constants.d.ts +8 -0
- package/Rendering/OpenGL/HardwareSelector.d.ts +339 -0
- package/Rendering/OpenGL/ImageResliceMapper.js +996 -0
- package/Rendering/OpenGL/PolyDataMapper.js +1 -1
- package/Rendering/OpenGL/PolyDataMapper2D.js +1 -1
- package/Rendering/OpenGL/RenderWindow/Constants.d.ts +10 -0
- package/Rendering/OpenGL/RenderWindow/Constants.js +13 -0
- package/Rendering/OpenGL/RenderWindow/ContextProxy.js +70 -0
- package/Rendering/OpenGL/RenderWindow.d.ts +9 -2
- package/Rendering/OpenGL/RenderWindow.js +2 -1
- package/Rendering/OpenGL/glsl/vtkImageResliceMapperFS.glsl.js +3 -0
- package/Rendering/OpenGL/glsl/vtkImageResliceMapperVS.glsl.js +3 -0
- package/Rendering/WebGPU/Actor2D.js +151 -0
- package/Rendering/WebGPU/BufferManager.js +1 -1
- package/Rendering/WebGPU/CellArrayMapper.js +853 -0
- package/Rendering/WebGPU/IndexBuffer.js +397 -0
- package/Rendering/WebGPU/PolyDataMapper2D.js +99 -0
- package/Rendering/WebGPU/RenderWindow.js +3 -1
- package/Rendering/WebGPU/SimpleMapper.js +290 -0
- package/Widgets/Core/AbstractWidget.d.ts +187 -0
- package/Widgets/Core/AbstractWidgetFactory.d.ts +131 -0
- package/Widgets/Core/StateBuilder/color3Mixin.js +24 -0
- package/Widgets/Core/StateBuilder/orientationMixin.js +1 -1
- package/Widgets/Core/StateBuilder.d.ts +29 -0
- package/Widgets/Core/WidgetManager/Constants.d.ts +27 -0
- package/Widgets/Core/WidgetManager.d.ts +231 -0
- package/Widgets/Core/WidgetState.d.ts +81 -0
- package/Widgets/Manipulators/AbstractManipulator.d.ts +221 -0
- package/Widgets/Manipulators/AbstractManipulator.js +57 -0
- package/Widgets/Manipulators/LineManipulator.js +1 -1
- package/Widgets/Manipulators/TrackballManipulator.js +1 -1
- package/Widgets/Representations/GlyphRepresentation.js +325 -0
- package/Widgets/Representations/LineHandleRepresentation.js +116 -0
- package/Widgets/Representations/ResliceCursorContextRepresentation.js +1 -1
- package/Widgets/Representations/WidgetRepresentation.js +1 -1
- package/Widgets/Widgets3D/AngleWidget.js +1 -1
- package/Widgets/Widgets3D/InteractiveOrientationWidget.d.ts +40 -0
- package/Widgets/Widgets3D/LabelWidget/behavior.js +157 -0
- package/Widgets/Widgets3D/LabelWidget/state.js +22 -0
- package/Widgets/Widgets3D/LabelWidget.js +78 -0
- 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/index.d.ts +133 -74
- package/package.json +1 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import vtkCompositeCameraManipulator, {
|
|
2
|
+
ICompositeCameraManipulatorInitialValues,
|
|
3
|
+
} from './CompositeCameraManipulator';
|
|
4
|
+
import vtkCompositeMouseManipulator, {
|
|
5
|
+
ICompositeMouseManipulatorInitialValues,
|
|
6
|
+
} from './CompositeMouseManipulator';
|
|
7
|
+
import { vtkObject } from './../../interfaces';
|
|
8
|
+
|
|
9
|
+
export interface vtkMouseCameraTrackballPanManipulator
|
|
10
|
+
extends vtkObject,
|
|
11
|
+
vtkCompositeCameraManipulator,
|
|
12
|
+
vtkCompositeMouseManipulator {}
|
|
13
|
+
|
|
14
|
+
export interface IMouseCameraTrackballPanManipulatorInitialValues
|
|
15
|
+
extends ICompositeCameraManipulatorInitialValues,
|
|
16
|
+
ICompositeMouseManipulatorInitialValues {}
|
|
17
|
+
|
|
18
|
+
export function newInstance(
|
|
19
|
+
initialValues?: IMouseCameraTrackballPanManipulatorInitialValues
|
|
20
|
+
): vtkMouseCameraTrackballPanManipulator;
|
|
21
|
+
|
|
22
|
+
export function extend(
|
|
23
|
+
publicAPI: object,
|
|
24
|
+
model: object,
|
|
25
|
+
initialValues?: IMouseCameraTrackballPanManipulatorInitialValues
|
|
26
|
+
): void;
|
|
27
|
+
|
|
28
|
+
export const vtkMouseCameraTrackballPanManipulator: {
|
|
29
|
+
newInstance: typeof newInstance;
|
|
30
|
+
extend: typeof extend;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export default vtkMouseCameraTrackballPanManipulator;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import macro from '../../macros.js';
|
|
2
2
|
import vtkCompositeCameraManipulator from './CompositeCameraManipulator.js';
|
|
3
3
|
import vtkCompositeMouseManipulator from './CompositeMouseManipulator.js';
|
|
4
|
-
import {
|
|
4
|
+
import { k as cross } from '../../Common/Core/Math/index.js';
|
|
5
5
|
|
|
6
6
|
// vtkMouseCameraTrackballPanManipulator methods
|
|
7
7
|
// ----------------------------------------------------------------------------
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import vtkCompositeCameraManipulator, {
|
|
2
|
+
ICompositeCameraManipulatorInitialValues,
|
|
3
|
+
} from './CompositeCameraManipulator';
|
|
4
|
+
import vtkCompositeMouseManipulator, {
|
|
5
|
+
ICompositeMouseManipulatorInitialValues,
|
|
6
|
+
} from './CompositeMouseManipulator';
|
|
7
|
+
import { vtkObject } from './../../interfaces';
|
|
8
|
+
|
|
9
|
+
export interface vtkMouseCameraTrackballRollManipulator
|
|
10
|
+
extends vtkObject,
|
|
11
|
+
vtkCompositeCameraManipulator,
|
|
12
|
+
vtkCompositeMouseManipulator {}
|
|
13
|
+
|
|
14
|
+
export interface IMouseCameraTrackballRollManipulatorInitialValues
|
|
15
|
+
extends ICompositeCameraManipulatorInitialValues,
|
|
16
|
+
ICompositeMouseManipulatorInitialValues {}
|
|
17
|
+
|
|
18
|
+
export function newInstance(
|
|
19
|
+
initialValues?: IMouseCameraTrackballRollManipulatorInitialValues
|
|
20
|
+
): vtkMouseCameraTrackballRollManipulator;
|
|
21
|
+
|
|
22
|
+
export function extend(
|
|
23
|
+
publicAPI: object,
|
|
24
|
+
model: object,
|
|
25
|
+
initialValues?: IMouseCameraTrackballRollManipulatorInitialValues
|
|
26
|
+
): void;
|
|
27
|
+
|
|
28
|
+
export const vtkMouseCameraTrackballRollManipulator: {
|
|
29
|
+
newInstance: typeof newInstance;
|
|
30
|
+
extend: typeof extend;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export default vtkMouseCameraTrackballRollManipulator;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import vtkCompositeCameraManipulator, {
|
|
2
|
+
ICompositeCameraManipulatorInitialValues,
|
|
3
|
+
} from './CompositeCameraManipulator';
|
|
4
|
+
import vtkCompositeMouseManipulator, {
|
|
5
|
+
ICompositeMouseManipulatorInitialValues,
|
|
6
|
+
} from './CompositeMouseManipulator';
|
|
7
|
+
import { vtkObject } from './../../interfaces';
|
|
8
|
+
import { Vector3 } from './../../types';
|
|
9
|
+
|
|
10
|
+
export interface vtkMouseCameraTrackballRotateManipulator
|
|
11
|
+
extends vtkObject,
|
|
12
|
+
vtkCompositeCameraManipulator,
|
|
13
|
+
vtkCompositeMouseManipulator {
|
|
14
|
+
/**
|
|
15
|
+
* Sets whether to use a given world-up vector.
|
|
16
|
+
* @param use boolean
|
|
17
|
+
*/
|
|
18
|
+
setUseWorldUpVec(use: boolean): boolean;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Sets the world-up vector.
|
|
22
|
+
* @param vec the world-up vector
|
|
23
|
+
*/
|
|
24
|
+
setWorldUpVec(vec: Vector3): boolean;
|
|
25
|
+
setWorldUpVec(x: number, y: number, z: number): boolean;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Gets the world-up vector.
|
|
29
|
+
*/
|
|
30
|
+
getWorldUpVec(): Vector3;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Gets whether to use the focal point as the center of rotation.
|
|
34
|
+
*/
|
|
35
|
+
getUseFocalPointAsCenterOfRotation(): boolean;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Sets using the focal point as the center of rotation.
|
|
39
|
+
* @param useFocalPoint
|
|
40
|
+
*/
|
|
41
|
+
setUseFocalPointAsCenterOfRotation(useFocalPoint: boolean): boolean;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface IMouseCameraTrackballRotateManipulatorInitialValues
|
|
45
|
+
extends ICompositeCameraManipulatorInitialValues,
|
|
46
|
+
ICompositeMouseManipulatorInitialValues {
|
|
47
|
+
useWorldUpVec?: boolean;
|
|
48
|
+
worldUpVec?: Vector3;
|
|
49
|
+
useFocalPointAsCenterOfRotation?: boolean;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function newInstance(
|
|
53
|
+
initialValues?: IMouseCameraTrackballRotateManipulatorInitialValues
|
|
54
|
+
): vtkMouseCameraTrackballRotateManipulator;
|
|
55
|
+
|
|
56
|
+
export function extend(
|
|
57
|
+
publicAPI: object,
|
|
58
|
+
model: object,
|
|
59
|
+
initialValues?: IMouseCameraTrackballRotateManipulatorInitialValues
|
|
60
|
+
): void;
|
|
61
|
+
|
|
62
|
+
export const vtkMouseCameraTrackballRotateManipulator: {
|
|
63
|
+
newInstance: typeof newInstance;
|
|
64
|
+
extend: typeof extend;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export default vtkMouseCameraTrackballRotateManipulator;
|
|
@@ -2,7 +2,7 @@ import { mat4, vec3 } from 'gl-matrix';
|
|
|
2
2
|
import macro from '../../macros.js';
|
|
3
3
|
import vtkCompositeCameraManipulator from './CompositeCameraManipulator.js';
|
|
4
4
|
import vtkCompositeMouseManipulator from './CompositeMouseManipulator.js';
|
|
5
|
-
import { t as multiplyScalar, d as dot,
|
|
5
|
+
import { t as multiplyScalar, d as dot, l as add, r as radiansFromDegrees, k as cross } from '../../Common/Core/Math/index.js';
|
|
6
6
|
|
|
7
7
|
// vtkMouseCameraTrackballRotateManipulator methods
|
|
8
8
|
// ----------------------------------------------------------------------------
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import vtkCompositeCameraManipulator, {
|
|
2
|
+
ICompositeCameraManipulatorInitialValues,
|
|
3
|
+
} from './CompositeCameraManipulator';
|
|
4
|
+
import vtkCompositeMouseManipulator, {
|
|
5
|
+
ICompositeMouseManipulatorInitialValues,
|
|
6
|
+
} from './CompositeMouseManipulator';
|
|
7
|
+
import { vtkObject } from './../../interfaces';
|
|
8
|
+
export interface vtkMouseCameraTrackballZoomManipulator
|
|
9
|
+
extends vtkObject,
|
|
10
|
+
vtkCompositeCameraManipulator,
|
|
11
|
+
vtkCompositeMouseManipulator {
|
|
12
|
+
/**
|
|
13
|
+
* Sets whether to flip the zoom direction.
|
|
14
|
+
* @param flip
|
|
15
|
+
*/
|
|
16
|
+
setFlipDirection(flip: boolean): boolean;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Gets the flip direction.
|
|
20
|
+
*/
|
|
21
|
+
getFlipDirection(): boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface IMouseCameraTrackballZoomManipulatorInitialValues
|
|
25
|
+
extends ICompositeCameraManipulatorInitialValues,
|
|
26
|
+
ICompositeMouseManipulatorInitialValues {
|
|
27
|
+
flipDirection?: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function newInstance(
|
|
31
|
+
initialValues?: IMouseCameraTrackballZoomManipulatorInitialValues
|
|
32
|
+
): vtkMouseCameraTrackballZoomManipulator;
|
|
33
|
+
|
|
34
|
+
export function extend(
|
|
35
|
+
publicAPI: object,
|
|
36
|
+
model: object,
|
|
37
|
+
initialValues?: IMouseCameraTrackballZoomManipulatorInitialValues
|
|
38
|
+
): void;
|
|
39
|
+
|
|
40
|
+
export const vtkMouseCameraTrackballZoomManipulator: {
|
|
41
|
+
newInstance: typeof newInstance;
|
|
42
|
+
extend: typeof extend;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export default vtkMouseCameraTrackballZoomManipulator;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import vtkMouseCameraTrackballZoomManipulator, {
|
|
2
|
+
IMouseCameraTrackballZoomManipulatorInitialValues,
|
|
3
|
+
} from './MouseCameraTrackballZoomManipulator';
|
|
4
|
+
|
|
5
|
+
export type vtkMouseCameraTrackballZoomToMouseManipulator =
|
|
6
|
+
vtkMouseCameraTrackballZoomManipulator;
|
|
7
|
+
|
|
8
|
+
export type IMouseCameraTrackballZoomToMouseManipulatorInitialValues =
|
|
9
|
+
IMouseCameraTrackballZoomManipulatorInitialValues;
|
|
10
|
+
|
|
11
|
+
export function newInstance(
|
|
12
|
+
initialValues?: IMouseCameraTrackballZoomToMouseManipulatorInitialValues
|
|
13
|
+
): vtkMouseCameraTrackballZoomToMouseManipulator;
|
|
14
|
+
|
|
15
|
+
export function extend(
|
|
16
|
+
publicAPI: object,
|
|
17
|
+
model: object,
|
|
18
|
+
initialValues?: IMouseCameraTrackballZoomToMouseManipulatorInitialValues
|
|
19
|
+
): void;
|
|
20
|
+
|
|
21
|
+
export const vtkMouseCameraTrackballZoomToMouseManipulator: {
|
|
22
|
+
newInstance: typeof newInstance;
|
|
23
|
+
extend: typeof extend;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default vtkMouseCameraTrackballZoomToMouseManipulator;
|
|
@@ -5,7 +5,7 @@ import vtkCompositeMouseManipulator from './CompositeMouseManipulator.js';
|
|
|
5
5
|
import vtkInteractorStyleConstants from '../../Rendering/Core/InteractorStyle/Constants.js';
|
|
6
6
|
import vtkMouseCameraUnicamRotateManipulator from './MouseCameraUnicamRotateManipulator.js';
|
|
7
7
|
import macro from '../../macros.js';
|
|
8
|
-
import {
|
|
8
|
+
import { j as subtract, t as multiplyScalar, g as normalize, d as dot, r as radiansFromDegrees, k as cross } from '../../Common/Core/Math/index.js';
|
|
9
9
|
|
|
10
10
|
var States = vtkInteractorStyleConstants.States; // ----------------------------------------------------------------------------
|
|
11
11
|
// vtkMouseCameraUnicamManipulator methods
|
|
@@ -10,7 +10,7 @@ import vtkSphereSource from '../../Filters/Sources/SphereSource.js';
|
|
|
10
10
|
import { FieldAssociations } from '../../Common/DataModel/DataSet/Constants.js';
|
|
11
11
|
import { mat4, vec3 } from 'gl-matrix';
|
|
12
12
|
import macro from '../../macros.js';
|
|
13
|
-
import { z as areEquals,
|
|
13
|
+
import { z as areEquals, g as normalize, d as dot, A as clampValue, j as subtract, k as cross, t as multiplyScalar, f as distance2BetweenPoints } from '../../Common/Core/Math/index.js';
|
|
14
14
|
|
|
15
15
|
var States = vtkInteractorStyleConstants.States; // ----------------------------------------------------------------------------
|
|
16
16
|
// vtkMouseCameraUnicamRotateManipulator methods
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import vtkCompositeMouseManipulator, {
|
|
2
|
+
ICompositeMouseManipulatorInitialValues,
|
|
3
|
+
} from './CompositeMouseManipulator';
|
|
4
|
+
|
|
5
|
+
export interface IMouseRangeManipulatorInitialValues
|
|
6
|
+
extends ICompositeMouseManipulatorInitialValues {}
|
|
7
|
+
|
|
8
|
+
export interface vtkMouseRangeManipulator extends vtkCompositeMouseManipulator {
|
|
9
|
+
setHorizontalListener(
|
|
10
|
+
min: number,
|
|
11
|
+
max: number,
|
|
12
|
+
step: number,
|
|
13
|
+
getValue: () => number,
|
|
14
|
+
setValue: (v: number) => void,
|
|
15
|
+
scale?: number
|
|
16
|
+
);
|
|
17
|
+
setVerticalListener(
|
|
18
|
+
min: number,
|
|
19
|
+
max: number,
|
|
20
|
+
step: number,
|
|
21
|
+
getValue: () => number,
|
|
22
|
+
setValue: (v: number) => void,
|
|
23
|
+
scale?: number
|
|
24
|
+
);
|
|
25
|
+
setScrollListener(
|
|
26
|
+
min: number,
|
|
27
|
+
max: number,
|
|
28
|
+
step: number,
|
|
29
|
+
getValue: () => number,
|
|
30
|
+
setValue: (v: number) => void,
|
|
31
|
+
scale?: number
|
|
32
|
+
);
|
|
33
|
+
removeHorizontalListener();
|
|
34
|
+
removeVerticalListener();
|
|
35
|
+
removeScrollListener();
|
|
36
|
+
removeAllListeners();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function extend(
|
|
40
|
+
publicAPI: object,
|
|
41
|
+
model: object,
|
|
42
|
+
initialValues?: IMouseRangeManipulatorInitialValues
|
|
43
|
+
): void;
|
|
44
|
+
export function newInstance(
|
|
45
|
+
initialValues?: IMouseRangeManipulatorInitialValues
|
|
46
|
+
): vtkMouseRangeManipulator;
|
|
47
|
+
|
|
48
|
+
export declare const vtkMouseRangeManipulator: {
|
|
49
|
+
newInstance: typeof newInstance;
|
|
50
|
+
extend: typeof extend;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export default vtkMouseRangeManipulator;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { Vector2, Vector3 } from './../../types';
|
|
2
|
+
import vtkRenderer from './../../Rendering/Core/Renderer';
|
|
3
|
+
import vtkImageProperty from './../../Rendering/Core/ImageProperty';
|
|
4
|
+
import vtkInteractorStyleTrackballCamera from './InteractorStyleTrackballCamera';
|
|
5
|
+
|
|
6
|
+
export interface vtkInteractorStyleImage extends vtkInteractorStyleTrackballCamera {
|
|
7
|
+
/**
|
|
8
|
+
* Handles a mouse move.
|
|
9
|
+
* @param callData event data
|
|
10
|
+
*/
|
|
11
|
+
handleMouseMove(callData: unknown): void;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Handles a left button press event.
|
|
15
|
+
* @param callData event data
|
|
16
|
+
*/
|
|
17
|
+
handleLeftButtonPress(callData: unknown): void;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Handles a left button release event.
|
|
21
|
+
* @param callData event data
|
|
22
|
+
*/
|
|
23
|
+
handleLeftButtonRelease(callData: unknown): void;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Handles the start of a wheel event.
|
|
27
|
+
* @param callData event data
|
|
28
|
+
*/
|
|
29
|
+
handleStartMouseWheel(callData: unknown): void;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Handles the end of a wheel event.
|
|
33
|
+
* @param callData event data
|
|
34
|
+
*/
|
|
35
|
+
handleEndMouseWheel(callData: unknown): void;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Handles a wheel event.
|
|
39
|
+
* @param callData event data
|
|
40
|
+
*/
|
|
41
|
+
handleMouseWheel(callData: unknown): void;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Set window level from position.
|
|
45
|
+
* @param renderer the renderer
|
|
46
|
+
* @param position the display position
|
|
47
|
+
*/
|
|
48
|
+
windowLevel(renderer: vtkRenderer, position: { x: number, y: number }): void;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Set slice from position.
|
|
52
|
+
* @param renderer the renderer
|
|
53
|
+
* @param position the display position
|
|
54
|
+
*/
|
|
55
|
+
slice(renderer: vtkRenderer, position: { x: number, y: number }): void;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Sets the current image property.
|
|
59
|
+
*
|
|
60
|
+
* This is a way of dealing with images as if they were layers.
|
|
61
|
+
* It looks through the renderer's list of props and sets the
|
|
62
|
+
* interactor ivars from the Nth image that it finds. You can
|
|
63
|
+
* also use negative numbers, i.e. -1 will return the last image,
|
|
64
|
+
* -2 will return the second-to-last image, etc.
|
|
65
|
+
* @param i image number
|
|
66
|
+
*/
|
|
67
|
+
setCurrentImageNumber(i: number): boolean;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Sets the current image property.
|
|
71
|
+
* @param imageProperty image property
|
|
72
|
+
*/
|
|
73
|
+
setCurrentImageProperty(imageProperty: vtkImageProperty): boolean;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface IInteractorStyleImageInitialValues {
|
|
77
|
+
windowLevelStartPosition: Vector2;
|
|
78
|
+
windowLevelCurrentPosition: Vector2;
|
|
79
|
+
lastSlicePosition: number;
|
|
80
|
+
windowLevelInitial: Vector2;
|
|
81
|
+
// currentImageProperty: null;
|
|
82
|
+
currentImageNumber: number;
|
|
83
|
+
interactionMode: 'IMAGE2D' | 'IMAGE3D' | 'IMAGE_SLICING';
|
|
84
|
+
xViewRightVector: Vector3;
|
|
85
|
+
xViewUpVector: Vector3;
|
|
86
|
+
yViewRightVector: Vector3;
|
|
87
|
+
yViewUpVector: Vector3;
|
|
88
|
+
zViewRightVector: Vector3;
|
|
89
|
+
zViewUpVector: Vector3;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function newInstance(
|
|
93
|
+
initialValues?: IInteractorStyleImageInitialValues
|
|
94
|
+
): vtkInteractorStyleImage;
|
|
95
|
+
|
|
96
|
+
export function extend(
|
|
97
|
+
publicAPI: object,
|
|
98
|
+
model: object,
|
|
99
|
+
initialValues?: IInteractorStyleImageInitialValues
|
|
100
|
+
): void;
|
|
101
|
+
|
|
102
|
+
export const vtkInteractorStyleImage: {
|
|
103
|
+
newInstance: typeof newInstance;
|
|
104
|
+
extend: typeof extend;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export default vtkInteractorStyleImage;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
2
2
|
import macro from '../../macros.js';
|
|
3
|
-
import {
|
|
3
|
+
import { g as normalize, f as distance2BetweenPoints } from '../../Common/Core/Math/index.js';
|
|
4
4
|
import vtkMatrixBuilder from '../../Common/Core/MatrixBuilder.js';
|
|
5
5
|
import vtkInteractorStyleManipulator from './InteractorStyleManipulator.js';
|
|
6
6
|
import vtkMouseCameraTrackballRotateManipulator from '../Manipulators/MouseCameraTrackballRotateManipulator.js';
|