volview 4.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/.browserslistrc +4 -0
- package/.editorconfig +6 -0
- package/.env +6 -0
- package/.eslintrc.js +109 -0
- package/.gitattributes +1 -0
- package/.github/workflows/checks.yml +16 -0
- package/.github/workflows/publish.yml +52 -0
- package/.prettierignore +5 -0
- package/CONTRIBUTING.md +29 -0
- package/LICENSE +202 -0
- package/README.md +44 -0
- package/babel.config.js +3 -0
- package/documentation/config.js +15 -0
- package/documentation/content/KWVolViewLogo.png +0 -0
- package/documentation/content/KWVolViewLogo.svg +35 -0
- package/documentation/content/VolViewLogo.png +0 -0
- package/documentation/content/VolViewLogo.svg +22 -0
- package/documentation/content/doc/index.md +64 -0
- package/documentation/content/doc/loading_data.md +30 -0
- package/documentation/content/doc/mouse_controls.md +34 -0
- package/documentation/content/doc/quick_start_guide.md +75 -0
- package/documentation/content/doc/rendering.md +27 -0
- package/documentation/content/doc/state_files.md +18 -0
- package/documentation/content/doc/toolbar.md +20 -0
- package/documentation/content/doc/welcome_screen.md +23 -0
- package/documentation/content/gallery/01-volview-welcome-notes.jpg +0 -0
- package/documentation/content/gallery/01-volview-welcome.jpg +0 -0
- package/documentation/content/gallery/02-volview-about.jpg +0 -0
- package/documentation/content/gallery/02-volview-notifications.jpg +0 -0
- package/documentation/content/gallery/02-volview-settings.jpg +0 -0
- package/documentation/content/gallery/03-volview-sample-datasets.jpg +0 -0
- package/documentation/content/gallery/04-volview-active-data.jpg +0 -0
- package/documentation/content/gallery/05-volview-select-data-to-delete.jpg +0 -0
- package/documentation/content/gallery/06-volview-corner-annotation.jpg +0 -0
- package/documentation/content/gallery/07-volview-layout-notes.jpg +0 -0
- package/documentation/content/gallery/07-volview-layout.jpg +0 -0
- package/documentation/content/gallery/09-volview-layout-3DPrimary.jpg +0 -0
- package/documentation/content/gallery/10-volview-wl-pan-zoom-notes.jpg +0 -0
- package/documentation/content/gallery/10-volview-wl-pan-zoom.jpg +0 -0
- package/documentation/content/gallery/11-volview-paint-notes.jpg +0 -0
- package/documentation/content/gallery/11-volview-paint.jpg +0 -0
- package/documentation/content/gallery/12-volview-paint-options.jpg +0 -0
- package/documentation/content/gallery/13-volview-crop-notes.jpg +0 -0
- package/documentation/content/gallery/13-volview-crop.jpg +0 -0
- package/documentation/content/gallery/14-volview-ruler.jpg +0 -0
- package/documentation/content/gallery/15-volview-crosshairs.jpg +0 -0
- package/documentation/content/gallery/16-volview-rendering.jpg +0 -0
- package/documentation/content/gallery/17-volview-colormap-notes.jpg +0 -0
- package/documentation/content/gallery/17-volview-colormap.jpg +0 -0
- package/documentation/content/gallery/17-volview-opacity-notes.jpg +0 -0
- package/documentation/content/gallery/17-volview-opacity.jpg +0 -0
- package/documentation/content/gallery/17-volview-opacity2.jpg +0 -0
- package/documentation/content/gallery/18-volview-presets.jpg +0 -0
- package/documentation/content/gallery/19-volview-color.jpg +0 -0
- package/documentation/content/gallery/19-volview-color2.jpg +0 -0
- package/documentation/content/gallery/20-volview-lightfollowcamera0.jpg +0 -0
- package/documentation/content/gallery/20-volview-lightfollowcamera1.jpg +0 -0
- package/documentation/content/gallery/20-volview-lightfollowcamera2.jpg +0 -0
- package/documentation/content/gallery/20-volview-lightfollowcamera3.jpg +0 -0
- package/documentation/content/gallery/21-volview-hybrid-final.jpg +0 -0
- package/documentation/content/gallery/21-volview-hybrid0.0.jpg +0 -0
- package/documentation/content/gallery/21-volview-hybrid0.5.jpg +0 -0
- package/documentation/content/gallery/21-volview-hybrid1.0.jpg +0 -0
- package/documentation/content/gallery/LocalAmbientOcclusion.jpg +0 -0
- package/documentation/content/gallery/Notes.pptx +0 -0
- package/documentation/content/gallery/VolView-Overview.jpg +0 -0
- package/documentation/content/gallery/index.md +53 -0
- package/documentation/content/icon/favicon-16x16.png +0 -0
- package/documentation/content/icon/favicon-196x196.png +0 -0
- package/documentation/content/icon/favicon-32x32.png +0 -0
- package/documentation/content/icon/favicon-96x96.png +0 -0
- package/documentation/content/index.pug +43 -0
- package/documentation/content/logo.png +0 -0
- package/documentation/content/logo.svg +20 -0
- package/documentation/data/menu.yml +3 -0
- package/documentation/themes/navy/layout/partial/footer.swig +22 -0
- package/documentation/tpl/__en__ +31 -0
- package/documentation/tpl/__sidebar__ +11 -0
- package/package.json +96 -0
- package/patches/jsdom-global+3.0.2.patch +12 -0
- package/patches/vue-toastification+1.7.14.patch +41 -0
- package/patches/vuetify+2.6.10.patch +13 -0
- package/prettier.config.js +9 -0
- package/public/favicon.ico +0 -0
- package/public/global.css +20 -0
- package/public/index.html +28 -0
- package/public/pvm-sample.png +0 -0
- package/server/helper.py +147 -0
- package/server/host.js +134 -0
- package/server/serialize.js +111 -0
- package/server/serialize.py +203 -0
- package/server/server.py +84 -0
- package/server/test.py +17 -0
- package/src/assets/KitwareHeadAndNeck.jpg +0 -0
- package/src/assets/logo.png +0 -0
- package/src/assets/logo.svg +20 -0
- package/src/assets/samples/3DUS-Fetus.jpg +0 -0
- package/src/assets/samples/CTA-Head_and_Neck.jpg +0 -0
- package/src/assets/samples/MRA-Head_and_Neck.jpg +0 -0
- package/src/assets/samples/MRI-Cardiac.jpg +0 -0
- package/src/assets/samples/MRI-PROSTATEx.jpg +0 -0
- package/src/components/AboutBox.vue +157 -0
- package/src/components/AiModule.vue +60 -0
- package/src/components/AnnotationsModule.vue +37 -0
- package/src/components/App.vue +539 -0
- package/src/components/ColorFunctionSlider.vue +181 -0
- package/src/components/DataBrowser.vue +173 -0
- package/src/components/DragAndDrop.vue +107 -0
- package/src/components/GroupableItem.vue +30 -0
- package/src/components/ImageDataBrowser.vue +186 -0
- package/src/components/ImageListCard.vue +114 -0
- package/src/components/ItemGroup.vue +74 -0
- package/src/components/LabelmapList.vue +36 -0
- package/src/components/LayoutGrid.vue +96 -0
- package/src/components/MeasurementsList.vue +134 -0
- package/src/components/MessageCenter.vue +189 -0
- package/src/components/MessageItem.vue +83 -0
- package/src/components/MessageNotificationContent.vue +20 -0
- package/src/components/MessageNotifications.vue +84 -0
- package/src/components/ModelBrowser.vue +83 -0
- package/src/components/ModulePanel.vue +137 -0
- package/src/components/PaintControls.vue +174 -0
- package/src/components/PatientBrowser.vue +280 -0
- package/src/components/PatientStudyVolumeBrowser.vue +325 -0
- package/src/components/RenderingModule.vue +49 -0
- package/src/components/ResizableNavDrawer.vue +158 -0
- package/src/components/SampleDataBrowser.vue +198 -0
- package/src/components/SaveSession.vue +57 -0
- package/src/components/Settings.vue +35 -0
- package/src/components/SliceSlider.vue +182 -0
- package/src/components/SpleenModule.vue +101 -0
- package/src/components/ToolButton.vue +58 -0
- package/src/components/ToolStrip.vue +186 -0
- package/src/components/ViewOverlayGrid.vue +84 -0
- package/src/components/VolumePresets.vue +165 -0
- package/src/components/VolumeProperties.vue +171 -0
- package/src/components/VolumeRendering.vue +365 -0
- package/src/components/VtkThreeView.vue +512 -0
- package/src/components/VtkTwoView.vue +665 -0
- package/src/components/__tests__/ResizableNavDrawer.spec.js +32 -0
- package/src/components/__tests__/ToolButton.spec.js +46 -0
- package/src/components/icons/KitwareLogoIcon.vue +54 -0
- package/src/components/icons/VolViewFullLogo.vue +139 -0
- package/src/components/icons/VolViewLogo.vue +78 -0
- package/src/components/styles/utils.css +16 -0
- package/src/components/styles/vtk-view.css +116 -0
- package/src/components/tools/CropTool.vue +61 -0
- package/src/components/tools/CrosshairsTool.vue +93 -0
- package/src/components/tools/MouseManipulatorTool.vue +108 -0
- package/src/components/tools/PaintTool.vue +54 -0
- package/src/components/tools/PanTool.vue +35 -0
- package/src/components/tools/RulerTool.vue +202 -0
- package/src/components/tools/SliceScrollTool.vue +123 -0
- package/src/components/tools/WindowLevelTool.vue +191 -0
- package/src/components/tools/ZoomTool.vue +35 -0
- package/src/components/tools/crop/Crop2D.vue +367 -0
- package/src/components/tools/crop/Crop2DLineHandle.vue +103 -0
- package/src/components/tools/crop/Crop3D.vue +192 -0
- package/src/components/tools/crop/CropControls.vue +38 -0
- package/src/components/tools/crop/types.ts +12 -0
- package/src/components/tools/crosshairs/CrosshairSVG2D.vue +125 -0
- package/src/components/tools/crosshairs/CrosshairsWidget2D.vue +100 -0
- package/src/components/tools/paint/PaintWidget2D.vue +192 -0
- package/src/components/tools/ruler/RulerSVG2D.vue +181 -0
- package/src/components/tools/ruler/RulerWidget2D.vue +154 -0
- package/src/composables/__tests__/useDoubleRecord.spec.ts +57 -0
- package/src/composables/__tests__/useOrientationLabels.spec.ts +29 -0
- package/src/composables/isViewAnimating.ts +25 -0
- package/src/composables/manageVTKSubscription.ts +6 -0
- package/src/composables/onProxyManagerEvent.ts +50 -0
- package/src/composables/proxyManager.ts +13 -0
- package/src/composables/sync/__tests__/createPrimitiveSyncContext.spec.ts +41 -0
- package/src/composables/sync/__tests__/useWindowingSync.spec.ts +51 -0
- package/src/composables/sync/createPrimitiveSyncContext.ts +83 -0
- package/src/composables/sync/useWindowingSync.ts +48 -0
- package/src/composables/useAppLoadingNotifications.ts +73 -0
- package/src/composables/useCameraOrientation.ts +34 -0
- package/src/composables/useCurrentImage.ts +74 -0
- package/src/composables/useCurrentSlice.ts +43 -0
- package/src/composables/useDoubleRecord.ts +77 -0
- package/src/composables/useEventListener.ts +26 -0
- package/src/composables/useGlobalErrorHook.ts +18 -0
- package/src/composables/useMultiSelection.ts +29 -0
- package/src/composables/useOrientationLabels.ts +62 -0
- package/src/composables/usePanels.ts +42 -0
- package/src/composables/usePersistCameraConfig.ts +138 -0
- package/src/composables/useResizeObserver.ts +37 -0
- package/src/composables/useResizeToFit.ts +50 -0
- package/src/composables/useSceneBuilder.ts +96 -0
- package/src/composables/useToast.js +11 -0
- package/src/composables/useVTKCallback.ts +33 -0
- package/src/composables/useVTKWorldToDisplay.ts +141 -0
- package/src/composables/useViewProxy.ts +87 -0
- package/src/composables/useVolumeThumbnailing.ts +173 -0
- package/src/composables/useWebGLWatchdog.ts +32 -0
- package/src/composables/useWidgetManager.ts +41 -0
- package/src/config.ts +182 -0
- package/src/constants.ts +38 -0
- package/src/core/id.ts +18 -0
- package/src/core/provider.ts +31 -0
- package/src/core/proxies.ts +90 -0
- package/src/core/thumbnailers/__tests__/vtk-image.spec.ts +58 -0
- package/src/core/thumbnailers/index.ts +5 -0
- package/src/core/thumbnailers/volume-thumbnailer.ts +130 -0
- package/src/core/thumbnailers/vtk-image.ts +142 -0
- package/src/core/tools/__tests__/paint.spec.ts +101 -0
- package/src/core/tools/__tests__/ruler.spec.ts +73 -0
- package/src/core/tools/paint/brush.ts +20 -0
- package/src/core/tools/paint/ellipse-brush.ts +96 -0
- package/src/core/tools/paint/index.ts +141 -0
- package/src/core/tools/ruler.ts +149 -0
- package/src/global.d.ts +24 -0
- package/src/io/__tests__/io.spec.ts +26 -0
- package/src/io/dicom.ts +187 -0
- package/src/io/index.ts +11 -0
- package/src/io/io.ts +157 -0
- package/src/io/itk/itkConfig.js +8 -0
- package/src/io/itk-dicom/dicom.cpp +327 -0
- package/src/io/itk-dicom/web-build/dicom.js +16 -0
- package/src/io/itk-dicom/web-build/dicom.umd.js +21 -0
- package/src/io/itk-dicom/web-build/dicom.umd.wasm +0 -0
- package/src/io/itk-dicom/web-build/dicom.wasm +0 -0
- package/src/io/manifest.ts +30 -0
- package/src/io/readers.ts +36 -0
- package/src/io/state-file/index.ts +170 -0
- package/src/io/state-file/schema.ts +277 -0
- package/src/io/state-file/utils.ts +33 -0
- package/src/io/types.ts +4 -0
- package/src/io/vtk/async.reader.worker.ts +50 -0
- package/src/io/vtk/async.ts +58 -0
- package/src/io/vtk/async.writer.worker.ts +46 -0
- package/src/io/vtk/common.ts +30 -0
- package/src/io/zip.ts +31 -0
- package/src/main.js +66 -0
- package/src/main.ts +1 -0
- package/src/plugins/vuetify.js +25 -0
- package/src/shims-itk.d.ts +67 -0
- package/src/shims-misc.d.ts +4 -0
- package/src/shims-tsx.d.ts +13 -0
- package/src/shims-vtk.d.ts +1042 -0
- package/src/shims-vue.d.ts +5 -0
- package/src/store/__tests__/datasets.spec.ts +75 -0
- package/src/store/__tests__/messages.spec.ts +74 -0
- package/src/store/__tests__/rulers.spec.ts +77 -0
- package/src/store/__tests__/view-configs.spec.ts +37 -0
- package/src/store/datasets-dicom.ts +398 -0
- package/src/store/datasets-files.ts +35 -0
- package/src/store/datasets-images.ts +118 -0
- package/src/store/datasets-labelmaps.ts +136 -0
- package/src/store/datasets-models.ts +25 -0
- package/src/store/datasets.ts +341 -0
- package/src/store/messages.ts +144 -0
- package/src/store/tools/crop.ts +136 -0
- package/src/store/tools/crosshairs.ts +131 -0
- package/src/store/tools/index.ts +95 -0
- package/src/store/tools/paint.ts +191 -0
- package/src/store/tools/rulers.ts +305 -0
- package/src/store/tools/types.ts +54 -0
- package/src/store/view-configs/camera.ts +51 -0
- package/src/store/view-configs/common.ts +61 -0
- package/src/store/view-configs/slicing.ts +86 -0
- package/src/store/view-configs/types.ts +39 -0
- package/src/store/view-configs/volume-coloring.ts +193 -0
- package/src/store/view-configs/windowing.ts +69 -0
- package/src/store/view-configs.ts +78 -0
- package/src/store/views.ts +130 -0
- package/src/types/index.ts +16 -0
- package/src/types/layout.ts +10 -0
- package/src/types/lps.ts +40 -0
- package/src/types/views.ts +65 -0
- package/src/types/vtk-types.ts +29 -0
- package/src/utils/__tests__/lps.spec.ts +102 -0
- package/src/utils/color.ts +23 -0
- package/src/utils/errors.js +3 -0
- package/src/utils/fetch.ts +101 -0
- package/src/utils/hacks.ts +14 -0
- package/src/utils/index.ts +83 -0
- package/src/utils/lps.ts +129 -0
- package/src/utils/manipulators.ts +35 -0
- package/src/utils/promise-worker.ts +45 -0
- package/src/utils/vtk-helpers.ts +215 -0
- package/src/utils/workerHandler.js +42 -0
- package/src/vtk/ColorMaps.ts +72 -0
- package/src/vtk/CrosshairsWidget/behavior.ts +112 -0
- package/src/vtk/CrosshairsWidget/index.d.ts +22 -0
- package/src/vtk/CrosshairsWidget/index.js +73 -0
- package/src/vtk/CrosshairsWidget/state.ts +51 -0
- package/src/vtk/IJKSliceRepresentationProxy/index.d.ts +9 -0
- package/src/vtk/IJKSliceRepresentationProxy/index.js +59 -0
- package/src/vtk/LPSView2DProxy/index.d.ts +18 -0
- package/src/vtk/LPSView2DProxy/index.js +89 -0
- package/src/vtk/LPSView3DProxy/index.d.ts +16 -0
- package/src/vtk/LPSView3DProxy/index.js +78 -0
- package/src/vtk/LabelMap/index.d.ts +16 -0
- package/src/vtk/LabelMap/index.js +49 -0
- package/src/vtk/LabelMapSliceRepProxy/index.d.ts +6 -0
- package/src/vtk/LabelMapSliceRepProxy/index.js +104 -0
- package/src/vtk/MedicalColorPresets.json +1448 -0
- package/src/vtk/PaintBrushContextRepresentation/index.js +191 -0
- package/src/vtk/PaintWidget/behavior.ts +101 -0
- package/src/vtk/PaintWidget/index.d.ts +28 -0
- package/src/vtk/PaintWidget/index.js +56 -0
- package/src/vtk/PaintWidget/state.ts +41 -0
- package/src/vtk/PiecewiseWidget/index.js +203 -0
- package/src/vtk/RulerWidget/behavior.ts +185 -0
- package/src/vtk/RulerWidget/index.d.ts +25 -0
- package/src/vtk/RulerWidget/index.js +79 -0
- package/src/vtk/RulerWidget/state.ts +63 -0
- package/src/vtk/TreJsonConverter/index.js +150 -0
- package/src/vtk/proxy.js +66 -0
- package/src/vtk/proxyUtils.js +16 -0
- package/src/vtk/webvr-empty.js +1 -0
- package/tests/testUtils.js +12 -0
- package/tsconfig.json +46 -0
- package/vue.config.js +86 -0
|
@@ -0,0 +1,1042 @@
|
|
|
1
|
+
declare module '@kitware/vtk.js/vtk' {
|
|
2
|
+
import { vtkObject } from '@kitware/vtk.js/interfaces';
|
|
3
|
+
|
|
4
|
+
const vtk = (obj: any): vtkObject => {};
|
|
5
|
+
vtk.register = (vtkClassName: string, constructor: unknown): void => {};
|
|
6
|
+
|
|
7
|
+
export default vtk;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare module '@kitware/vtk.js/interfaces-additions' {
|
|
11
|
+
import { EVENT_ABORT, VOID } from '@kitware/vtk.js/macros';
|
|
12
|
+
export type EventHandler = (...any: args[]) => EVENT_ABORT | VOID | void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// This is replicated in vtk-types. I'm keeping this here for the types in this shim file.
|
|
16
|
+
declare module '@kitware/vtk.js/types/ProxyObject' {
|
|
17
|
+
import { vtkObject } from '@kitware/vtk.js/interfaces';
|
|
18
|
+
import vtkProxyManager from '@kitware/vtk.js/Proxy/Core/ProxyManager';
|
|
19
|
+
|
|
20
|
+
export default interface vtkProxyObject extends vtkObject {
|
|
21
|
+
getProxyId(): string;
|
|
22
|
+
getProxyGroup(): string;
|
|
23
|
+
getProxyName(): string;
|
|
24
|
+
getProxyManager(): vtkProxyManager;
|
|
25
|
+
setProxyManager(manager: vtkProxyManager): void;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
declare module '@kitware/vtk.js/Proxy/Core/SourceProxy' {
|
|
29
|
+
import { vtkAlgorithm } from '@kitware/vtk.js/interfaces';
|
|
30
|
+
import vtkProxyObject from '@kitware/vtk.js/types/ProxyObject';
|
|
31
|
+
|
|
32
|
+
export interface vtkSourceProxy<T> extends vtkProxyObject {
|
|
33
|
+
setInputProxy(source: vtkSourceProxy<T>): void;
|
|
34
|
+
setInputData(dataset: T, type?: string): void;
|
|
35
|
+
setInputAlgorithm(
|
|
36
|
+
algo: vtkAlgorithm,
|
|
37
|
+
type: string,
|
|
38
|
+
autoUpdate: bool = true
|
|
39
|
+
): void;
|
|
40
|
+
update(): void;
|
|
41
|
+
|
|
42
|
+
getName(): string;
|
|
43
|
+
setName(name: string): boolean;
|
|
44
|
+
getType(): string;
|
|
45
|
+
getDataset(): T | null;
|
|
46
|
+
getAlgo(): vtkAlgorithm | null;
|
|
47
|
+
getInputProxy(): vtkSourceProxy<T> | null;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export default vtkSourceProxy;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
declare module '@kitware/vtk.js/Proxy/Core/ViewProxy' {
|
|
54
|
+
import vtkProxyObject from '@kitware/vtk.js/types/ProxyObject';
|
|
55
|
+
import vtkActor from '@kitware/vtk.js/Rendering/Core/Actor';
|
|
56
|
+
import vtkAbstractRepresentationProxy from '@kitware/vtk.js/Proxy/Core/AbstractRepresentationProxy';
|
|
57
|
+
import { Vector3, Vector4 } from '@kitware/vtk.js/types';
|
|
58
|
+
import vtkCamera from '@kitware/vtk.js/Rendering/Core/Camera';
|
|
59
|
+
import vtkRenderWindowInteractor from '@kitware/vtk.js/Rendering/Core/RenderWindowInteractor';
|
|
60
|
+
import vtkInteractorStyle from '@kitware/vtk.js/Rendering/Core/InteractorStyle';
|
|
61
|
+
import { vtkSubscription } from '@kitware/vtk.js/interfaces';
|
|
62
|
+
import vtkRenderer from '@kitware/vtk.js/Rendering/Core/Renderer';
|
|
63
|
+
import vtkRenderWindow from '@kitware/vtk.js/Rendering/Core/RenderWindow';
|
|
64
|
+
import vtkOpenGLRenderWindow from '@kitware/vtk.js/Rendering/OpenGL/RenderWindow';
|
|
65
|
+
|
|
66
|
+
export interface vtkViewProxy extends vtkProxyObject {
|
|
67
|
+
setPresetToInteractor3D(nameOrDefinitions: string | Object): boolean;
|
|
68
|
+
setPresetToInteractor2D(nameOrDefinitions: string | Object): boolean;
|
|
69
|
+
|
|
70
|
+
setOrientationAxesType(type: string): void;
|
|
71
|
+
setOrientationAxesVisibility(visible: boolean): boolean;
|
|
72
|
+
registerOrientationAxis(name: string, actor: vtkActor): void;
|
|
73
|
+
unregisterOrientationAxis(name: string): void;
|
|
74
|
+
listOrientationAxis(): string[];
|
|
75
|
+
setPresetToOrientationAxes(nameOrDefinitions: string | Object): boolean;
|
|
76
|
+
|
|
77
|
+
setContainer(container: HTMLElement | null): void;
|
|
78
|
+
resize(): void;
|
|
79
|
+
renderLater(): void;
|
|
80
|
+
render(blocking: boolean = true): void;
|
|
81
|
+
resetCamera(): void;
|
|
82
|
+
|
|
83
|
+
addRepresentation(representation: vtkAbstractRepresentationProxy): void;
|
|
84
|
+
removeRepresentation(representation: vtkAbstractRepresentationProxy): void;
|
|
85
|
+
|
|
86
|
+
// TODO correct?
|
|
87
|
+
captureImage(
|
|
88
|
+
opts: { format: string = 'image/png' } & Object = {}
|
|
89
|
+
): Array<Promise<string>>;
|
|
90
|
+
openCaptureImage(target: string = '_blank'): void;
|
|
91
|
+
|
|
92
|
+
// TODO corner annotations
|
|
93
|
+
|
|
94
|
+
setBackground(color: Vector3 | Vector4): void;
|
|
95
|
+
getBackground(): Vector3 | Vector4;
|
|
96
|
+
|
|
97
|
+
setAnimation(enable: boolean, requester?: vtkObject);
|
|
98
|
+
|
|
99
|
+
updateOrientation(
|
|
100
|
+
axisIndex: 0 | 1 | 2,
|
|
101
|
+
orientation: -1 | 1,
|
|
102
|
+
viewUp: Vector3,
|
|
103
|
+
animateSteps: number = 0
|
|
104
|
+
): Promise<void>;
|
|
105
|
+
moveCamera(
|
|
106
|
+
focalPoint: Vector3,
|
|
107
|
+
position: Vector3,
|
|
108
|
+
viewUp: Vector3,
|
|
109
|
+
animateSteps: number = 0
|
|
110
|
+
): Promise<void>;
|
|
111
|
+
|
|
112
|
+
resetOrientation(animateSteps: number = 0): void;
|
|
113
|
+
rotate(angle): void;
|
|
114
|
+
|
|
115
|
+
focusTo(focalPoint: Vector3): void;
|
|
116
|
+
|
|
117
|
+
getCamera(): vtkCamera;
|
|
118
|
+
// getAnnotationOpacity
|
|
119
|
+
getContainer(): HTMLElement | null;
|
|
120
|
+
// getCornerAnnotation
|
|
121
|
+
getInteractor(): vtkRenderWindowInteractor;
|
|
122
|
+
getInteractorStyle2D(): vtkInteractorStyle;
|
|
123
|
+
getInteractorStyle3D(): vtkInteractorStyle;
|
|
124
|
+
getOpenglRenderWindow(): vtkOpenGLRenderWindow;
|
|
125
|
+
getOrientationAxesType(): string;
|
|
126
|
+
getPresetToOrientationAxes(): any;
|
|
127
|
+
getRenderer(): vtkRenderer;
|
|
128
|
+
getRenderWindow(): vtkRenderWindow;
|
|
129
|
+
getRepresentations(): vtkAbstractRepresentationProxy[];
|
|
130
|
+
getUseParallelRendering(): boolean;
|
|
131
|
+
getDisableAnimation(): boolean;
|
|
132
|
+
setDisableAnimation(disabled: boolean): boolean;
|
|
133
|
+
|
|
134
|
+
onResize(
|
|
135
|
+
cb: (size: { width: number; height: number }) => void
|
|
136
|
+
): vtkSubscription;
|
|
137
|
+
|
|
138
|
+
// TODO proxy property mappings
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export default vtkViewProxy;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
declare module '@kitware/vtk.js/Proxy/Core/View2DProxy' {
|
|
145
|
+
import vtkViewProxy from '@kitware/vtk.js/Proxy/Core/ViewProxy';
|
|
146
|
+
|
|
147
|
+
export interface vtkView2DProxy extends vtkViewProxy {
|
|
148
|
+
getAxis(): number;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export default vtkView2DProxy;
|
|
152
|
+
}
|
|
153
|
+
declare module '@kitware/vtk.js/Proxy/Core/AbstractRepresentationProxy' {
|
|
154
|
+
import { vtkObject } from '@kitware/vtk.js/interfaces';
|
|
155
|
+
import vtkProxyObject from '@kitware/vtk.js/types/ProxyObject';
|
|
156
|
+
import vtkSourceProxy from '@kitware/vtk.js/Proxy/Core/SourceProxy';
|
|
157
|
+
import vtkAbstractMapper from '@kitware/vtk.js/Rendering/Core/AbstractMapper';
|
|
158
|
+
import vtkActor from '@kitware/vtk.js/Rendering/Core/Actor';
|
|
159
|
+
import vtkVolume from '@kitware/vtk.js/Rendering/Core/Volume';
|
|
160
|
+
|
|
161
|
+
export interface vtkAbstractRepresentationProxy extends vtkProxyObject {
|
|
162
|
+
setInput(source: vtkSourceProxy): void;
|
|
163
|
+
getInputDataSet(): vtkObject | null;
|
|
164
|
+
setColorBy(
|
|
165
|
+
arrayName: string | null,
|
|
166
|
+
arrayLocation: string,
|
|
167
|
+
componentIndex: number = -1
|
|
168
|
+
);
|
|
169
|
+
setRescaleOnColorBy(rescale: boolean): boolean;
|
|
170
|
+
getRescaleOnColorBy(): boolean;
|
|
171
|
+
getInput(): vtkProxyObject;
|
|
172
|
+
getMapper(): vtkAbstractMapper;
|
|
173
|
+
getActors(): vtkActor[];
|
|
174
|
+
getVolumes(): vtkVolume[];
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export default vtkAbstractRepresentationProxy;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
declare module '@kitware/vtk.js/Proxy/Core/SliceRepresentationProxy' {
|
|
181
|
+
import vtkAbstractRepresentationProxy from '@kitware/vtk.js/Proxy/Core/AbstractRepresentationProxy';
|
|
182
|
+
|
|
183
|
+
export interface vtkSliceRepresentationProxy
|
|
184
|
+
extends vtkAbstractRepresentationProxy {
|
|
185
|
+
/**
|
|
186
|
+
* @param mode XYZIJK
|
|
187
|
+
*/
|
|
188
|
+
setSlicingMode(mode: string): boolean;
|
|
189
|
+
getSlicingMode(): string;
|
|
190
|
+
getSliceIndex(): number;
|
|
191
|
+
getAnnotations(): any;
|
|
192
|
+
|
|
193
|
+
// proxy property mappings
|
|
194
|
+
|
|
195
|
+
setVisibility(visible: boolean): boolean;
|
|
196
|
+
getVisibility(): boolean;
|
|
197
|
+
setWindowWidth(width: number): boolean;
|
|
198
|
+
getWindowWidth(): number;
|
|
199
|
+
setWindowLevel(level: number): boolean;
|
|
200
|
+
getWindowLevel(): number;
|
|
201
|
+
setInterpolationType(type: number): boolean;
|
|
202
|
+
getInterpolationType(): number;
|
|
203
|
+
setSlice(type: number): boolean;
|
|
204
|
+
getSlice(): number;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export default vtkSliceRepresentationProxy;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
declare module '@kitware/vtk.js/Proxy/Representations/VolumeRepresentationProxy' {
|
|
211
|
+
import vtkAbstractRepresentationProxy from '@kitware/vtk.js/Proxy/Core/AbstractRepresentationProxy';
|
|
212
|
+
import vtkImageCropFilter from '@kitware/vtk.js/Filters/General/ImageCropFilter';
|
|
213
|
+
|
|
214
|
+
export interface vtkVolumeRepresentationProxy
|
|
215
|
+
extends vtkAbstractRepresentationProxy {
|
|
216
|
+
setIs2DVolume(is2D: boolean): void;
|
|
217
|
+
getIs2DVolume(): boolean;
|
|
218
|
+
isVisible(): boolean;
|
|
219
|
+
setVisibility(visible: boolean): void;
|
|
220
|
+
getVisibility(): boolean;
|
|
221
|
+
setSliceVisibility(isVisible: boolean): void;
|
|
222
|
+
getSliceVisibility(): boolean;
|
|
223
|
+
setSampleDistance(samp: number): void;
|
|
224
|
+
getSampleDistance(): number;
|
|
225
|
+
setEdgeGradient(grad: number): void;
|
|
226
|
+
getEdgeGradient(): number;
|
|
227
|
+
getCropFilter(): vtkImageCropFilter;
|
|
228
|
+
|
|
229
|
+
// proxy property mappings
|
|
230
|
+
getXSlice(): number;
|
|
231
|
+
setXSlice(slice: number): boolean;
|
|
232
|
+
getYSlice(): number;
|
|
233
|
+
setYSlice(slice: number): boolean;
|
|
234
|
+
getZSlice(): number;
|
|
235
|
+
setZSlice(slice: number): boolean;
|
|
236
|
+
getVolumeVisibility(): boolean;
|
|
237
|
+
setVolumeVisibility(visible: boolean): boolean;
|
|
238
|
+
getXSliceVisibility(): boolean;
|
|
239
|
+
setXSliceVisibility(visible: boolean): boolean;
|
|
240
|
+
getYSliceVisibility(): boolean;
|
|
241
|
+
setYSliceVisibility(visible: boolean): boolean;
|
|
242
|
+
getZSliceVisibility(): boolean;
|
|
243
|
+
setZSliceVisibility(visible: boolean): boolean;
|
|
244
|
+
getWindowWidth(): number;
|
|
245
|
+
setWindowWidth(width: number): boolean;
|
|
246
|
+
getWindowLevel(): number;
|
|
247
|
+
setWindowLevel(level: number): boolean;
|
|
248
|
+
getUseShadow(): boolean;
|
|
249
|
+
setUseShadow(useShadow: boolean): boolean;
|
|
250
|
+
getCroppingPlanes(): number[];
|
|
251
|
+
setCroppingPlanes(planes: number[]): boolean;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export default vtkVolumeRepresentationProxy;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
declare module '@kitware/vtk.js/Proxy/Core/ProxyManager' {
|
|
258
|
+
import { vtkObject } from '@kitware/vtk.js/interfaces';
|
|
259
|
+
import vtkProxyObject from '@kitware/vtk.js/types/ProxyObject';
|
|
260
|
+
import vtkSourceProxy from '@kitware/vtk.js/Proxy/Core/SourceProxy';
|
|
261
|
+
import vtkViewProxy from '@kitware/vtk.js/Proxy/Core/ViewProxy';
|
|
262
|
+
import vtkAbstractRepresentationProxy from '@kitware/vtk.js/Proxy/Core/AbstractRepresentationProxy';
|
|
263
|
+
import vtkLookupTableProxy from '@kitware/vtk.js/Proxy/Core/LookupTableProxy';
|
|
264
|
+
import vtkPiecewiseFunctionProxy from '@kitware/vtk.js/Proxy/Core/PiecewiseFunctionProxy';
|
|
265
|
+
|
|
266
|
+
export type ProxyConfiguration = Object;
|
|
267
|
+
|
|
268
|
+
export interface ProxyRegistrationChangeInfo {
|
|
269
|
+
action: 'register' | 'unregister';
|
|
270
|
+
proxyId: string;
|
|
271
|
+
proxyName: string;
|
|
272
|
+
proxyGroup: string;
|
|
273
|
+
proxy: vtkProxyObject;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export interface vtkProxyManager extends vtkObject {
|
|
277
|
+
// core //
|
|
278
|
+
|
|
279
|
+
setProxyConfiguration(config: ProxyConfiguration): boolean;
|
|
280
|
+
getProxyConfiguration(): ProxyConfiguration;
|
|
281
|
+
|
|
282
|
+
setActiveSource<T>(sourceProxy: vtkSourceProxy<T>): boolean;
|
|
283
|
+
getActiveSource<T>(): vtkSourceProxy<T>;
|
|
284
|
+
|
|
285
|
+
setActiveView(viewProxy: vtkViewProxy): boolean;
|
|
286
|
+
getActiveView(): vtkViewProxy;
|
|
287
|
+
|
|
288
|
+
onProxyRegistrationChange(
|
|
289
|
+
callback: (changeInfo: ProxyRegistrationChangeInfo) => void
|
|
290
|
+
);
|
|
291
|
+
|
|
292
|
+
getProxyById<T extends vtkProxyObject>(id: string): T | undefined;
|
|
293
|
+
getProxyGroups(): string[];
|
|
294
|
+
getProxyInGroup(groupName: string): vtkProxyObject[];
|
|
295
|
+
|
|
296
|
+
getSources(): vtkSourceProxy<any>[];
|
|
297
|
+
getRepresentations(): vtkAbstractRepresentationProxy[];
|
|
298
|
+
getViews(): vtkViewProxy[];
|
|
299
|
+
|
|
300
|
+
createProxy<T extends vtkProxyObject>(
|
|
301
|
+
group: string,
|
|
302
|
+
name: string,
|
|
303
|
+
options?: Object
|
|
304
|
+
): T;
|
|
305
|
+
|
|
306
|
+
getRepresentation<T extends vtkAbstractRepresentationProxy>(
|
|
307
|
+
source: vtkSourceProxy<any>,
|
|
308
|
+
view: vtkViewProxy
|
|
309
|
+
): T | null;
|
|
310
|
+
|
|
311
|
+
deleteProxy(proxy: vtkProxyObject): void;
|
|
312
|
+
|
|
313
|
+
// view //
|
|
314
|
+
|
|
315
|
+
render(view?: vtkViewProxy): void;
|
|
316
|
+
renderAllViews(): void;
|
|
317
|
+
setAnimationOnAllViews(): void;
|
|
318
|
+
autoAnimateViews(debounceTimeout: number = 250): void;
|
|
319
|
+
resizeAllViews(): void;
|
|
320
|
+
resetCamera(view?: vtkViewProxy): void;
|
|
321
|
+
createRepresentationInAllViews(source: vtkSourceProxy<any>): void;
|
|
322
|
+
resetCameraInAllViews(): void;
|
|
323
|
+
|
|
324
|
+
// properties //
|
|
325
|
+
|
|
326
|
+
// these are specific to the proxy configuration...
|
|
327
|
+
getLookupTable(arrayName: string, options?: any): vtkLookupTableProxy;
|
|
328
|
+
getPiecewiseFunction(
|
|
329
|
+
arrayName: string,
|
|
330
|
+
options?: any
|
|
331
|
+
): vtkPiecewiseFunctionProxy;
|
|
332
|
+
rescaleTransferFunctionToDataRange(
|
|
333
|
+
arrayName: string,
|
|
334
|
+
dataRange: [number, number]
|
|
335
|
+
): void;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export default vtkProxyManager;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
declare module '@kitware/vtk.js/Proxy/Core/LookupTableProxy' {
|
|
342
|
+
import vtkProxyObject from '@kitware/vtk.js/types/ProxyObject';
|
|
343
|
+
import vtkColorTransferFunction from '@kitware/vtk.js/Rendering/Core/ColorTransferFunction';
|
|
344
|
+
|
|
345
|
+
// [x, r/h, g/s, b/v, m=0.5, s=0.0]
|
|
346
|
+
export type RGBHSVPoint = [number, number, number, number, number?, number?];
|
|
347
|
+
|
|
348
|
+
export interface ILookupTableProxyMode {
|
|
349
|
+
Preset: number = 0;
|
|
350
|
+
RGBPoints: number = 1;
|
|
351
|
+
HSVPoints: number = 2;
|
|
352
|
+
Nodes: number = 3;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
export interface vtkLookupTableProxy extends vtkProxyObject {
|
|
356
|
+
setPresetName(name: string): void;
|
|
357
|
+
getPresetName(): string;
|
|
358
|
+
setRGBPoints(points: RGBHSVPoint[]): void;
|
|
359
|
+
getRGBPoints(): RGBHSVPoint[];
|
|
360
|
+
setHSVPoints(points: RGBHSVPoint[]): void;
|
|
361
|
+
getHSVPoints(): RGBHSVPoint[];
|
|
362
|
+
// Node: { x, y, midpoint, sharpness }
|
|
363
|
+
setNodes(nodes: number[][]): void;
|
|
364
|
+
getNodes(nodes): number[][];
|
|
365
|
+
setMode(mode: number): void;
|
|
366
|
+
getMode(): number;
|
|
367
|
+
applyMode(): void;
|
|
368
|
+
setDataRange(min: number, max: number): void;
|
|
369
|
+
getDataRange(): [number, number];
|
|
370
|
+
getLookupTable(): vtkColorTransferFunction;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
export interface ILookupTableProxyInitialValues {
|
|
374
|
+
lookupTable?: vtkColorTransferFunction;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
export function newInstance(
|
|
378
|
+
initialValues?: ILookupTableProxyInitialValues
|
|
379
|
+
): vtkLookupTableProxy;
|
|
380
|
+
|
|
381
|
+
export declare const vtkLookupTableProxy: {
|
|
382
|
+
newInstance: typeof newInstance;
|
|
383
|
+
Mode: ILookupTableProxyMode;
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
export default vtkLookupTableProxy;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
declare module '@kitware/vtk.js/Proxy/Core/PiecewiseFunctionProxy' {
|
|
390
|
+
import vtkProxyObject from '@kitware/vtk.js/types/ProxyObject';
|
|
391
|
+
import vtkLookupTableProxy from '@kitware/vtk.js/Proxy/Core/LookupTableProxy';
|
|
392
|
+
import vtkPiecewiseFunction from '@kitware/vtk.js/Common/DataModel/PiecewiseFunction';
|
|
393
|
+
|
|
394
|
+
// [x, r/h, g/s, b/v, m=0.5, s=0.0]
|
|
395
|
+
export interface PiecewiseGaussian {
|
|
396
|
+
position: number;
|
|
397
|
+
height: number;
|
|
398
|
+
width: number;
|
|
399
|
+
xBias: number;
|
|
400
|
+
yBias: number;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
export interface PiecewiseNode {
|
|
404
|
+
x: number;
|
|
405
|
+
y: number;
|
|
406
|
+
midpoint: number;
|
|
407
|
+
sharpness: number;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
export enum IPiecewiseFunctionProxyMode {
|
|
411
|
+
Gaussians = 0,
|
|
412
|
+
Points = 1,
|
|
413
|
+
Nodes = 2,
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
export interface IPiecewiseFunctionProxyDefaults {
|
|
417
|
+
Gaussians: PiecewiseGaussian[];
|
|
418
|
+
Points: number[][];
|
|
419
|
+
Nodes: PiecewiseNode[];
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
export interface vtkPiecewiseFunctionProxy extends vtkProxyObject {
|
|
423
|
+
setGaussians(gaussians: PiecewiseGaussian[]): void;
|
|
424
|
+
getGaussians(): PiecewiseGaussian[];
|
|
425
|
+
setPoints(points: number[][]): void;
|
|
426
|
+
getPoints(): number[][];
|
|
427
|
+
setNodes(nodes: PiecewiseNode[]): void;
|
|
428
|
+
getNodes(): PiecewiseNode[];
|
|
429
|
+
setMode(mode: number): void;
|
|
430
|
+
getMode(): number;
|
|
431
|
+
applyMode(): void;
|
|
432
|
+
getLookupTableProxy(): vtkLookupTableProxy;
|
|
433
|
+
setDataRange(min: number, max: number): void;
|
|
434
|
+
getDataRange(): [number, number];
|
|
435
|
+
getPiecewiseFunction(): vtkPiecewiseFunction;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
export interface IPiecewiseFunctionProxyInitialValues {
|
|
439
|
+
piecewiseFunction?: vtkPiecewiseFunction;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
export function newInstance(
|
|
443
|
+
initialValues?: IPiecewiseFunctionProxyInitialValues
|
|
444
|
+
): vtkPiecewiseFunctionProxy;
|
|
445
|
+
|
|
446
|
+
export declare const vtkPiecewiseFunctionProxy: {
|
|
447
|
+
newInstance: typeof newInstance;
|
|
448
|
+
Mode: typeof IPiecewiseFunctionProxyMode;
|
|
449
|
+
Defaults: IPiecewiseFunctionProxyDefaults;
|
|
450
|
+
};
|
|
451
|
+
export default vtkPiecewiseFunctionProxy;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
declare module '@kitware/vtk.js/Proxy/Core/PiecewiseFunctionProxy' {}
|
|
455
|
+
|
|
456
|
+
declare module '@kitware/vtk.js/Interaction/Manipulators/CompositeMouseManipulator' {
|
|
457
|
+
import { vtkObject } from '@kitware/vtk.js/interfaces';
|
|
458
|
+
import vtkRenderWindowInteractor from '@kitware/vtk.js/Rendering/Core/RenderWindowInteractor';
|
|
459
|
+
import vtkRenderer from '@kitware/vtk.js/Rendering/Core/Renderer';
|
|
460
|
+
import { Vector3 } from '@kitware/vtk.js/types';
|
|
461
|
+
|
|
462
|
+
export interface ICompositeMouseManipulatorInitialValues {
|
|
463
|
+
button?: number;
|
|
464
|
+
shift?: boolean;
|
|
465
|
+
control?: boolean;
|
|
466
|
+
alt?: boolean;
|
|
467
|
+
dragEnabled?: boolean;
|
|
468
|
+
scrollEnabled?: boolean;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
export interface vtkCompositeMouseManipulator extends vtkObject {
|
|
472
|
+
startInteraction();
|
|
473
|
+
endInteraction();
|
|
474
|
+
onButtonDown(
|
|
475
|
+
interactor: vtkRenderWindowInteractor,
|
|
476
|
+
renderer: vtkRenderer,
|
|
477
|
+
position: Vector3
|
|
478
|
+
);
|
|
479
|
+
onButtonUp(interactor: vtkRenderWindowInteractor);
|
|
480
|
+
onMouseMove(
|
|
481
|
+
interactor: vtkRenderWindowInteractor,
|
|
482
|
+
renderer: vtkRenderer,
|
|
483
|
+
position: Vector3
|
|
484
|
+
);
|
|
485
|
+
onStartScroll(
|
|
486
|
+
interactor: vtkRenderWindowInteractor,
|
|
487
|
+
renderer: vtkRenderer,
|
|
488
|
+
delta: number
|
|
489
|
+
);
|
|
490
|
+
onScroll(
|
|
491
|
+
interactor: vtkRenderWindowInteractor,
|
|
492
|
+
renderer: vtkRenderer,
|
|
493
|
+
delta: number
|
|
494
|
+
);
|
|
495
|
+
onEndScroll(interactor: vtkRenderWindowInteractor);
|
|
496
|
+
|
|
497
|
+
isDragEnabled(): boolean;
|
|
498
|
+
isScrollEnabled(): boolean;
|
|
499
|
+
|
|
500
|
+
getButton(): number;
|
|
501
|
+
setShift(shift: boolean): boolean;
|
|
502
|
+
getShift(): boolean;
|
|
503
|
+
setControl(control: boolean): boolean;
|
|
504
|
+
getControl(): boolean;
|
|
505
|
+
setAlt(alt: boolean): boolean;
|
|
506
|
+
getAlt(): boolean;
|
|
507
|
+
setDragEnabled(drag: boolean): boolean;
|
|
508
|
+
setScrollEnabled(scroll: boolean): boolean;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
export function extend(
|
|
512
|
+
publicAPI: object,
|
|
513
|
+
model: object,
|
|
514
|
+
initialValues?: ICompositeMouseManipulatorInitialValues
|
|
515
|
+
): void;
|
|
516
|
+
|
|
517
|
+
export declare const vtkCompositeMouseManipulator: {
|
|
518
|
+
extend: typeof extend;
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
export default vtkCompositeMouseManipulator;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
declare module '@kitware/vtk.js/Interaction/Manipulators/MouseRangeManipulator' {
|
|
525
|
+
import { vtkObject } from '@kitware/vtk.js/interfaces';
|
|
526
|
+
import vtkCompositeMouseManipulator, {
|
|
527
|
+
ICompositeMouseManipulatorInitialValues,
|
|
528
|
+
} from '@kitware/vtk.js/Interaction/Manipulators/CompositeMouseManipulator';
|
|
529
|
+
|
|
530
|
+
export interface IMouseRangeManipulatorInitialValues
|
|
531
|
+
extends ICompositeMouseManipulatorInitialValues {}
|
|
532
|
+
|
|
533
|
+
export interface vtkMouseRangeManipulator
|
|
534
|
+
extends vtkCompositeMouseManipulator {
|
|
535
|
+
setHorizontalListener(
|
|
536
|
+
min: number,
|
|
537
|
+
max: number,
|
|
538
|
+
step: number,
|
|
539
|
+
getValue: () => number,
|
|
540
|
+
setValue: (v: number) => void,
|
|
541
|
+
scale?: number = 1
|
|
542
|
+
);
|
|
543
|
+
setVerticalListener(
|
|
544
|
+
min: number,
|
|
545
|
+
max: number,
|
|
546
|
+
step: number,
|
|
547
|
+
getValue: () => number,
|
|
548
|
+
setValue: (v: number) => void,
|
|
549
|
+
scale?: number = 1
|
|
550
|
+
);
|
|
551
|
+
setScrollListener(
|
|
552
|
+
min: number,
|
|
553
|
+
max: number,
|
|
554
|
+
step: number,
|
|
555
|
+
getValue: () => number,
|
|
556
|
+
setValue: (v: number) => void,
|
|
557
|
+
scale?: number = 1
|
|
558
|
+
);
|
|
559
|
+
removeHorizontalListener();
|
|
560
|
+
removeVerticalListener();
|
|
561
|
+
removeScrollListener();
|
|
562
|
+
removeAllListeners();
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
export function extend(
|
|
566
|
+
publicAPI: object,
|
|
567
|
+
model: object,
|
|
568
|
+
initialValues?: IMouseRangeManipulatorInitialValues
|
|
569
|
+
): void;
|
|
570
|
+
export function newInstance(
|
|
571
|
+
initialValues?: IMouseRangeManipulatorInitialValues
|
|
572
|
+
): vtkMouseRangeManipulator;
|
|
573
|
+
|
|
574
|
+
export declare const vtkMouseRangeManipulator: {
|
|
575
|
+
newInstance: typeof newInstance;
|
|
576
|
+
extend: typeof extend;
|
|
577
|
+
};
|
|
578
|
+
|
|
579
|
+
export default vtkMouseRangeManipulator;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
declare module '@kitware/vtk.js/Interaction/Manipulators/MouseCameraTrackballPanManipulator' {
|
|
583
|
+
import { vtkObject } from '@kitware/vtk.js/interfaces';
|
|
584
|
+
import vtkCompositeMouseManipulator, {
|
|
585
|
+
ICompositeMouseManipulatorInitialValues,
|
|
586
|
+
} from '@kitware/vtk.js/Interaction/Manipulators/CompositeMouseManipulator';
|
|
587
|
+
|
|
588
|
+
export interface IMouseCameraTrackballPanManipulatorInitialValues
|
|
589
|
+
extends ICompositeMouseManipulatorInitialValues {}
|
|
590
|
+
|
|
591
|
+
export interface vtkMouseCameraTrackballPanManipulator
|
|
592
|
+
extends vtkCompositeMouseManipulator {}
|
|
593
|
+
|
|
594
|
+
export function extend(
|
|
595
|
+
publicAPI: object,
|
|
596
|
+
model: object,
|
|
597
|
+
initialValues?: IMouseCameraTrackballPanManipulatorInitialValues
|
|
598
|
+
): void;
|
|
599
|
+
export function newInstance(
|
|
600
|
+
initialValues?: IMouseCameraTrackballPanManipulatorInitialValues
|
|
601
|
+
): vtkMouseCameraTrackballPanManipulator;
|
|
602
|
+
|
|
603
|
+
export declare const vtkMouseCameraTrackballPanManipulator: {
|
|
604
|
+
newInstance: typeof newInstance;
|
|
605
|
+
extend: typeof extend;
|
|
606
|
+
};
|
|
607
|
+
|
|
608
|
+
export default vtkMouseCameraTrackballPanManipulator;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
declare module '@kitware/vtk.js/Interaction/Manipulators/MouseCameraTrackballZoomManipulator' {
|
|
612
|
+
import { vtkObject } from '@kitware/vtk.js/interfaces';
|
|
613
|
+
import vtkCompositeMouseManipulator, {
|
|
614
|
+
ICompositeMouseManipulatorInitialValues,
|
|
615
|
+
} from '@kitware/vtk.js/Interaction/Manipulators/CompositeMouseManipulator';
|
|
616
|
+
|
|
617
|
+
export interface IMouseCameraTrackballZoomManipulatorInitialValues
|
|
618
|
+
extends ICompositeMouseManipulatorInitialValues {}
|
|
619
|
+
|
|
620
|
+
export interface vtkMouseCameraTrackballZoomManipulator
|
|
621
|
+
extends vtkCompositeMouseManipulator {}
|
|
622
|
+
|
|
623
|
+
export function extend(
|
|
624
|
+
publicAPI: object,
|
|
625
|
+
model: object,
|
|
626
|
+
initialValues?: IMouseCameraTrackballZoomManipulatorInitialValues
|
|
627
|
+
): void;
|
|
628
|
+
export function newInstance(
|
|
629
|
+
initialValues?: IMouseCameraTrackballZoomManipulatorInitialValues
|
|
630
|
+
): vtkMouseCameraTrackballZoomManipulator;
|
|
631
|
+
|
|
632
|
+
export declare const vtkMouseCameraTrackballZoomManipulator: {
|
|
633
|
+
newInstance: typeof newInstance;
|
|
634
|
+
extend: typeof extend;
|
|
635
|
+
};
|
|
636
|
+
|
|
637
|
+
export default vtkMouseCameraTrackballZoomManipulator;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
declare module '@kitware/vtk.js/Interaction/Manipulators/MouseCameraTrackballZoomToMouseManipulator' {
|
|
641
|
+
import vtkMouseCameraTrackballZoomManipulator, {
|
|
642
|
+
IMouseCameraTrackballZoomManipulatorInitialValues,
|
|
643
|
+
} from '@kitware/vtk.js/Interaction/Manipulators/MouseCameraTrackballZoomManipulator';
|
|
644
|
+
export interface IMouseCameraTrackballZoomToMouseManipulator
|
|
645
|
+
extends IMouseCameraTrackballZoomManipulatorInitialValues {}
|
|
646
|
+
|
|
647
|
+
export interface vtkMouseCameraTrackballZoomToMouseManipulator
|
|
648
|
+
extends vtkMouseCameraTrackballZoomManipulator {}
|
|
649
|
+
|
|
650
|
+
export function extend(
|
|
651
|
+
publicAPI: object,
|
|
652
|
+
model: object,
|
|
653
|
+
initialValues?: IMouseCameraTrackballZoomToMouseManipulatorInitialValues
|
|
654
|
+
): void;
|
|
655
|
+
export function newInstance(
|
|
656
|
+
initialValues?: IMouseCameraTrackballZoomToMouseManipulatorInitialValues
|
|
657
|
+
): vtkMouseCameraTrackballZoomToMouseManipulator;
|
|
658
|
+
|
|
659
|
+
export declare const vtkMouseCameraTrackballZoomToMouseManipulator: {
|
|
660
|
+
newInstance: typeof newInstance;
|
|
661
|
+
extend: typeof extend;
|
|
662
|
+
};
|
|
663
|
+
|
|
664
|
+
export default vtkMouseCameraTrackballZoomToMouseManipulator;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
declare module '@kitware/vtk.js/Interaction/Style/InteractorStyleManipulator/Presets' {
|
|
668
|
+
export default any;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
declare module '@kitware/vtk.js/Common/DataModel/ITKHelper';
|
|
672
|
+
|
|
673
|
+
declare module '@kitware/vtk.js/Rendering/Core/ColorTransferFunction/ColorMaps' {
|
|
674
|
+
export declare const vtkColorMaps: {
|
|
675
|
+
addPreset(preset: any): void;
|
|
676
|
+
removePresetByName(name: string): void;
|
|
677
|
+
getPresetByName(name: string): any;
|
|
678
|
+
rgbPresetNames: string[];
|
|
679
|
+
};
|
|
680
|
+
export default vtkColorMaps;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
declare module '@kitware/vtk.js/Widgets/Core/WidgetState' {
|
|
684
|
+
import { vtkObject } from '@kitware/vtk.js/interfaces';
|
|
685
|
+
|
|
686
|
+
export interface vtkWidgetState extends vtkObject {
|
|
687
|
+
setActive(active: boolean): boolean;
|
|
688
|
+
getActive(): boolean;
|
|
689
|
+
bindState(subState: vtkWidgetState, labels?: string | string[]): void;
|
|
690
|
+
unbindState(subState: vtkWidgetState): void;
|
|
691
|
+
unbindAll(): void;
|
|
692
|
+
activate(): void;
|
|
693
|
+
deactivate(excludingState?: vtkWidgetState): void;
|
|
694
|
+
activateOnly(subState: vtkWidgetState): void;
|
|
695
|
+
getStatesWithLabel(label: string): vtkWidgetState[];
|
|
696
|
+
getAllNestedStates(): vtkWidgetState[];
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
export default vtkWidgetState;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
declare module '@kitware/vtk.js/Rendering/Core/InteractorObserver' {
|
|
703
|
+
import { vtkObject } from '@kitware/vtk.js/interfaces';
|
|
704
|
+
import vtkRenderWindowInteractor from '@kitware/vtk.js/Rendering/Core/RenderWindowInteractor';
|
|
705
|
+
import vtkRenderer from '@kitware/vtk.js/Rendering/Core/Renderer';
|
|
706
|
+
import { Vector3 } from '@kitware/vtk.js/types';
|
|
707
|
+
import { EventHandler } from '@kitware/vtk.js/interfaces-additions';
|
|
708
|
+
import { vtkSubscription } from '@kitware/vtk.js/interfaces';
|
|
709
|
+
|
|
710
|
+
export interface vtkInteractorObserver extends vtkObject {
|
|
711
|
+
invokeInteractionEvent(...args: any[]): void;
|
|
712
|
+
onInteractionEvent(cb: EventHandler, priority?: number): vtkSubscription;
|
|
713
|
+
invokeStartInteractionEvent(...args: any[]): void;
|
|
714
|
+
onStartInteractionEvent(
|
|
715
|
+
cb: EventHandler,
|
|
716
|
+
priority?: number
|
|
717
|
+
): vtkSubscription;
|
|
718
|
+
invokeEndInteractionEvent(...args: any[]): void;
|
|
719
|
+
onEndInteractionEvent(cb: EventHandler, priority?: number): vtkSubscription;
|
|
720
|
+
|
|
721
|
+
getInteractor(): vtkRenderWindowInteractor;
|
|
722
|
+
getEnabled(): boolean;
|
|
723
|
+
setPriority(priority: number): void;
|
|
724
|
+
getPriority(): number;
|
|
725
|
+
setProcessEvents(processEvents: boolean): boolean;
|
|
726
|
+
getProcessEvents(): boolean;
|
|
727
|
+
|
|
728
|
+
setInteractor(int: vtkRenderWindowInteractor): void;
|
|
729
|
+
setEnabled(enable: boolean): void;
|
|
730
|
+
computeWorldToDisplay(
|
|
731
|
+
renderer: vtkRenderer,
|
|
732
|
+
x: number,
|
|
733
|
+
y: number,
|
|
734
|
+
z: number
|
|
735
|
+
): Vector3;
|
|
736
|
+
computeDisplayToWorld(
|
|
737
|
+
renderer: vtkRenderer,
|
|
738
|
+
x: number,
|
|
739
|
+
y: number,
|
|
740
|
+
z: number
|
|
741
|
+
): Vector3;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
export default vtkInteractorObserver;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
declare module '@kitware/vtk.js/Widgets/Core/AbstractWidget' {
|
|
748
|
+
import { vtkObject } from '@kitware/vtk.js/interfaces';
|
|
749
|
+
import vtkWidgetState from '@kitware/vtk.js/Widgets/Core/WidgetState';
|
|
750
|
+
import vtkProp from '@kitware/vtk.js/Rendering/Core/Prop';
|
|
751
|
+
import vtkWidgetRepresentation from '@kitware/vtk.js/Widgets/Representations/WidgetRepresentation';
|
|
752
|
+
import vtkInteractorObserver from '@kitware/vtk.js/Rendering/Core/InteractorObserver';
|
|
753
|
+
import vtkWidgetManager, {
|
|
754
|
+
RenderingTypes,
|
|
755
|
+
} from '@kitware/vtk.js/Widgets/Core/WidgetManager';
|
|
756
|
+
import { EventHandler } from '@kitware/vtk.js/interfaces-additions';
|
|
757
|
+
import { Bounds } from '@kitware/vtk.js/types';
|
|
758
|
+
|
|
759
|
+
export interface vtkAbstractWidget extends vtkProp, vtkInteractorObserver {
|
|
760
|
+
getBounds(): Bounds;
|
|
761
|
+
getNestedProps(): vtkWidgetRepresentation[];
|
|
762
|
+
activateHandle(locator: {
|
|
763
|
+
selectedState: vtkWidgetState;
|
|
764
|
+
representation: vtkWidgetRepresentation;
|
|
765
|
+
}): void;
|
|
766
|
+
deactivateAllHandles(): void;
|
|
767
|
+
hasActor(actor: vtkProp): boolean;
|
|
768
|
+
grabFocus(): void;
|
|
769
|
+
loseFocus(): void;
|
|
770
|
+
hasFocus(): boolean;
|
|
771
|
+
placeWidget(bounds: Bounds): void;
|
|
772
|
+
getPlaceFactor(): number;
|
|
773
|
+
setPlaceFactor(factor: number): void;
|
|
774
|
+
getRepresentationFromActor(actor: vtkProp): vtkWidgetRepresentation;
|
|
775
|
+
updateRepresentationForRender(renderingType: RenderingTypes): void;
|
|
776
|
+
getViewWidgets(): vtkAbstractWidget[];
|
|
777
|
+
setContextVisibility(visible: boolean): boolean;
|
|
778
|
+
getContextVisibility(): boolean;
|
|
779
|
+
setHandleVisibility(visible: boolean): boolean;
|
|
780
|
+
getHandleVisibility(): boolean;
|
|
781
|
+
setWidgetManager(wm: vtkWidgetManager): boolean;
|
|
782
|
+
getWidgetManager(): vtkWidgetManager;
|
|
783
|
+
getRepresentations(): vtkWidgetRepresentation[];
|
|
784
|
+
getWidgetState(): vtkWidgetState;
|
|
785
|
+
onActivateHandle(cb: EventHandler, priority?: number): void;
|
|
786
|
+
invokeActivateHandle(...args: any[]): void;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
export default vtkAbstractWidget;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
declare module '@kitware/vtk.js/Widgets/Core/AbstractWidgetFactory' {
|
|
793
|
+
import { vtkObject } from '@kitware/vtk.js/interfaces';
|
|
794
|
+
import vtkRenderer from '@kitware/vtk.js/Rendering/Core/Renderer';
|
|
795
|
+
import vtkAbstractWidget from '@kitware/vtk.js/Widgets/Core/AbstractWidget';
|
|
796
|
+
import { ViewTypes } from '@kitware/vtk.js/Widgets/Core/WidgetManager';
|
|
797
|
+
import vtkWidgetState from '@kitware/vtk.js/Widgets/Core/WidgetState';
|
|
798
|
+
import { Bounds } from '@kitware/vtk.js/types';
|
|
799
|
+
|
|
800
|
+
export interface vtkAbstractWidgetFactory extends vtkObject {
|
|
801
|
+
getWidgetForView(locator: {
|
|
802
|
+
viewId: string;
|
|
803
|
+
renderer: vtkRenderer;
|
|
804
|
+
viewType: ViewTypes;
|
|
805
|
+
initialValues?: object;
|
|
806
|
+
}): vtkAbstractWidget | null;
|
|
807
|
+
getViewIds(): string[];
|
|
808
|
+
setVisibility(visible: boolean): void;
|
|
809
|
+
setPickable(pickable: boolean): void;
|
|
810
|
+
setDragable(dragable: boolean): void;
|
|
811
|
+
setContextVisibility(visible: boolean): void;
|
|
812
|
+
setHandleVisibility(visible: boolean): void;
|
|
813
|
+
placeWidget(bounds: Bounds);
|
|
814
|
+
getPlaceFactor(): number;
|
|
815
|
+
setPlaceFactor(factor: number): void;
|
|
816
|
+
getWidgetState(): vtkWidgetState;
|
|
817
|
+
invokeWidgetChangeEvent(...args: any[]): void;
|
|
818
|
+
onWidgetChangeEvent(cb: EventHandler, priority?: number): void;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
export interface IAbstractWidgetFactoryInitialValues {
|
|
822
|
+
widgetState?: vtkWidgetState;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
export function extend(
|
|
826
|
+
publicAPI: object,
|
|
827
|
+
model: object,
|
|
828
|
+
initialValues?: IAbstractWidgetFactoryInitialValues
|
|
829
|
+
);
|
|
830
|
+
|
|
831
|
+
export function newInstance(
|
|
832
|
+
initialValues?: IAbstractWidgetFactoryInitialValues
|
|
833
|
+
): vtkAbstractWidgetFactory;
|
|
834
|
+
|
|
835
|
+
export declare const vtkAbstractWidgetFactory: {
|
|
836
|
+
extend: typeof extend;
|
|
837
|
+
};
|
|
838
|
+
export default vtkAbstractWidgetFactory;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
declare module '@kitware/vtk.js/Widgets/Core/WidgetManager' {
|
|
842
|
+
import { vtkObject } from '@kitware/vtk.js/interfaces';
|
|
843
|
+
import vtkSelectionNode from '@kitware/vtk.js/Common/DataModel/SelectionNode';
|
|
844
|
+
import vtkRenderer from '@kitware/vtk.js/Rendering/Core/Renderer';
|
|
845
|
+
import vtkProp from '@kitware/vtk.js/Rendering/Core/Prop';
|
|
846
|
+
import vtkAbstractWidgetFactory from '@kitware/vtk.js/Widgets/Core/AbstractWidgetFactory';
|
|
847
|
+
import vtkAbstractWidget from '@kitware/vtk.js/Widgets/Core/AbstractWidget';
|
|
848
|
+
import vtkWidgetRepresentation from '@kitware/vtk.js/Widgets/Representations/WidgetRepresentation';
|
|
849
|
+
|
|
850
|
+
export enum RenderingTypes {
|
|
851
|
+
PICKING_BUFFER = 0,
|
|
852
|
+
FRONT_BUFFER = 1,
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
export enum CaptureOn {
|
|
856
|
+
MOUSE_MOVE = 0,
|
|
857
|
+
MOUSE_RELEASE = 1,
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
export enum ViewTypes {
|
|
861
|
+
DEFAULT = 0,
|
|
862
|
+
GEOMETRY = 1,
|
|
863
|
+
SLICE = 2,
|
|
864
|
+
VOLUME = 3,
|
|
865
|
+
YZ_PLANE = 4, // Sagittal
|
|
866
|
+
XZ_PLANE = 5, // Coronal
|
|
867
|
+
XY_PLANE = 6, // Axial
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
export interface SelectedData {
|
|
871
|
+
requestCount: number;
|
|
872
|
+
propID: number;
|
|
873
|
+
compositeID: number;
|
|
874
|
+
prop: vtkProp;
|
|
875
|
+
widget: vtkAbstractWidget;
|
|
876
|
+
representation: vtkWidgetRepresentation;
|
|
877
|
+
selectedState: vtkWidgetState;
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
export interface vtkWidgetManager extends vtkObject {
|
|
881
|
+
setCaptureOn(cap: CaptureOn): boolean;
|
|
882
|
+
getCaptureOn(): CaptureOn;
|
|
883
|
+
setViewType(type: ViewTypes): boolean;
|
|
884
|
+
getViewType(): ViewTypes;
|
|
885
|
+
getSelections(): vtkSelectionNode[];
|
|
886
|
+
getWidgets(): vtkAbstractWidget[];
|
|
887
|
+
getViewId(): string;
|
|
888
|
+
getPickingEnabled(): boolean;
|
|
889
|
+
/**
|
|
890
|
+
* @deprecated
|
|
891
|
+
*/
|
|
892
|
+
getUseSvgLayer(): boolean;
|
|
893
|
+
/**
|
|
894
|
+
* @deprecated
|
|
895
|
+
*/
|
|
896
|
+
setUseSvgLayer(use: boolean): boolean;
|
|
897
|
+
|
|
898
|
+
enablePicking(): void;
|
|
899
|
+
renderWidgets(): void;
|
|
900
|
+
disablePicking(): void;
|
|
901
|
+
setRenderer(ren: vtkRenderer): void;
|
|
902
|
+
addWidget(
|
|
903
|
+
widget: vtkAbstractWidgetFactory,
|
|
904
|
+
viewType?: ViewTypes,
|
|
905
|
+
initialValues?: object
|
|
906
|
+
): vtkAbstractWidget | null;
|
|
907
|
+
removeWidgets(): void;
|
|
908
|
+
removeWidget(widget: vtkAbstractWidget | vtkAbstractWidgetFactory): void;
|
|
909
|
+
getSelectedDataForXY(x: number, y: number): Promise<SelectedData>;
|
|
910
|
+
updateSelectionFromXY(x: number, y: number): void;
|
|
911
|
+
updateSelectionFromMouseEvent(event: MouseEvent): void;
|
|
912
|
+
getSelectedData(): SelectedData | {};
|
|
913
|
+
grabFocus(widget: vtkAbstractWidget | vtkAbstractWidgetFactory): void;
|
|
914
|
+
releaseFocus(): void;
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
export interface IWidgetManagerInitialValues {
|
|
918
|
+
captureOn?: CaptureOn;
|
|
919
|
+
viewType?: ViewTypes;
|
|
920
|
+
pickingEnabled?: boolean;
|
|
921
|
+
/**
|
|
922
|
+
* @deprecated
|
|
923
|
+
*/
|
|
924
|
+
useSvgLayer?: boolean;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
export function extend(
|
|
928
|
+
publicAPI: object,
|
|
929
|
+
model: object,
|
|
930
|
+
initialValues?: IWidgetManagerInitialValues
|
|
931
|
+
): vtkWidgetManager;
|
|
932
|
+
|
|
933
|
+
export function newInstance(
|
|
934
|
+
initialValues?: IWidgetManagerInitialValues
|
|
935
|
+
): vtkWidgetManager;
|
|
936
|
+
|
|
937
|
+
export declare const vtkWidgetManager: {
|
|
938
|
+
newInstance: typeof newInstance;
|
|
939
|
+
extend: typeof extend;
|
|
940
|
+
};
|
|
941
|
+
export default vtkWidgetManager;
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
declare module '@kitware/vtk.js/Widgets/Core/StateBuilder' {
|
|
945
|
+
import vtkWidgetState from '@kitware/vtk.js/Widgets/Core/WidgetState';
|
|
946
|
+
|
|
947
|
+
export interface StateBuilder {
|
|
948
|
+
addDynamicMixinState(buildInfo: {
|
|
949
|
+
labels: string[];
|
|
950
|
+
mixins: string[];
|
|
951
|
+
name: string;
|
|
952
|
+
initialValues?: object;
|
|
953
|
+
}): StateBuilder;
|
|
954
|
+
addStateFromMixin(buildInfo: {
|
|
955
|
+
labels: string[];
|
|
956
|
+
mixins: string[];
|
|
957
|
+
name: string;
|
|
958
|
+
initialValues?: object;
|
|
959
|
+
}): StateBuilder;
|
|
960
|
+
addStateFromInstance(stateInfo: {
|
|
961
|
+
labels: string[];
|
|
962
|
+
name: string;
|
|
963
|
+
instance: vtkWidgetState;
|
|
964
|
+
});
|
|
965
|
+
addField(field: { name: string; initialValue: any });
|
|
966
|
+
build(...mixins: string[]): vtkWidgetState;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
export function createBuilder(): StateBuilder;
|
|
970
|
+
|
|
971
|
+
export declare const vtkStateBuilder: {
|
|
972
|
+
createBuilder: typeof createBuilder;
|
|
973
|
+
};
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
declare module '@kitware/vtk.js/Common/DataModel/BoundingBox' {
|
|
977
|
+
import { Bounds } from '@kitware/vtk.js/types';
|
|
978
|
+
export function inflate(bounds: Bounds, delta: number);
|
|
979
|
+
export function getDiagonalLength(bounds: Bounds): number;
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
declare module '@kitware/vtk.js/IO/XML/XMLImageDataWriter' {
|
|
983
|
+
export declare const vtkXMLImageDataWriter: {
|
|
984
|
+
newInstance: typeof newInstance;
|
|
985
|
+
extend: typeof extend;
|
|
986
|
+
};
|
|
987
|
+
|
|
988
|
+
export default vtkXMLImageDataWriter;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
declare module '@kitware/vtk.js/Widgets/Widgets3D/ImageCroppingWidget' {
|
|
992
|
+
import vtkAbstractWidget from '@kitware/vtk.js/Widgets/Core/AbstractWidget';
|
|
993
|
+
import vtkAbstractWidgetFactory from '@kitware/vtk.js/Widgets/Core/AbstractWidgetFactory';
|
|
994
|
+
import vtkPlaneManipulator from '@kitware/vtk.js/Widgets/Manipulators/PlaneManipulator';
|
|
995
|
+
import vtkLineManipulator from '@kitware/vtk.js/Widgets/Manipulators/LineManipulator';
|
|
996
|
+
import { mat4, vec3 } from 'gl-matrix';
|
|
997
|
+
import vtkImageData from '@kitware/vtk.js/Common/DataModel/ImageData';
|
|
998
|
+
import vtkWidgetState from '@kitware/vtk.js/Widgets/Core/WidgetState';
|
|
999
|
+
import { Bounds } from '@kitware/vtk.js/types';
|
|
1000
|
+
|
|
1001
|
+
export interface ImageCroppingPlanesState extends vtkWidgetState {
|
|
1002
|
+
getPlanes(): [number, number, number, number, number, number];
|
|
1003
|
+
setPlanes(
|
|
1004
|
+
planes: [number, number, number, number, number, number]
|
|
1005
|
+
): boolean;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
export interface ImageCroppingWidgetState extends vtkWidgetState {
|
|
1009
|
+
getIndexToWorldT(): mat4;
|
|
1010
|
+
setIndexToWorldT(transform: mat4): boolean;
|
|
1011
|
+
getWorldToIndexT(): mat4;
|
|
1012
|
+
setWorldToIndexT(transform: mat4): boolean;
|
|
1013
|
+
getCroppingPlanes(): ImageCroppingPlanesState;
|
|
1014
|
+
placeWidget(bounds: Bounds): void;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
export interface vtkImageCroppingViewWidget extends vtkAbstractWidget {
|
|
1018
|
+
setManipulator(manipulator: vtkPlaneManipulator): boolean;
|
|
1019
|
+
getManipulator(): vtkPlaneManipulator;
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
export interface vtkImageCroppingWidget extends vtkAbstractWidgetFactory {
|
|
1023
|
+
getWidgetState(): ImageCroppingWidgetState;
|
|
1024
|
+
getCornerManipulator(): vtkPlaneManipulator;
|
|
1025
|
+
getEdgeManipulator(): vtkPlaneManipulator;
|
|
1026
|
+
getFaceManipulator(): vtkLineManipulator;
|
|
1027
|
+
setCornerManipulator(manip: vtkPlaneManipulator): boolean;
|
|
1028
|
+
setEdgeManipulator(manip: vtkPlaneManipulator): boolean;
|
|
1029
|
+
setFaceManipulator(manip: vtkLineManipulator): boolean;
|
|
1030
|
+
copyImageDataDescription(image: vtkImageData);
|
|
1031
|
+
setFaceHandlesEnabled(enabled: boolean): void;
|
|
1032
|
+
setCornerHandlesEnabled(enabled: boolean): void;
|
|
1033
|
+
setEdgeHandlesEnabled(enabled: boolean): void;
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
export function newInstance(): vtkImageCroppingWidget;
|
|
1037
|
+
|
|
1038
|
+
export declare const vtkImageCroppingWidget: {
|
|
1039
|
+
newInstance: typeof newInstance;
|
|
1040
|
+
};
|
|
1041
|
+
export default vtkImageCroppingWidget;
|
|
1042
|
+
}
|