larvitar 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/build-docs.yml +1 -1
- package/.github/workflows/deploy.yml +4 -4
- package/README.md +3 -3
- package/modules/vuex/larvitar.js +1 -0
- package/package.json +1 -1
- package/docs/documentation/Mixins.polygonSegmentationMixin%20-%20segmentation%20operations%20for%20polyline.html +0 -171
- package/docs/documentation/Tools.Annotation.ContoursTool.html +0 -218
- package/docs/documentation/Tools.Annotation.DiameterTool.html +0 -219
- package/docs/documentation/Tools.Annotation.SeedsTool.html +0 -214
- package/docs/documentation/Tools.Brush.BrushTool.html +0 -218
- package/docs/documentation/Tools.Brush.ThresholdsBrushTool.html +0 -218
- package/docs/documentation/Tools.PolylineScissorsTool.html +0 -218
- package/docs/documentation/fonts/Montserrat/Montserrat-Bold.eot +0 -0
- package/docs/documentation/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
- package/docs/documentation/fonts/Montserrat/Montserrat-Bold.woff +0 -0
- package/docs/documentation/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
- package/docs/documentation/fonts/Montserrat/Montserrat-Regular.eot +0 -0
- package/docs/documentation/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/docs/documentation/fonts/Montserrat/Montserrat-Regular.woff +0 -0
- package/docs/documentation/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
- package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
- package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -978
- package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
- package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
- package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
- package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
- package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -1049
- package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
- package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
- package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
- package/docs/documentation/global.html +0 -1303
- package/docs/documentation/imageAnonymization.js.html +0 -245
- package/docs/documentation/imageColormaps.js.html +0 -283
- package/docs/documentation/imageContours.js.html +0 -278
- package/docs/documentation/imageIo.js.html +0 -291
- package/docs/documentation/imageLayers.js.html +0 -188
- package/docs/documentation/imageLoading.js.html +0 -297
- package/docs/documentation/imageParsing.js.html +0 -385
- package/docs/documentation/imagePresets.js.html +0 -207
- package/docs/documentation/imageRendering.js.html +0 -849
- package/docs/documentation/imageReslice.js.html +0 -162
- package/docs/documentation/imageStore.js.html +0 -360
- package/docs/documentation/imageTools.js.html +0 -784
- package/docs/documentation/imageUtils.js.html +0 -1609
- package/docs/documentation/image_colormaps.js.html +0 -283
- package/docs/documentation/image_contours.js.html +0 -279
- package/docs/documentation/image_io.js.html +0 -288
- package/docs/documentation/image_layers.js.html +0 -188
- package/docs/documentation/image_loading.js.html +0 -294
- package/docs/documentation/image_parsing.js.html +0 -391
- package/docs/documentation/image_presets.js.html +0 -207
- package/docs/documentation/image_rendering.js.html +0 -845
- package/docs/documentation/image_reslice.js.html +0 -164
- package/docs/documentation/image_store.js.html +0 -359
- package/docs/documentation/image_tools.js.html +0 -792
- package/docs/documentation/image_utils.js.html +0 -1609
- package/docs/documentation/index.html +0 -175
- package/docs/documentation/loaders_commonLoader.js.html +0 -306
- package/docs/documentation/loaders_dicomLoader.js.html +0 -130
- package/docs/documentation/loaders_fileLoader.js.html +0 -155
- package/docs/documentation/loaders_multiframeLoader.js.html +0 -443
- package/docs/documentation/loaders_niftiLoader.js.html +0 -150
- package/docs/documentation/loaders_nrrdLoader.js.html +0 -545
- package/docs/documentation/loaders_resliceLoader.js.html +0 -258
- package/docs/documentation/module-imaging_contours.html +0 -954
- package/docs/documentation/module-imaging_imageAnonymization.html +0 -544
- package/docs/documentation/module-imaging_imageColormaps.html +0 -1012
- package/docs/documentation/module-imaging_imageContours.html +0 -954
- package/docs/documentation/module-imaging_imageIo.html +0 -1057
- package/docs/documentation/module-imaging_imageLayers.html +0 -904
- package/docs/documentation/module-imaging_imageLoading.html +0 -1301
- package/docs/documentation/module-imaging_imageParsing.html +0 -1356
- package/docs/documentation/module-imaging_imagePresets.html +0 -679
- package/docs/documentation/module-imaging_imageRendering.html +0 -3223
- package/docs/documentation/module-imaging_imageReslice.html +0 -413
- package/docs/documentation/module-imaging_imageStore-Larvitar_Store.html +0 -284
- package/docs/documentation/module-imaging_imageStore.html +0 -1560
- package/docs/documentation/module-imaging_imageTools.html +0 -3617
- package/docs/documentation/module-imaging_imageUtils.html +0 -7253
- package/docs/documentation/module-imaging_io.html +0 -1057
- package/docs/documentation/module-imaging_layers.html +0 -904
- package/docs/documentation/module-imaging_loading.html +0 -1301
- package/docs/documentation/module-imaging_parsing.html +0 -1375
- package/docs/documentation/module-imaging_presets.html +0 -679
- package/docs/documentation/module-imaging_rendering.html +0 -8094
- package/docs/documentation/module-imaging_reslice.html +0 -411
- package/docs/documentation/module-imaging_store-Larvitar_Store.html +0 -284
- package/docs/documentation/module-imaging_store.html +0 -1537
- package/docs/documentation/module-imaging_strategies_eraseFreehand.html +0 -708
- package/docs/documentation/module-imaging_strategies_fillFreehand.html +0 -708
- package/docs/documentation/module-imaging_tools.html +0 -3617
- package/docs/documentation/module-imaging_tools_custom_contourTool.html +0 -207
- package/docs/documentation/module-imaging_tools_custom_diameterTool.html +0 -205
- package/docs/documentation/module-imaging_tools_custom_editMaskTool.html +0 -205
- package/docs/documentation/module-imaging_tools_custom_polygonScissorsTool.html +0 -203
- package/docs/documentation/module-imaging_tools_custom_thresholdBrushTool.html +0 -684
- package/docs/documentation/module-imaging_tools_default.html +0 -205
- package/docs/documentation/module-imaging_tools_interaction.html +0 -530
- package/docs/documentation/module-imaging_tools_io.html +0 -832
- package/docs/documentation/module-imaging_tools_main.html +0 -2028
- package/docs/documentation/module-imaging_tools_polygonSegmentationMixin.html +0 -567
- package/docs/documentation/module-imaging_tools_segmentation.html +0 -3586
- package/docs/documentation/module-imaging_tools_state.html +0 -494
- package/docs/documentation/module-imaging_utils.html +0 -7253
- package/docs/documentation/module-loaders_commonLoader.html +0 -1313
- package/docs/documentation/module-loaders_dicomLoader.html +0 -522
- package/docs/documentation/module-loaders_fileLoader.html +0 -593
- package/docs/documentation/module-loaders_multiframeLoader.html +0 -1169
- package/docs/documentation/module-loaders_niftiLoader.html +0 -565
- package/docs/documentation/module-loaders_nrrdLoader.html +0 -1459
- package/docs/documentation/module-loaders_resliceLoader.html +0 -590
- package/docs/documentation/module-monitors_memory.html +0 -980
- package/docs/documentation/module-tools_default.html +0 -740
- package/docs/documentation/module.exports_module.exports.html +0 -203
- package/docs/documentation/monitors_memory.js.html +0 -189
- package/docs/documentation/parsers_nrrd.js.html +0 -569
- package/docs/documentation/scripts/collapse.js +0 -20
- package/docs/documentation/scripts/linenumber.js +0 -25
- package/docs/documentation/scripts/nav.js +0 -12
- package/docs/documentation/scripts/polyfill.js +0 -4
- package/docs/documentation/scripts/prettify/Apache-License-2.0.txt +0 -202
- package/docs/documentation/scripts/prettify/lang-css.js +0 -2
- package/docs/documentation/scripts/prettify/prettify.js +0 -28
- package/docs/documentation/scripts/search.js +0 -83
- package/docs/documentation/styles/jsdoc.css +0 -765
- package/docs/documentation/styles/prettify.css +0 -80
- package/docs/documentation/tools_contourTool.js.html +0 -1963
- package/docs/documentation/tools_custom_contourTool.js.html +0 -1968
- package/docs/documentation/tools_custom_diameterTool.js.html +0 -225
- package/docs/documentation/tools_custom_editMaskTool.js.html +0 -225
- package/docs/documentation/tools_custom_polylineScissorsTool.js.html +0 -143
- package/docs/documentation/tools_custom_thresholdsBrushTool.js.html +0 -245
- package/docs/documentation/tools_default.js.html +0 -576
- package/docs/documentation/tools_diameterTool.js.html +0 -219
- package/docs/documentation/tools_editMaskTool.js.html +0 -219
- package/docs/documentation/tools_interaction.js.html +0 -258
- package/docs/documentation/tools_io.js.html +0 -297
- package/docs/documentation/tools_main.js.html +0 -443
- package/docs/documentation/tools_polygonSegmentationMixin.js.html +0 -329
- package/docs/documentation/tools_polylineScissorsTool.js.html +0 -136
- package/docs/documentation/tools_seedTool.js.html +0 -423
- package/docs/documentation/tools_segmentation.js.html +0 -558
- package/docs/documentation/tools_state.js.html +0 -163
- package/docs/documentation/tools_strategies_eraseFreehand.js.html +0 -160
- package/docs/documentation/tools_strategies_fillFreehand.js.html +0 -163
- package/docs/documentation/tools_thresholdsBrushTool.js.html +0 -239
- package/docs/documentation/tools_tools.default.js.html +0 -569
- package/docs/documentation/tools_tools.interaction.js.html +0 -251
- package/docs/documentation/tools_tools.io.js.html +0 -288
- package/docs/documentation/tools_tools.main.js.html +0 -442
- package/docs/documentation/tools_tools.segmentation.js.html +0 -445
- package/docs/documentation/tools_tools.state.js.html +0 -157
- package/docs/examples/base.html +0 -170
- package/docs/examples/colorMaps.html +0 -181
- package/docs/examples/defaultTools.html +0 -246
- package/docs/examples/demo/anon1 +0 -0
- package/docs/examples/demo/anon10 +0 -0
- package/docs/examples/demo/anon11 +0 -0
- package/docs/examples/demo/anon12 +0 -0
- package/docs/examples/demo/anon13 +0 -0
- package/docs/examples/demo/anon14 +0 -0
- package/docs/examples/demo/anon15 +0 -0
- package/docs/examples/demo/anon16 +0 -0
- package/docs/examples/demo/anon17 +0 -0
- package/docs/examples/demo/anon18 +0 -0
- package/docs/examples/demo/anon19 +0 -0
- package/docs/examples/demo/anon2 +0 -0
- package/docs/examples/demo/anon20 +0 -0
- package/docs/examples/demo/anon21 +0 -0
- package/docs/examples/demo/anon22 +0 -0
- package/docs/examples/demo/anon23 +0 -0
- package/docs/examples/demo/anon24 +0 -0
- package/docs/examples/demo/anon3 +0 -0
- package/docs/examples/demo/anon4 +0 -0
- package/docs/examples/demo/anon5 +0 -0
- package/docs/examples/demo/anon6 +0 -0
- package/docs/examples/demo/anon7 +0 -0
- package/docs/examples/demo/anon8 +0 -0
- package/docs/examples/demo/anon9 +0 -0
- package/docs/examples/demo/example.nrrd +0 -0
- package/docs/examples/demo/segmentation.nrrd +0 -0
- package/docs/examples/demo/xa_integris.dcm +0 -0
- package/docs/examples/index.html +0 -129
- package/docs/examples/larvitar.js +0 -108623
- package/docs/examples/layers.html +0 -250
- package/docs/examples/masks.html +0 -273
- package/docs/examples/multiframe.html +0 -200
- package/docs/examples/nrrd.html +0 -96
- package/docs/examples/reslice.html +0 -174
- package/docs/index.html +0 -92
|
@@ -1,569 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
|
|
5
|
-
<meta charset="utf-8">
|
|
6
|
-
<title>tools/tools.default.js - Larvitar</title>
|
|
7
|
-
|
|
8
|
-
<meta name="description" content="Dicom Image Toolkit for CornestoneJS" />
|
|
9
|
-
|
|
10
|
-
<meta name="keywords" content="imaging, dataviz, medical, cornerstone" />
|
|
11
|
-
<meta name="keyword" content="imaging, dataviz, medical, cornerstone" />
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<script src="scripts/prettify/prettify.js"></script>
|
|
16
|
-
<script src="scripts/prettify/lang-css.js"></script>
|
|
17
|
-
<!--[if lt IE 9]>
|
|
18
|
-
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
19
|
-
<![endif]-->
|
|
20
|
-
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
|
|
21
|
-
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
|
|
22
|
-
<script src="scripts/nav.js" defer></script>
|
|
23
|
-
|
|
24
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
25
|
-
</head>
|
|
26
|
-
<body>
|
|
27
|
-
|
|
28
|
-
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
|
|
29
|
-
<label for="nav-trigger" class="navicon-button x">
|
|
30
|
-
<div class="navicon"></div>
|
|
31
|
-
</label>
|
|
32
|
-
|
|
33
|
-
<label for="nav-trigger" class="overlay"></label>
|
|
34
|
-
|
|
35
|
-
<nav >
|
|
36
|
-
|
|
37
|
-
<input type="text" id="nav-search" placeholder="Search" />
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<h2><a href="index.html">Home</a></h2><h2><a href="https://github.com/dvisionlab/Larvitar" target="_blank" class="menu-item" id="repository" >Github repo</a></h2><h3>Classes</h3><ul><li><a href="module.exports_module.exports.html">module.exports#module.exports</a></li><li><a href="module-imaging_store-Larvitar_Store.html">imaging/store~Larvitar_Store</a></li><li><a href="Tools.Annotation.ContoursTool.html">Tools.Annotation.ContoursTool</a></li><li><a href="Tools.Annotation.DiameterTool.html">Tools.Annotation.DiameterTool</a></li><li><a href="Tools.Brush.BrushTool.html">Tools.Brush.BrushTool</a></li><li><a href="Tools.Brush.ThresholdsBrushTool.html">Tools.Brush.ThresholdsBrushTool</a></li><li><a href="Tools.PolylineScissorsTool.html">Tools.PolylineScissorsTool</a></li></ul><h3>Modules</h3><ul><li><a href="module-imaging_anonymization.html">imaging/anonymization</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_anonymization.html#anonymize#~anonymize">anonymize</a></li><li data-type='method' style='display: none;'><a href="module-imaging_anonymization.html#encrypt#~encrypt">encrypt</a></li></ul></li><li><a href="module-imaging_contours.html">imaging/contours</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_contours.html#extractSlicePoints#extractSlicePoints">extractSlicePoints</a></li><li data-type='method' style='display: none;'><a href="module-imaging_contours.html#populateContoursObject#populateContoursObject">populateContoursObject</a></li><li data-type='method' style='display: none;'><a href="module-imaging_contours.html#parseContours#~parseContours">parseContours</a></li></ul></li><li><a href="module-imaging_io.html">imaging/io</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_io.html#buildData#~buildData">buildData</a></li><li data-type='method' style='display: none;'><a href="module-imaging_io.html#buildDataAsync#~buildDataAsync">buildDataAsync</a></li><li data-type='method' style='display: none;'><a href="module-imaging_io.html#buildHeader#~buildHeader">buildHeader</a></li><li data-type='method' style='display: none;'><a href="module-imaging_io.html#getCachedPixelData#~getCachedPixelData">getCachedPixelData</a></li><li data-type='method' style='display: none;'><a href="module-imaging_io.html#importNRRDImage#~importNRRDImage">importNRRDImage</a></li></ul></li><li><a href="module-imaging_layers.html">imaging/layers</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_layers.html#getActiveLayer#getActiveLayer">getActiveLayer</a></li><li data-type='method' style='display: none;'><a href="module-imaging_layers.html#setActiveLayer#setActiveLayer">setActiveLayer</a></li><li data-type='method' style='display: none;'><a href="module-imaging_layers.html#updateLayer#updateLayer">updateLayer</a></li><li data-type='method' style='display: none;'><a href="module-imaging_layers.html#buildLayers#~buildLayers">buildLayers</a></li></ul></li><li><a href="module-imaging_loading.html">imaging/loading</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_loading.html#initializeFileImageLoader#initializeFileImageLoader">initializeFileImageLoader</a></li><li data-type='method' style='display: none;'><a href="module-imaging_loading.html#initializeImageLoader#initializeImageLoader">initializeImageLoader</a></li><li data-type='method' style='display: none;'><a href="module-imaging_loading.html#initializeWebImageLoader#initializeWebImageLoader">initializeWebImageLoader</a></li><li data-type='method' style='display: none;'><a href="module-imaging_loading.html#registerMultiFrameImageLoader#registerMultiFrameImageLoader">registerMultiFrameImageLoader</a></li><li data-type='method' style='display: none;'><a href="module-imaging_loading.html#registerNRRDImageLoader#registerNRRDImageLoader">registerNRRDImageLoader</a></li><li data-type='method' style='display: none;'><a href="module-imaging_loading.html#registerResliceLoader#registerResliceLoader">registerResliceLoader</a></li><li data-type='method' style='display: none;'><a href="module-imaging_loading.html#updateLoadedStack#updateLoadedStack">updateLoadedStack</a></li><li data-type='method' style='display: none;'><a href="module-imaging_loading.html#isNewInstance#~isNewInstance">isNewInstance</a></li></ul></li><li><a href="module-imaging_parsing.html">imaging/parsing</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_parsing.html#clearImageParsing#clearImageParsing">clearImageParsing</a></li><li data-type='method' style='display: none;'><a href="module-imaging_parsing.html#dumpDataSet#dumpDataSet">dumpDataSet</a></li><li data-type='method' style='display: none;'><a href="module-imaging_parsing.html#readFile#readFile">readFile</a></li><li data-type='method' style='display: none;'><a href="module-imaging_parsing.html#readFiles#readFiles">readFiles</a></li><li data-type='method' style='display: none;'><a href="module-imaging_parsing.html#dumpFile#~dumpFile">dumpFile</a></li><li data-type='method' style='display: none;'><a href="module-imaging_parsing.html#dumpFiles#~dumpFiles">dumpFiles</a></li><li data-type='method' style='display: none;'><a href="module-imaging_parsing.html#parseNextFile#~parseNextFile">parseNextFile</a></li></ul></li><li><a href="module-imaging_presets.html">imaging/presets</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_presets.html#getImagePresets#getImagePresets">getImagePresets</a></li><li data-type='method' style='display: none;'><a href="module-imaging_presets.html#setImageCustomPreset#setImageCustomPreset">setImageCustomPreset</a></li><li data-type='method' style='display: none;'><a href="module-imaging_presets.html#setImagePreset#setImagePreset">setImagePreset</a></li></ul></li><li><a href="module-imaging_rendering.html">imaging/rendering</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_rendering.html#HSVToRGB#.HSVToRGB">HSVToRGB</a></li><li data-type='method' style='display: none;'><a href="module-imaging_rendering.html#addColorMap#addColorMap">addColorMap</a></li><li data-type='method' style='display: none;'><a href="module-imaging_rendering.html#applyColorMap#applyColorMap">applyColorMap</a></li><li data-type='method' style='display: none;'><a href="module-imaging_rendering.html#clearImageCache#clearImageCache">clearImageCache</a></li><li data-type='method' style='display: none;'><a href="module-imaging_rendering.html#disableViewport#disableViewport">disableViewport</a></li><li data-type='method' style='display: none;'><a href="module-imaging_rendering.html#fillPixelData#fillPixelData">fillPixelData</a></li><li data-type='method' style='display: none;'><a href="module-imaging_rendering.html#flipImageHorizontal#flipImageHorizontal">flipImageHorizontal</a></li><li data-type='method' style='display: none;'><a href="module-imaging_rendering.html#flipImageVertical#flipImageVertical">flipImageVertical</a></li><li data-type='method' style='display: none;'><a href="module-imaging_rendering.html#getColormapsList#getColormapsList">getColormapsList</a></li><li data-type='method' style='display: none;'><a href="module-imaging_rendering.html#getSeriesData#getSeriesData">getSeriesData</a></li><li data-type='method' style='display: none;'><a href="module-imaging_rendering.html#invertImage#invertImage">invertImage</a></li><li data-type='method' style='display: none;'><a href="module-imaging_rendering.html#loadAndCacheImages#loadAndCacheImages">loadAndCacheImages</a></li><li data-type='method' style='display: none;'><a href="module-imaging_rendering.html#renderImage#renderImage">renderImage</a></li><li data-type='method' style='display: none;'><a href="module-imaging_rendering.html#renderWebImage#renderWebImage">renderWebImage</a></li><li data-type='method' style='display: none;'><a href="module-imaging_rendering.html#renderWebImage#renderWebImage">renderWebImage</a></li><li data-type='method' style='display: none;'><a href="module-imaging_rendering.html#resetViewports#resetViewports">resetViewports</a></li><li data-type='method' style='display: none;'><a href="module-imaging_rendering.html#resizeViewport#resizeViewport">resizeViewport</a></li><li data-type='method' style='display: none;'><a href="module-imaging_rendering.html#rotateImageLeft#rotateImageLeft">rotateImageLeft</a></li><li data-type='method' style='display: none;'><a href="module-imaging_rendering.html#rotateImageRight#rotateImageRight">rotateImageRight</a></li><li data-type='method' style='display: none;'><a href="module-imaging_rendering.html#storeViewportData#storeViewportData">storeViewportData</a></li><li data-type='method' style='display: none;'><a href="module-imaging_rendering.html#unloadViewport#unloadViewport">unloadViewport</a></li><li data-type='method' style='display: none;'><a href="module-imaging_rendering.html#updateImage#updateImage">updateImage</a></li><li data-type='method' style='display: none;'><a href="module-imaging_rendering.html#updateViewportData#updateViewportData">updateViewportData</a></li></ul></li><li></li><li><a href="module-imaging_reslice.html">imaging/reslice</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_reslice.html#resliceSeries#resliceSeries">resliceSeries</a></li></ul></li><li><a href="module-imaging_store.html">imaging/store</a><ul class='members'><li data-type='member' style='display: none;'><a href="module-imaging_store.html#.larvitar_store">larvitar_store</a></li></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_store.html#initLarvitarStore#.initLarvitarStore">initLarvitarStore</a></li><li data-type='method' style='display: none;'><a href="module-imaging_store.html#addSeriesIds#~addSeriesIds">addSeriesIds</a></li><li data-type='method' style='display: none;'><a href="module-imaging_store.html#addViewport#~addViewport">addViewport</a></li><li data-type='method' style='display: none;'><a href="module-imaging_store.html#deleteViewport#~deleteViewport">deleteViewport</a></li><li data-type='method' style='display: none;'><a href="module-imaging_store.html#disableVuex#~disableVuex">disableVuex</a></li><li data-type='method' style='display: none;'><a href="module-imaging_store.html#enableVuex#~enableVuex">enableVuex</a></li><li data-type='method' style='display: none;'><a href="module-imaging_store.html#get#~get">get</a></li><li data-type='method' style='display: none;'><a href="module-imaging_store.html#removeSeriesIds#~removeSeriesIds">removeSeriesIds</a></li><li data-type='method' style='display: none;'><a href="module-imaging_store.html#set#~set">set</a></li></ul></li><li><a href="module-imaging_tools.html">imaging/tools</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_tools.html#addContoursTool#~addContoursTool">addContoursTool</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools.html#addDefaultTools#~addDefaultTools">addDefaultTools</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools.html#addDiameterTool#~addDiameterTool">addDiameterTool</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools.html#addMaskEditingTool#~addMaskEditingTool">addMaskEditingTool</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools.html#addSeedsTool#~addSeedsTool">addSeedsTool</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools.html#addStackStateToElement#~addStackStateToElement">addStackStateToElement</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools.html#addToolStateSingleSlice#~addToolStateSingleSlice">addToolStateSingleSlice</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools.html#clearCornerstoneElements#~clearCornerstoneElements">clearCornerstoneElements</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools.html#clearMeasurements#~clearMeasurements">clearMeasurements</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools.html#clearToolStateByName#~clearToolStateByName">clearToolStateByName</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools.html#getCurrentMaskData#~getCurrentMaskData">getCurrentMaskData</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools.html#getToolState#~getToolState">getToolState</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools.html#isToolMissing#~isToolMissing">isToolMissing</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools.html#setSegmentationConfig#~setSegmentationConfig">setSegmentationConfig</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools.html#setToolActive#~setToolActive">setToolActive</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools.html#setToolActive#~setToolActive">setToolActive</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools.html#setToolEnabled#~setToolEnabled">setToolEnabled</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools.html#setToolPassive#~setToolPassive">setToolPassive</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools.html#syncToolStack#~syncToolStack">syncToolStack</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools.html#updateDiameterTool#~updateDiameterTool">updateDiameterTool</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools.html#updateStackToolState#~updateStackToolState">updateStackToolState</a></li></ul></li><li><a href="module-imaging_utils.html">imaging/utils</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#formatDate#formatDate">formatDate</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#formatDateTime#formatDateTime">formatDateTime</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#getCmprMetadata#getCmprMetadata">getCmprMetadata</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#getDICOMTag#getDICOMTag">getDICOMTag</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#getDICOMTagCode#getDICOMTagCode">getDICOMTagCode</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#getDistanceBetweenSlices#getDistanceBetweenSlices">getDistanceBetweenSlices</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#getMaxPixelValue#getMaxPixelValue">getMaxPixelValue</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#getMeanValue#getMeanValue">getMeanValue</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#getMinPixelValue#getMinPixelValue">getMinPixelValue</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#getNormalOrientation#getNormalOrientation">getNormalOrientation</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#getPixelRepresentation#getPixelRepresentation">getPixelRepresentation</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#getPixelTypedArray#getPixelTypedArray">getPixelTypedArray</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#getReslicedIOP#getReslicedIOP">getReslicedIOP</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#getReslicedIPP#getReslicedIPP">getReslicedIPP</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#getReslicedMetadata#getReslicedMetadata">getReslicedMetadata</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#getReslicedPixeldata#getReslicedPixeldata">getReslicedPixeldata</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#getReslicedSliceLocation#getReslicedSliceLocation">getReslicedSliceLocation</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#getSortedStack#getSortedStack">getSortedStack</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#getSortedUIDs#getSortedUIDs">getSortedUIDs</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#getTagValue#getTagValue">getTagValue</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#getTypedArray#getTypedArray">getTypedArray</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#getTypedArrayFromDataType#getTypedArrayFromDataType">getTypedArrayFromDataType</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#isElement#isElement">isElement</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#isNegativeSign#isNegativeSign">isNegativeSign</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#isStringVr#isStringVr">isStringVr</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#isValidDate#isValidDate">isValidDate</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#parseAgeTag#parseAgeTag">parseAgeTag</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#parseDateTag#parseDateTag">parseDateTag</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#parseDateTimeTag#parseDateTimeTag">parseDateTimeTag</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#parseDICOMFileIDTag#parseDICOMFileIDTag">parseDICOMFileIDTag</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#parsePatientNameTag#parsePatientNameTag">parsePatientNameTag</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#parseTag#parseTag">parseTag</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#parseTimeTag#parseTimeTag">parseTimeTag</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#permuteSignedArrays#permuteSignedArrays">permuteSignedArrays</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#permuteValues#permuteValues">permuteValues</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#rand#rand">rand</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#randomId#randomId">randomId</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#sortStackCallback#sortStackCallback">sortStackCallback</a></li><li data-type='method' style='display: none;'><a href="module-imaging_utils.html#spacingArray#spacingArray">spacingArray</a></li></ul></li><li><a href="module-loaders_commonLoader.html">loaders/commonLoader</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-loaders_commonLoader.html#getImageFrame#getImageFrame">getImageFrame</a></li><li data-type='method' style='display: none;'><a href="module-loaders_commonLoader.html#getLarvitarImageTracker#getLarvitarImageTracker">getLarvitarImageTracker</a></li><li data-type='method' style='display: none;'><a href="module-loaders_commonLoader.html#getLarvitarManager#getLarvitarManager">getLarvitarManager</a></li><li data-type='method' style='display: none;'><a href="module-loaders_commonLoader.html#getSeriesDataFromLarvitarManager#getSeriesDataFromLarvitarManager">getSeriesDataFromLarvitarManager</a></li><li data-type='method' style='display: none;'><a href="module-loaders_commonLoader.html#populateLarvitarManager#populateLarvitarManager">populateLarvitarManager</a></li><li data-type='method' style='display: none;'><a href="module-loaders_commonLoader.html#removeSeriesFromLarvitarManager#removeSeriesFromLarvitarManager">removeSeriesFromLarvitarManager</a></li><li data-type='method' style='display: none;'><a href="module-loaders_commonLoader.html#resetLarvitarManager#resetLarvitarManager">resetLarvitarManager</a></li><li data-type='method' style='display: none;'><a href="module-loaders_commonLoader.html#updateLarvitarManager#updateLarvitarManager">updateLarvitarManager</a></li></ul></li><li><a href="module-loaders_dicomLoader.html">loaders/dicomLoader</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-loaders_dicomLoader.html#cacheImages#cacheImages">cacheImages</a></li><li data-type='method' style='display: none;'><a href="module-loaders_dicomLoader.html#getDicomImageId#getDicomImageId">getDicomImageId</a></li></ul></li><li><a href="module-loaders_fileLoader.html">loaders/fileLoader</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-loaders_fileLoader.html#getFileImageId#getFileImageId">getFileImageId</a></li><li data-type='method' style='display: none;'><a href="module-loaders_fileLoader.html#populateFileManager#populateFileManager">populateFileManager</a></li><li data-type='method' style='display: none;'><a href="module-loaders_fileLoader.html#resetFileLoader#resetFileLoader">resetFileLoader</a></li><li data-type='method' style='display: none;'><a href="module-loaders_fileLoader.html#resetFileManager#resetFileManager">resetFileManager</a></li></ul></li><li><a href="module-loaders_nrrdLoader.html">loaders/nrrdLoader</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-loaders_nrrdLoader.html#buildNrrdImage#buildNrrdImage">buildNrrdImage</a></li><li data-type='method' style='display: none;'><a href="module-loaders_nrrdLoader.html#createCustomImage#createCustomImage">createCustomImage</a></li><li data-type='method' style='display: none;'><a href="module-loaders_nrrdLoader.html#getImageIdFromSlice#getImageIdFromSlice">getImageIdFromSlice</a></li><li data-type='method' style='display: none;'><a href="module-loaders_nrrdLoader.html#getNrrdImageId#getNrrdImageId">getNrrdImageId</a></li><li data-type='method' style='display: none;'><a href="module-loaders_nrrdLoader.html#getNrrdSerieDimensions#getNrrdSerieDimensions">getNrrdSerieDimensions</a></li><li data-type='method' style='display: none;'><a href="module-loaders_nrrdLoader.html#getSliceNumberFromImageId#getSliceNumberFromImageId">getSliceNumberFromImageId</a></li><li data-type='method' style='display: none;'><a href="module-loaders_nrrdLoader.html#loadNrrdImage#loadNrrdImage">loadNrrdImage</a></li></ul></li><li><a href="module-loaders_resliceLoader.html">loaders/resliceLoader</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-loaders_resliceLoader.html#createCustomImage#createCustomImage">createCustomImage</a></li><li data-type='method' style='display: none;'><a href="module-loaders_resliceLoader.html#loadReslicedImage#loadReslicedImage">loadReslicedImage</a></li></ul></li><li><a href="module-monitors_memory.html">monitors/memory</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-monitors_memory.html#checkMemoryAllocation#checkMemoryAllocation">checkMemoryAllocation</a></li><li data-type='method' style='display: none;'><a href="module-monitors_memory.html#checkMemorySupport#checkMemorySupport">checkMemorySupport</a></li><li data-type='method' style='display: none;'><a href="module-monitors_memory.html#getAvailableMemory#getAvailableMemory">getAvailableMemory</a></li><li data-type='method' style='display: none;'><a href="module-monitors_memory.html#getMB#getMB">getMB</a></li><li data-type='method' style='display: none;'><a href="module-monitors_memory.html#getUsedMemory#getUsedMemory">getUsedMemory</a></li><li data-type='method' style='display: none;'><a href="module-monitors_memory.html#setAvailableMemory#setAvailableMemory">setAvailableMemory</a></li></ul></li><li><a href="module-tools_default.html">tools/default</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-tools_default.html#getDefaultToolsByType#~getDefaultToolsByType">getDefaultToolsByType</a></li><li data-type='method' style='display: none;'><a href="module-tools_default.html#setDefaultToolsProps#~setDefaultToolsProps">setDefaultToolsProps</a></li></ul></li></ul><h3>Events</h3><ul><li><a href="ContoursTool.html#event:_drawingDoubleTapClickCallback">ContoursTool#_drawingDoubleTapClickCallback</a></li><li><a href="ContoursTool.html#event:_drawingMouseDoubleClickCallback">ContoursTool#_drawingMouseDoubleClickCallback</a></li><li><a href="ContoursTool.html#event:_drawingMouseDownCallback">ContoursTool#_drawingMouseDownCallback</a></li><li><a href="ContoursTool.html#event:_drawingMouseDragCallback">ContoursTool#_drawingMouseDragCallback</a></li><li><a href="ContoursTool.html#event:_drawingMouseMoveCallback">ContoursTool#_drawingMouseMoveCallback</a></li><li><a href="ContoursTool.html#event:_drawingMouseUpCallback">ContoursTool#_drawingMouseUpCallback</a></li><li><a href="ContoursTool.html#event:_drawingTouchDragCallback">ContoursTool#_drawingTouchDragCallback</a></li><li><a href="ContoursTool.html#event:_drawingTouchStartCallback">ContoursTool#_drawingTouchStartCallback</a></li><li><a href="ContoursTool.html#event:_editMouseDragCallback">ContoursTool#_editMouseDragCallback</a></li><li><a href="ContoursTool.html#event:_editTouchDragCallback">ContoursTool#_editTouchDragCallback</a></li></ul><h3>Mixins</h3><ul><li><a href="Mixins.polygonSegmentationMixin%2520-%2520segmentation%2520operations%2520for%2520polyline.html">Mixins.polygonSegmentationMixin - segmentation operations for polyline</a></li></ul><h3>Global</h3><ul><li><a href="global.html#_checkIfDrawing">_checkIfDrawing</a></li><li><a href="global.html#_paint">_paint</a></li><li><a href="global.html#addDefaultTools">addDefaultTools</a></li><li><a href="global.html#addMouseKeyHandlers">addMouseKeyHandlers</a></li><li><a href="global.html#addSegmentationMask">addSegmentationMask</a></li><li><a href="global.html#addTool">addTool</a></li><li><a href="global.html#buildMultiFrameImage">buildMultiFrameImage</a></li><li><a href="global.html">clearMultiFrameCache</a></li><li><a href="global.html#clearSegmentationState">clearSegmentationState</a></li><li><a href="global.html#config">config</a></li><li><a href="global.html">createCustomImage</a></li><li><a href="global.html#csToolsCreateStack">csToolsCreateStack</a></li><li><a href="global.html#csToolsUpdateImageIndex">csToolsUpdateImageIndex</a></li><li><a href="global.html#deleteMask">deleteMask</a></li><li><a href="global.html#disableBrushTool">disableBrushTool</a></li><li><a href="global.html#download">download</a></li><li><a href="global.html#enableBrushTool">enableBrushTool</a></li><li><a href="global.html#eraseFreehand">eraseFreehand</a></li><li><a href="global.html#eraseInsideFreehand">eraseInsideFreehand</a></li><li><a href="global.html#eraseOutsideFreehand">eraseOutsideFreehand</a></li><li><a href="global.html#exportAnnotations">exportAnnotations</a></li><li><a href="global.html#extractToolInfo">extractToolInfo</a></li><li><a href="global.html#fillFreehand">fillFreehand</a></li><li><a href="global.html#fillInsideFreehand">fillInsideFreehand</a></li><li><a href="global.html#fillOutsideFreehand">fillOutsideFreehand</a></li><li><a href="global.html#forceRender">forceRender</a></li><li><a href="global.html#generateCSV">generateCSV</a></li><li><a href="global.html#generateLUT">generateLUT</a></li><li><a href="global.html#generateUniformLUT">generateUniformLUT</a></li><li><a href="global.html#getActiveLabelmapBuffer">getActiveLabelmapBuffer</a></li><li><a href="global.html#getCircleWithThreshold">getCircleWithThreshold</a></li><li><a href="global.html">getMultiFrameImageId</a></li><li><a href="global.html#HSVtoRGB">HSVtoRGB</a></li><li><a href="global.html#initializeCSTools">initializeCSTools</a></li><li><a href="global.html#initSegmentationModule">initSegmentationModule</a></li><li><a href="global.html#isDrawing">isDrawing</a></li><li><a href="global.html#isToolMissing">isToolMissing</a></li><li><a href="global.html#loadAnnotations">loadAnnotations</a></li><li><a href="global.html#loadMultiFrameImage">loadMultiFrameImage</a></li><li><a href="global.html#NRRD_TYPES_TO_TYPEDARRAY">NRRD_TYPES_TO_TYPEDARRAY</a></li><li><a href="global.html">parse</a></li><li><a href="global.html#redoLastStroke">redoLastStroke</a></li><li><a href="global.html#renderToolData">renderToolData</a></li><li><a href="global.html#restoreToolState">restoreToolState</a></li><li><a href="global.html#saveAnnotations">saveAnnotations</a></li><li><a href="global.html#saveToolState">saveToolState</a></li><li><a href="global.html#setActiveLabelmap">setActiveLabelmap</a></li><li><a href="global.html#setActiveLabelOpacity">setActiveLabelOpacity</a></li><li><a href="global.html#setActiveSegment">setActiveSegment</a></li><li><a href="global.html#setBrushProps">setBrushProps</a></li><li><a href="global.html#setInactiveLabelOpacity">setInactiveLabelOpacity</a></li><li><a href="global.html#setMaskProps">setMaskProps</a></li><li><a href="global.html">setPixelDataType</a></li><li><a href="global.html#setToolActive">setToolActive</a></li><li><a href="global.html#setToolDisabled">setToolDisabled</a></li><li><a href="global.html#setToolEnabled">setToolEnabled</a></li><li><a href="global.html#setToolPassive">setToolPassive</a></li><li><a href="global.html#setToolsStyle">setToolsStyle</a></li><li><a href="global.html#toggleContourMode">toggleContourMode</a></li><li><a href="global.html">toggleMouseHandlers</a></li><li><a href="global.html#tryUpdateImage">tryUpdateImage</a></li><li><a href="global.html#undoLastStroke">undoLastStroke</a></li></ul>
|
|
41
|
-
|
|
42
|
-
</nav>
|
|
43
|
-
|
|
44
|
-
<div id="main">
|
|
45
|
-
|
|
46
|
-
<h1 class="page-title">tools/tools.default.js</h1>
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
<section>
|
|
55
|
-
<article>
|
|
56
|
-
<pre class="prettyprint source linenums"><code>/** @module tools/default */
|
|
57
|
-
|
|
58
|
-
/* DEFINE DEFAULT TOOLS
|
|
59
|
-
* example
|
|
60
|
-
*
|
|
61
|
-
* toolName : {
|
|
62
|
-
* name : toolName (string),
|
|
63
|
-
* viewports : "all" or [array of target viewports],
|
|
64
|
-
* configuration : configuration {object},
|
|
65
|
-
* options : options {object},
|
|
66
|
-
* class : cornerstone tool library class name (ie "LengthTool" for Length tool),
|
|
67
|
-
* sync : cornerstone synchronizer name (ie "wwwcSynchronizer" for Wwwc sync tool),
|
|
68
|
-
* cleanable : if true, this tool will be removed when calling "no tools",
|
|
69
|
-
* defaultActive : if true, this tool will be activated when calling "addDefaultTools",
|
|
70
|
-
* shortcut : keyboard shortcut [not implemented],
|
|
71
|
-
* type : tool category inside Larvitar (one of: "utils", "annotation", "segmentation")
|
|
72
|
-
* }
|
|
73
|
-
*
|
|
74
|
-
*/
|
|
75
|
-
|
|
76
|
-
import { filter, isArray } from "lodash";
|
|
77
|
-
import ThresholdsBrushTool from "./thresholdsBrushTool";
|
|
78
|
-
import PolylineScissorsTool from "./polylineScissorsTool";
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* These tools are added with `addDefaultTools()`
|
|
82
|
-
*/
|
|
83
|
-
const DEFAULT_TOOLS = {
|
|
84
|
-
ScaleOverlay: {
|
|
85
|
-
name: "ScaleOverlay",
|
|
86
|
-
viewports: "all",
|
|
87
|
-
configuration: {
|
|
88
|
-
minorTickLength: 25,
|
|
89
|
-
majorTickLength: 50
|
|
90
|
-
},
|
|
91
|
-
options: {
|
|
92
|
-
mouseButtonMask: 1
|
|
93
|
-
},
|
|
94
|
-
cleanable: false,
|
|
95
|
-
defaultActive: false,
|
|
96
|
-
class: "ScaleOverlayTool",
|
|
97
|
-
sync: null,
|
|
98
|
-
description: "Add scale overlay",
|
|
99
|
-
shortcut: "ctrl-m",
|
|
100
|
-
type: "overlay"
|
|
101
|
-
},
|
|
102
|
-
OrientationMarkers: {
|
|
103
|
-
name: "OrientationMarkers",
|
|
104
|
-
viewports: "all",
|
|
105
|
-
configuration: {},
|
|
106
|
-
options: {
|
|
107
|
-
mouseButtonMask: 1
|
|
108
|
-
},
|
|
109
|
-
cleanable: false,
|
|
110
|
-
defaultActive: false,
|
|
111
|
-
class: "OrientationMarkersTool",
|
|
112
|
-
sync: null,
|
|
113
|
-
description: "Add orientation markers",
|
|
114
|
-
shortcut: "ctrl-m",
|
|
115
|
-
type: "overlay"
|
|
116
|
-
},
|
|
117
|
-
Wwwc: {
|
|
118
|
-
name: "Wwwc",
|
|
119
|
-
viewports: "all",
|
|
120
|
-
configuration: {},
|
|
121
|
-
options: {
|
|
122
|
-
mouseButtonMask: 1,
|
|
123
|
-
supportedInteractionTypes: ["Mouse", "Touch"]
|
|
124
|
-
},
|
|
125
|
-
cleanable: false,
|
|
126
|
-
defaultActive: true,
|
|
127
|
-
class: "WwwcTool",
|
|
128
|
-
sync: "wwwcSynchronizer",
|
|
129
|
-
description: "Change image contrast",
|
|
130
|
-
shortcut: "ctrl-m",
|
|
131
|
-
type: "utils"
|
|
132
|
-
},
|
|
133
|
-
WwwcRegion: {
|
|
134
|
-
name: "WwwcRegion",
|
|
135
|
-
viewports: "all",
|
|
136
|
-
configuration: {},
|
|
137
|
-
options: {
|
|
138
|
-
mouseButtonMask: 1,
|
|
139
|
-
supportedInteractionTypes: ["Mouse", "Touch"]
|
|
140
|
-
},
|
|
141
|
-
cleanable: false,
|
|
142
|
-
defaultActive: false,
|
|
143
|
-
class: "WwwcRegionTool",
|
|
144
|
-
sync: "wwwcSynchronizer",
|
|
145
|
-
description: "Change image contrast based on selected region",
|
|
146
|
-
shortcut: "ctrl-m",
|
|
147
|
-
type: "utils"
|
|
148
|
-
},
|
|
149
|
-
StackScrollMouseWheel: {
|
|
150
|
-
name: "StackScrollMouseWheel",
|
|
151
|
-
viewports: "all",
|
|
152
|
-
configuration: {},
|
|
153
|
-
options: {
|
|
154
|
-
loop: false, // default false
|
|
155
|
-
allowSkipping: false, // default true
|
|
156
|
-
invert: false
|
|
157
|
-
},
|
|
158
|
-
cleanable: false,
|
|
159
|
-
defaultActive: true,
|
|
160
|
-
class: "StackScrollMouseWheelTool"
|
|
161
|
-
},
|
|
162
|
-
Pan: {
|
|
163
|
-
name: "Pan",
|
|
164
|
-
viewports: "all",
|
|
165
|
-
configuration: {},
|
|
166
|
-
options: {
|
|
167
|
-
mouseButtonMask: 1,
|
|
168
|
-
supportedInteractionTypes: ["Mouse", "Touch"]
|
|
169
|
-
},
|
|
170
|
-
cleanable: false,
|
|
171
|
-
class: "PanTool",
|
|
172
|
-
description: "Move image xy",
|
|
173
|
-
shortcut: "ctrl-p",
|
|
174
|
-
type: "utils"
|
|
175
|
-
},
|
|
176
|
-
Zoom: {
|
|
177
|
-
name: "Zoom",
|
|
178
|
-
viewports: "all",
|
|
179
|
-
configuration: {
|
|
180
|
-
invert: false,
|
|
181
|
-
preventZoomOutsideImage: false,
|
|
182
|
-
minScale: 0.01,
|
|
183
|
-
maxScale: 25.0
|
|
184
|
-
},
|
|
185
|
-
options: {
|
|
186
|
-
mouseButtonMask: 1,
|
|
187
|
-
supportedInteractionTypes: ["Mouse", "Touch"],
|
|
188
|
-
defaultStrategy: "default" // can be 'default', 'translate' or 'zoomToCenter'
|
|
189
|
-
},
|
|
190
|
-
cleanable: false,
|
|
191
|
-
class: "ZoomTool",
|
|
192
|
-
defaultActive: false,
|
|
193
|
-
description: "Zoom image at mouse position",
|
|
194
|
-
shortcut: "ctrl-z",
|
|
195
|
-
type: "utils"
|
|
196
|
-
},
|
|
197
|
-
Magnify: {
|
|
198
|
-
name: "Magnify",
|
|
199
|
-
viewports: "all",
|
|
200
|
-
configuration: {},
|
|
201
|
-
options: {
|
|
202
|
-
mouseButtonMask: 1,
|
|
203
|
-
supportedInteractionTypes: ["Mouse", "Touch"]
|
|
204
|
-
},
|
|
205
|
-
cleanable: false,
|
|
206
|
-
class: "MagnifyTool",
|
|
207
|
-
defaultActive: false,
|
|
208
|
-
description: "Magnify image at mouse position",
|
|
209
|
-
shortcut: "ctrl-m",
|
|
210
|
-
type: "utils"
|
|
211
|
-
},
|
|
212
|
-
DragProbe: {
|
|
213
|
-
name: "DragProbe",
|
|
214
|
-
viewports: "all",
|
|
215
|
-
configuration: {},
|
|
216
|
-
options: {
|
|
217
|
-
mouseButtonMask: 1,
|
|
218
|
-
supportedInteractionTypes: ["Mouse", "Touch"]
|
|
219
|
-
},
|
|
220
|
-
cleanable: false,
|
|
221
|
-
class: "DragProbeTool",
|
|
222
|
-
description: "Probe image at mouse position",
|
|
223
|
-
shortcut: "ctrl-p",
|
|
224
|
-
type: "utils"
|
|
225
|
-
},
|
|
226
|
-
Rotate: {
|
|
227
|
-
name: "Rotate",
|
|
228
|
-
viewports: "all",
|
|
229
|
-
configuration: {},
|
|
230
|
-
options: {
|
|
231
|
-
mouseButtonMask: 1,
|
|
232
|
-
supportedInteractionTypes: ["Mouse", "Touch"]
|
|
233
|
-
},
|
|
234
|
-
cleanable: false,
|
|
235
|
-
class: "RotateTool",
|
|
236
|
-
description: "Rotate image"
|
|
237
|
-
},
|
|
238
|
-
Length: {
|
|
239
|
-
name: "Length",
|
|
240
|
-
viewports: "all",
|
|
241
|
-
configuration: {},
|
|
242
|
-
options: {
|
|
243
|
-
mouseButtonMask: 1,
|
|
244
|
-
supportedInteractionTypes: ["Mouse", "Touch"]
|
|
245
|
-
},
|
|
246
|
-
cleanable: true,
|
|
247
|
-
class: "LengthTool"
|
|
248
|
-
},
|
|
249
|
-
Angle: {
|
|
250
|
-
name: "Angle",
|
|
251
|
-
viewports: "all",
|
|
252
|
-
configuration: {},
|
|
253
|
-
options: {
|
|
254
|
-
mouseButtonMask: 1,
|
|
255
|
-
supportedInteractionTypes: ["Mouse", "Touch"]
|
|
256
|
-
},
|
|
257
|
-
cleanable: true,
|
|
258
|
-
class: "AngleTool"
|
|
259
|
-
},
|
|
260
|
-
Bidirectional: {
|
|
261
|
-
name: "Bidirectional",
|
|
262
|
-
viewports: "all",
|
|
263
|
-
configuration: {},
|
|
264
|
-
options: { mouseButtonMask: 1 },
|
|
265
|
-
cleanable: true,
|
|
266
|
-
class: "BidirectionalTool"
|
|
267
|
-
},
|
|
268
|
-
EllipticalRoi: {
|
|
269
|
-
name: "EllipticalRoi",
|
|
270
|
-
viewports: "all",
|
|
271
|
-
configuration: {},
|
|
272
|
-
options: { mouseButtonMask: 1 },
|
|
273
|
-
cleanable: true,
|
|
274
|
-
class: "EllipticalRoiTool",
|
|
275
|
-
description: "Draw an ellipse",
|
|
276
|
-
shortcut: "ctrl-f",
|
|
277
|
-
type: "annotation"
|
|
278
|
-
},
|
|
279
|
-
RectangleRoi: {
|
|
280
|
-
name: "RectangleRoi",
|
|
281
|
-
viewports: "all",
|
|
282
|
-
options: { mouseButtonMask: 1 },
|
|
283
|
-
cleanable: true,
|
|
284
|
-
defaultActive: false,
|
|
285
|
-
class: "RectangleRoiTool",
|
|
286
|
-
description: "Draw a rectangle",
|
|
287
|
-
shortcut: "ctrl-a",
|
|
288
|
-
type: "annotation"
|
|
289
|
-
},
|
|
290
|
-
FreehandRoi: {
|
|
291
|
-
name: "FreehandRoi",
|
|
292
|
-
viewports: "all",
|
|
293
|
-
configuration: {},
|
|
294
|
-
options: { mouseButtonMask: 1 },
|
|
295
|
-
cleanable: true,
|
|
296
|
-
class: "FreehandRoiTool",
|
|
297
|
-
description: "Draw a polyline / freehand form",
|
|
298
|
-
shortcut: "ctrl-s",
|
|
299
|
-
type: "annotation"
|
|
300
|
-
},
|
|
301
|
-
Probe: {
|
|
302
|
-
name: "Probe",
|
|
303
|
-
viewports: "all",
|
|
304
|
-
options: { mouseButtonMask: 1 },
|
|
305
|
-
cleanable: true,
|
|
306
|
-
class: "ProbeTool"
|
|
307
|
-
},
|
|
308
|
-
ArrowAnnotate: {
|
|
309
|
-
name: "ArrowAnnotate",
|
|
310
|
-
viewports: "all",
|
|
311
|
-
configuration: {},
|
|
312
|
-
options: { mouseButtonMask: 1 },
|
|
313
|
-
cleanable: true,
|
|
314
|
-
class: "ArrowAnnotateTool",
|
|
315
|
-
description: "Draw an arrow",
|
|
316
|
-
shortcut: "ctrl-d",
|
|
317
|
-
type: "annotation"
|
|
318
|
-
},
|
|
319
|
-
TextMarker: {
|
|
320
|
-
name: "TextMarker",
|
|
321
|
-
viewports: "all",
|
|
322
|
-
configuration: {
|
|
323
|
-
markers: Object.keys(new Array(100).fill(0)),
|
|
324
|
-
current: "0",
|
|
325
|
-
ascending: true,
|
|
326
|
-
loop: true
|
|
327
|
-
},
|
|
328
|
-
options: { mouseButtonMask: 1 },
|
|
329
|
-
cleanable: true,
|
|
330
|
-
class: "TextMarkerTool"
|
|
331
|
-
},
|
|
332
|
-
Eraser: {
|
|
333
|
-
name: "Eraser",
|
|
334
|
-
viewports: "all",
|
|
335
|
-
configuration: {},
|
|
336
|
-
options: { mouseButtonMask: 1 },
|
|
337
|
-
class: "EraserTool"
|
|
338
|
-
},
|
|
339
|
-
ZoomTouchPinch: {
|
|
340
|
-
name: "ZoomTouchPinch",
|
|
341
|
-
viewports: "all",
|
|
342
|
-
configuration: {},
|
|
343
|
-
options: {
|
|
344
|
-
mouseButtonMask: 1,
|
|
345
|
-
supportedInteractionTypes: ["TouchPinch"]
|
|
346
|
-
},
|
|
347
|
-
cleanable: false,
|
|
348
|
-
class: "ZoomTouchPinchTool",
|
|
349
|
-
defaultActive: true
|
|
350
|
-
},
|
|
351
|
-
PanMultiTouch: {
|
|
352
|
-
name: "PanMultiTouch",
|
|
353
|
-
viewports: "all",
|
|
354
|
-
configuration: {
|
|
355
|
-
touchPointers: 2
|
|
356
|
-
},
|
|
357
|
-
options: {
|
|
358
|
-
mouseButtonMask: 1,
|
|
359
|
-
supportedInteractionTypes: ["MultiTouch"]
|
|
360
|
-
},
|
|
361
|
-
cleanable: false,
|
|
362
|
-
class: "PanMultiTouchTool",
|
|
363
|
-
defaultActive: true
|
|
364
|
-
},
|
|
365
|
-
Brush: {
|
|
366
|
-
name: "Brush",
|
|
367
|
-
viewports: "all",
|
|
368
|
-
configuration: {},
|
|
369
|
-
options: { mouseButtonMask: 1 },
|
|
370
|
-
cleanable: true,
|
|
371
|
-
class: "BrushTool",
|
|
372
|
-
description: "A simple brush",
|
|
373
|
-
shortcut: "ctrl-q",
|
|
374
|
-
type: "segmentation"
|
|
375
|
-
},
|
|
376
|
-
ThresholdsBrush: {
|
|
377
|
-
name: "ThresholdsBrush",
|
|
378
|
-
viewports: "all",
|
|
379
|
-
configuration: {},
|
|
380
|
-
options: { mouseButtonMask: 1 },
|
|
381
|
-
cleanable: true,
|
|
382
|
-
class: "ThresholdsBrushTool",
|
|
383
|
-
description: "Brush only values inside thresholds",
|
|
384
|
-
shortcut: "ctrl-t",
|
|
385
|
-
type: "segmentation"
|
|
386
|
-
},
|
|
387
|
-
RectangleScissors: {
|
|
388
|
-
name: "RectangleScissors",
|
|
389
|
-
viewports: "all",
|
|
390
|
-
configuration: {},
|
|
391
|
-
options: { mouseButtonMask: 1 },
|
|
392
|
-
cleanable: true,
|
|
393
|
-
class: "RectangleScissorsTool",
|
|
394
|
-
description: "A rectangular segmentation tool",
|
|
395
|
-
shortcut: "ctrl-w",
|
|
396
|
-
type: "segmentation"
|
|
397
|
-
},
|
|
398
|
-
FreehandScissors: {
|
|
399
|
-
name: "FreehandScissors",
|
|
400
|
-
viewports: "all",
|
|
401
|
-
configuration: {},
|
|
402
|
-
options: { mouseButtonMask: 1 },
|
|
403
|
-
cleanable: true,
|
|
404
|
-
class: "FreehandScissorsTool",
|
|
405
|
-
description: "A free-hand segmentation tool",
|
|
406
|
-
shortcut: "ctrl-e",
|
|
407
|
-
type: "segmentation"
|
|
408
|
-
},
|
|
409
|
-
CircleScissors: {
|
|
410
|
-
name: "CircleScissors",
|
|
411
|
-
viewports: "all",
|
|
412
|
-
configuration: {},
|
|
413
|
-
options: { mouseButtonMask: 1 },
|
|
414
|
-
cleanable: true,
|
|
415
|
-
class: "CircleScissorsTool",
|
|
416
|
-
description: "A circular segmentation tool",
|
|
417
|
-
shortcut: "ctrl-r",
|
|
418
|
-
type: "segmentation"
|
|
419
|
-
},
|
|
420
|
-
CorrectionScissors: {
|
|
421
|
-
name: "CorrectionScissors",
|
|
422
|
-
viewports: "all",
|
|
423
|
-
configuration: {},
|
|
424
|
-
options: { mouseButtonMask: 1 },
|
|
425
|
-
cleanable: true,
|
|
426
|
-
class: "CorrectionScissorsTool",
|
|
427
|
-
description: "A correction segmentation tool",
|
|
428
|
-
shortcut: "ctrl-p",
|
|
429
|
-
type: "segmentation"
|
|
430
|
-
},
|
|
431
|
-
PolylineScissors: {
|
|
432
|
-
name: "PolylineScissors",
|
|
433
|
-
viewports: "all",
|
|
434
|
-
configuration: {},
|
|
435
|
-
options: { mouseButtonMask: 1 },
|
|
436
|
-
cleanable: true,
|
|
437
|
-
class: "PolylineScissorsTool",
|
|
438
|
-
description: "A polyline segmentation tool",
|
|
439
|
-
shortcut: "ctrl-s",
|
|
440
|
-
type: "segmentation"
|
|
441
|
-
}
|
|
442
|
-
};
|
|
443
|
-
|
|
444
|
-
/**
|
|
445
|
-
* D/Vision Lab custom tools
|
|
446
|
-
*/
|
|
447
|
-
const dvTools = {
|
|
448
|
-
ThresholdsBrushTool: ThresholdsBrushTool,
|
|
449
|
-
PolylineScissorsTool: PolylineScissorsTool
|
|
450
|
-
};
|
|
451
|
-
|
|
452
|
-
/**
|
|
453
|
-
* Tools default style
|
|
454
|
-
* Available font families :
|
|
455
|
-
* Work Sans, Roboto, OpenSans, HelveticaNeue-Light,
|
|
456
|
-
* Helvetica Neue Light, Helvetica Neue, Helvetica,
|
|
457
|
-
* Arial, Lucida Grande, sans-serif;
|
|
458
|
-
*/
|
|
459
|
-
const DEFAULT_STYLE = {
|
|
460
|
-
width: 1,
|
|
461
|
-
color: "#02FAE5",
|
|
462
|
-
activeColor: "#00FF00",
|
|
463
|
-
fillColor: "#0000FF",
|
|
464
|
-
fontFamily: "Roboto",
|
|
465
|
-
fontSize: 18,
|
|
466
|
-
backgroundColor: "rgba(1, 1, 1, 0.7)"
|
|
467
|
-
};
|
|
468
|
-
|
|
469
|
-
/**
|
|
470
|
-
* Tools default settings
|
|
471
|
-
*/
|
|
472
|
-
const DEFAULT_SETTINGS = {
|
|
473
|
-
mouseEnabled: true,
|
|
474
|
-
touchEnabled: true,
|
|
475
|
-
showSVGCursors: true,
|
|
476
|
-
globalToolSyncEnabled: false,
|
|
477
|
-
autoResizeViewports: true,
|
|
478
|
-
lineDash: [4, 4]
|
|
479
|
-
};
|
|
480
|
-
|
|
481
|
-
/**
|
|
482
|
-
* Shortcut and mouse bindings defaults
|
|
483
|
-
*/
|
|
484
|
-
const DEFAULT_MOUSE_KEYS = {
|
|
485
|
-
debug: true, // log changes
|
|
486
|
-
mouse_button_left: {
|
|
487
|
-
shift: "Zoom",
|
|
488
|
-
ctrl: "Pan",
|
|
489
|
-
default: "Wwwc"
|
|
490
|
-
},
|
|
491
|
-
mouse_button_right: {
|
|
492
|
-
shift: "Zoom",
|
|
493
|
-
ctrl: "Pan",
|
|
494
|
-
default: "Wwwc"
|
|
495
|
-
},
|
|
496
|
-
keyboard_shortcuts: {
|
|
497
|
-
// alt key + letter
|
|
498
|
-
KEY_R: "Rotate",
|
|
499
|
-
KEY_A: "Angle",
|
|
500
|
-
KEY_L: "Length"
|
|
501
|
-
}
|
|
502
|
-
};
|
|
503
|
-
|
|
504
|
-
/**
|
|
505
|
-
* Get available tools by type (useful to populate menus)
|
|
506
|
-
* @param {String} type
|
|
507
|
-
*/
|
|
508
|
-
const getDefaultToolsByType = function (type) {
|
|
509
|
-
return filter(DEFAULT_TOOLS, ["type", type]);
|
|
510
|
-
};
|
|
511
|
-
|
|
512
|
-
/**
|
|
513
|
-
* Override default tools props
|
|
514
|
-
* @param {Array} newProps - An array of objects as in the DEFAULT_TOOLS list, but with a subset of props
|
|
515
|
-
* NOTE: prop "name" is mandatory
|
|
516
|
-
*/
|
|
517
|
-
const setDefaultToolsProps = function (newProps) {
|
|
518
|
-
if (isArray(newProps)) {
|
|
519
|
-
newProps.forEach(props => {
|
|
520
|
-
let targetTool = DEFAULT_TOOLS[props.name];
|
|
521
|
-
if (targetTool) {
|
|
522
|
-
DEFAULT_TOOLS[props.name] = Object.assign(targetTool, props);
|
|
523
|
-
} else {
|
|
524
|
-
console.error(`${newProps.name} does not exist`);
|
|
525
|
-
}
|
|
526
|
-
});
|
|
527
|
-
} else {
|
|
528
|
-
console.error("newProps must be an array");
|
|
529
|
-
}
|
|
530
|
-
};
|
|
531
|
-
|
|
532
|
-
export {
|
|
533
|
-
DEFAULT_TOOLS,
|
|
534
|
-
DEFAULT_STYLE,
|
|
535
|
-
DEFAULT_SETTINGS,
|
|
536
|
-
DEFAULT_MOUSE_KEYS,
|
|
537
|
-
dvTools,
|
|
538
|
-
getDefaultToolsByType,
|
|
539
|
-
setDefaultToolsProps
|
|
540
|
-
};
|
|
541
|
-
</code></pre>
|
|
542
|
-
</article>
|
|
543
|
-
</section>
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
</div>
|
|
551
|
-
|
|
552
|
-
<br class="clear">
|
|
553
|
-
|
|
554
|
-
<footer>
|
|
555
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.7</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
556
|
-
</footer>
|
|
557
|
-
|
|
558
|
-
<script>prettyPrint();</script>
|
|
559
|
-
<script src="scripts/polyfill.js"></script>
|
|
560
|
-
<script src="scripts/linenumber.js"></script>
|
|
561
|
-
|
|
562
|
-
<script src="scripts/search.js" defer></script>
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
<script src="scripts/collapse.js" defer></script>
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
</body>
|
|
569
|
-
</html>
|