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.
Files changed (190) hide show
  1. package/.github/workflows/build-docs.yml +1 -1
  2. package/.github/workflows/deploy.yml +4 -4
  3. package/README.md +3 -3
  4. package/modules/vuex/larvitar.js +1 -0
  5. package/package.json +1 -1
  6. package/docs/documentation/Mixins.polygonSegmentationMixin%20-%20segmentation%20operations%20for%20polyline.html +0 -171
  7. package/docs/documentation/Tools.Annotation.ContoursTool.html +0 -218
  8. package/docs/documentation/Tools.Annotation.DiameterTool.html +0 -219
  9. package/docs/documentation/Tools.Annotation.SeedsTool.html +0 -214
  10. package/docs/documentation/Tools.Brush.BrushTool.html +0 -218
  11. package/docs/documentation/Tools.Brush.ThresholdsBrushTool.html +0 -218
  12. package/docs/documentation/Tools.PolylineScissorsTool.html +0 -218
  13. package/docs/documentation/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  14. package/docs/documentation/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  15. package/docs/documentation/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  16. package/docs/documentation/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  17. package/docs/documentation/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  18. package/docs/documentation/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  19. package/docs/documentation/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  20. package/docs/documentation/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  21. package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  22. package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -978
  23. package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  24. package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  25. package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  26. package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  27. package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -1049
  28. package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  29. package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  30. package/docs/documentation/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  31. package/docs/documentation/global.html +0 -1303
  32. package/docs/documentation/imageAnonymization.js.html +0 -245
  33. package/docs/documentation/imageColormaps.js.html +0 -283
  34. package/docs/documentation/imageContours.js.html +0 -278
  35. package/docs/documentation/imageIo.js.html +0 -291
  36. package/docs/documentation/imageLayers.js.html +0 -188
  37. package/docs/documentation/imageLoading.js.html +0 -297
  38. package/docs/documentation/imageParsing.js.html +0 -385
  39. package/docs/documentation/imagePresets.js.html +0 -207
  40. package/docs/documentation/imageRendering.js.html +0 -849
  41. package/docs/documentation/imageReslice.js.html +0 -162
  42. package/docs/documentation/imageStore.js.html +0 -360
  43. package/docs/documentation/imageTools.js.html +0 -784
  44. package/docs/documentation/imageUtils.js.html +0 -1609
  45. package/docs/documentation/image_colormaps.js.html +0 -283
  46. package/docs/documentation/image_contours.js.html +0 -279
  47. package/docs/documentation/image_io.js.html +0 -288
  48. package/docs/documentation/image_layers.js.html +0 -188
  49. package/docs/documentation/image_loading.js.html +0 -294
  50. package/docs/documentation/image_parsing.js.html +0 -391
  51. package/docs/documentation/image_presets.js.html +0 -207
  52. package/docs/documentation/image_rendering.js.html +0 -845
  53. package/docs/documentation/image_reslice.js.html +0 -164
  54. package/docs/documentation/image_store.js.html +0 -359
  55. package/docs/documentation/image_tools.js.html +0 -792
  56. package/docs/documentation/image_utils.js.html +0 -1609
  57. package/docs/documentation/index.html +0 -175
  58. package/docs/documentation/loaders_commonLoader.js.html +0 -306
  59. package/docs/documentation/loaders_dicomLoader.js.html +0 -130
  60. package/docs/documentation/loaders_fileLoader.js.html +0 -155
  61. package/docs/documentation/loaders_multiframeLoader.js.html +0 -443
  62. package/docs/documentation/loaders_niftiLoader.js.html +0 -150
  63. package/docs/documentation/loaders_nrrdLoader.js.html +0 -545
  64. package/docs/documentation/loaders_resliceLoader.js.html +0 -258
  65. package/docs/documentation/module-imaging_contours.html +0 -954
  66. package/docs/documentation/module-imaging_imageAnonymization.html +0 -544
  67. package/docs/documentation/module-imaging_imageColormaps.html +0 -1012
  68. package/docs/documentation/module-imaging_imageContours.html +0 -954
  69. package/docs/documentation/module-imaging_imageIo.html +0 -1057
  70. package/docs/documentation/module-imaging_imageLayers.html +0 -904
  71. package/docs/documentation/module-imaging_imageLoading.html +0 -1301
  72. package/docs/documentation/module-imaging_imageParsing.html +0 -1356
  73. package/docs/documentation/module-imaging_imagePresets.html +0 -679
  74. package/docs/documentation/module-imaging_imageRendering.html +0 -3223
  75. package/docs/documentation/module-imaging_imageReslice.html +0 -413
  76. package/docs/documentation/module-imaging_imageStore-Larvitar_Store.html +0 -284
  77. package/docs/documentation/module-imaging_imageStore.html +0 -1560
  78. package/docs/documentation/module-imaging_imageTools.html +0 -3617
  79. package/docs/documentation/module-imaging_imageUtils.html +0 -7253
  80. package/docs/documentation/module-imaging_io.html +0 -1057
  81. package/docs/documentation/module-imaging_layers.html +0 -904
  82. package/docs/documentation/module-imaging_loading.html +0 -1301
  83. package/docs/documentation/module-imaging_parsing.html +0 -1375
  84. package/docs/documentation/module-imaging_presets.html +0 -679
  85. package/docs/documentation/module-imaging_rendering.html +0 -8094
  86. package/docs/documentation/module-imaging_reslice.html +0 -411
  87. package/docs/documentation/module-imaging_store-Larvitar_Store.html +0 -284
  88. package/docs/documentation/module-imaging_store.html +0 -1537
  89. package/docs/documentation/module-imaging_strategies_eraseFreehand.html +0 -708
  90. package/docs/documentation/module-imaging_strategies_fillFreehand.html +0 -708
  91. package/docs/documentation/module-imaging_tools.html +0 -3617
  92. package/docs/documentation/module-imaging_tools_custom_contourTool.html +0 -207
  93. package/docs/documentation/module-imaging_tools_custom_diameterTool.html +0 -205
  94. package/docs/documentation/module-imaging_tools_custom_editMaskTool.html +0 -205
  95. package/docs/documentation/module-imaging_tools_custom_polygonScissorsTool.html +0 -203
  96. package/docs/documentation/module-imaging_tools_custom_thresholdBrushTool.html +0 -684
  97. package/docs/documentation/module-imaging_tools_default.html +0 -205
  98. package/docs/documentation/module-imaging_tools_interaction.html +0 -530
  99. package/docs/documentation/module-imaging_tools_io.html +0 -832
  100. package/docs/documentation/module-imaging_tools_main.html +0 -2028
  101. package/docs/documentation/module-imaging_tools_polygonSegmentationMixin.html +0 -567
  102. package/docs/documentation/module-imaging_tools_segmentation.html +0 -3586
  103. package/docs/documentation/module-imaging_tools_state.html +0 -494
  104. package/docs/documentation/module-imaging_utils.html +0 -7253
  105. package/docs/documentation/module-loaders_commonLoader.html +0 -1313
  106. package/docs/documentation/module-loaders_dicomLoader.html +0 -522
  107. package/docs/documentation/module-loaders_fileLoader.html +0 -593
  108. package/docs/documentation/module-loaders_multiframeLoader.html +0 -1169
  109. package/docs/documentation/module-loaders_niftiLoader.html +0 -565
  110. package/docs/documentation/module-loaders_nrrdLoader.html +0 -1459
  111. package/docs/documentation/module-loaders_resliceLoader.html +0 -590
  112. package/docs/documentation/module-monitors_memory.html +0 -980
  113. package/docs/documentation/module-tools_default.html +0 -740
  114. package/docs/documentation/module.exports_module.exports.html +0 -203
  115. package/docs/documentation/monitors_memory.js.html +0 -189
  116. package/docs/documentation/parsers_nrrd.js.html +0 -569
  117. package/docs/documentation/scripts/collapse.js +0 -20
  118. package/docs/documentation/scripts/linenumber.js +0 -25
  119. package/docs/documentation/scripts/nav.js +0 -12
  120. package/docs/documentation/scripts/polyfill.js +0 -4
  121. package/docs/documentation/scripts/prettify/Apache-License-2.0.txt +0 -202
  122. package/docs/documentation/scripts/prettify/lang-css.js +0 -2
  123. package/docs/documentation/scripts/prettify/prettify.js +0 -28
  124. package/docs/documentation/scripts/search.js +0 -83
  125. package/docs/documentation/styles/jsdoc.css +0 -765
  126. package/docs/documentation/styles/prettify.css +0 -80
  127. package/docs/documentation/tools_contourTool.js.html +0 -1963
  128. package/docs/documentation/tools_custom_contourTool.js.html +0 -1968
  129. package/docs/documentation/tools_custom_diameterTool.js.html +0 -225
  130. package/docs/documentation/tools_custom_editMaskTool.js.html +0 -225
  131. package/docs/documentation/tools_custom_polylineScissorsTool.js.html +0 -143
  132. package/docs/documentation/tools_custom_thresholdsBrushTool.js.html +0 -245
  133. package/docs/documentation/tools_default.js.html +0 -576
  134. package/docs/documentation/tools_diameterTool.js.html +0 -219
  135. package/docs/documentation/tools_editMaskTool.js.html +0 -219
  136. package/docs/documentation/tools_interaction.js.html +0 -258
  137. package/docs/documentation/tools_io.js.html +0 -297
  138. package/docs/documentation/tools_main.js.html +0 -443
  139. package/docs/documentation/tools_polygonSegmentationMixin.js.html +0 -329
  140. package/docs/documentation/tools_polylineScissorsTool.js.html +0 -136
  141. package/docs/documentation/tools_seedTool.js.html +0 -423
  142. package/docs/documentation/tools_segmentation.js.html +0 -558
  143. package/docs/documentation/tools_state.js.html +0 -163
  144. package/docs/documentation/tools_strategies_eraseFreehand.js.html +0 -160
  145. package/docs/documentation/tools_strategies_fillFreehand.js.html +0 -163
  146. package/docs/documentation/tools_thresholdsBrushTool.js.html +0 -239
  147. package/docs/documentation/tools_tools.default.js.html +0 -569
  148. package/docs/documentation/tools_tools.interaction.js.html +0 -251
  149. package/docs/documentation/tools_tools.io.js.html +0 -288
  150. package/docs/documentation/tools_tools.main.js.html +0 -442
  151. package/docs/documentation/tools_tools.segmentation.js.html +0 -445
  152. package/docs/documentation/tools_tools.state.js.html +0 -157
  153. package/docs/examples/base.html +0 -170
  154. package/docs/examples/colorMaps.html +0 -181
  155. package/docs/examples/defaultTools.html +0 -246
  156. package/docs/examples/demo/anon1 +0 -0
  157. package/docs/examples/demo/anon10 +0 -0
  158. package/docs/examples/demo/anon11 +0 -0
  159. package/docs/examples/demo/anon12 +0 -0
  160. package/docs/examples/demo/anon13 +0 -0
  161. package/docs/examples/demo/anon14 +0 -0
  162. package/docs/examples/demo/anon15 +0 -0
  163. package/docs/examples/demo/anon16 +0 -0
  164. package/docs/examples/demo/anon17 +0 -0
  165. package/docs/examples/demo/anon18 +0 -0
  166. package/docs/examples/demo/anon19 +0 -0
  167. package/docs/examples/demo/anon2 +0 -0
  168. package/docs/examples/demo/anon20 +0 -0
  169. package/docs/examples/demo/anon21 +0 -0
  170. package/docs/examples/demo/anon22 +0 -0
  171. package/docs/examples/demo/anon23 +0 -0
  172. package/docs/examples/demo/anon24 +0 -0
  173. package/docs/examples/demo/anon3 +0 -0
  174. package/docs/examples/demo/anon4 +0 -0
  175. package/docs/examples/demo/anon5 +0 -0
  176. package/docs/examples/demo/anon6 +0 -0
  177. package/docs/examples/demo/anon7 +0 -0
  178. package/docs/examples/demo/anon8 +0 -0
  179. package/docs/examples/demo/anon9 +0 -0
  180. package/docs/examples/demo/example.nrrd +0 -0
  181. package/docs/examples/demo/segmentation.nrrd +0 -0
  182. package/docs/examples/demo/xa_integris.dcm +0 -0
  183. package/docs/examples/index.html +0 -129
  184. package/docs/examples/larvitar.js +0 -108623
  185. package/docs/examples/layers.html +0 -250
  186. package/docs/examples/masks.html +0 -273
  187. package/docs/examples/multiframe.html +0 -200
  188. package/docs/examples/nrrd.html +0 -96
  189. package/docs/examples/reslice.html +0 -174
  190. package/docs/index.html +0 -92
@@ -1,784 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
-
5
- <meta charset="utf-8">
6
- <title>imageTools.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-imaging_imageStore-Larvitar_Store.html">imaging/imageStore~Larvitar_Store</a></li><li><a href="module-imaging_tools_custom_polygonScissorsTool.html">imaging/tools/custom/polygonScissorsTool</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_imageAnonymization.html">imaging/imageAnonymization</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_imageAnonymization.html#anonymize#~anonymize">anonymize</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageAnonymization.html#encrypt#~encrypt">encrypt</a></li></ul></li><li><a href="module-imaging_imageColormaps.html">imaging/imageColormaps</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_imageColormaps.html#HSVToRGB#.HSVToRGB">HSVToRGB</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageColormaps.html#addColorMap#addColorMap">addColorMap</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageColormaps.html#applyColorMap#applyColorMap">applyColorMap</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageColormaps.html#fillPixelData#fillPixelData">fillPixelData</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageColormaps.html#getColormapsList#getColormapsList">getColormapsList</a></li></ul></li><li><a href="module-imaging_imageContours.html">imaging/imageContours</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_imageContours.html#extractSlicePoints#extractSlicePoints">extractSlicePoints</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageContours.html#populateContoursObject#populateContoursObject">populateContoursObject</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageContours.html#parseContours#~parseContours">parseContours</a></li></ul></li><li><a href="module-imaging_imageIo.html">imaging/imageIo</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_imageIo.html#buildData#~buildData">buildData</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageIo.html#buildDataAsync#~buildDataAsync">buildDataAsync</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageIo.html#buildHeader#~buildHeader">buildHeader</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageIo.html#getCachedPixelData#~getCachedPixelData">getCachedPixelData</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageIo.html#importNRRDImage#~importNRRDImage">importNRRDImage</a></li></ul></li><li><a href="module-imaging_imageLayers.html">imaging/imageLayers</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_imageLayers.html#getActiveLayer#getActiveLayer">getActiveLayer</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageLayers.html#setActiveLayer#setActiveLayer">setActiveLayer</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageLayers.html#updateLayer#updateLayer">updateLayer</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageLayers.html#buildLayers#~buildLayers">buildLayers</a></li></ul></li><li><a href="module-imaging_imageLoading.html">imaging/imageLoading</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_imageLoading.html#initializeFileImageLoader#initializeFileImageLoader">initializeFileImageLoader</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageLoading.html#initializeImageLoader#initializeImageLoader">initializeImageLoader</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageLoading.html#initializeWebImageLoader#initializeWebImageLoader">initializeWebImageLoader</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageLoading.html#registerMultiFrameImageLoader#registerMultiFrameImageLoader">registerMultiFrameImageLoader</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageLoading.html#registerNRRDImageLoader#registerNRRDImageLoader">registerNRRDImageLoader</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageLoading.html#registerResliceLoader#registerResliceLoader">registerResliceLoader</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageLoading.html#updateLoadedStack#updateLoadedStack">updateLoadedStack</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageLoading.html#isNewInstance#~isNewInstance">isNewInstance</a></li></ul></li><li><a href="module-imaging_imageParsing.html">imaging/imageParsing</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_imageParsing.html#clearImageParsing#clearImageParsing">clearImageParsing</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageParsing.html#parseDataSet#parseDataSet">parseDataSet</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageParsing.html#readFile#readFile">readFile</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageParsing.html#readFiles#readFiles">readFiles</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageParsing.html#parseFile#~parseFile">parseFile</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageParsing.html#parseFiles#~parseFiles">parseFiles</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageParsing.html#parseNextFile#~parseNextFile">parseNextFile</a></li></ul></li><li><a href="module-imaging_imagePresets.html">imaging/imagePresets</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_imagePresets.html#getImagePresets#getImagePresets">getImagePresets</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imagePresets.html#setImageCustomPreset#setImageCustomPreset">setImageCustomPreset</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imagePresets.html#setImagePreset#setImagePreset">setImagePreset</a></li></ul></li><li><a href="module-imaging_imageRendering.html">imaging/imageRendering</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_imageRendering.html#clearImageCache#clearImageCache">clearImageCache</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageRendering.html#disableViewport#disableViewport">disableViewport</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageRendering.html#flipImageHorizontal#flipImageHorizontal">flipImageHorizontal</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageRendering.html#flipImageVertical#flipImageVertical">flipImageVertical</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageRendering.html#getSeriesData#getSeriesData">getSeriesData</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageRendering.html#invertImage#invertImage">invertImage</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageRendering.html#loadAndCacheImages#loadAndCacheImages">loadAndCacheImages</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageRendering.html#renderImage#renderImage">renderImage</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageRendering.html#renderWebImage#renderWebImage">renderWebImage</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageRendering.html#renderWebImage#renderWebImage">renderWebImage</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageRendering.html#resetViewports#resetViewports">resetViewports</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageRendering.html#resizeViewport#resizeViewport">resizeViewport</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageRendering.html#rotateImageLeft#rotateImageLeft">rotateImageLeft</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageRendering.html#rotateImageRight#rotateImageRight">rotateImageRight</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageRendering.html#storeViewportData#storeViewportData">storeViewportData</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageRendering.html#unloadViewport#unloadViewport">unloadViewport</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageRendering.html#updateImage#updateImage">updateImage</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageRendering.html#updateViewportData#updateViewportData">updateViewportData</a></li></ul></li><li><a href="module-imaging_imageReslice.html">imaging/imageReslice</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_imageReslice.html#resliceSeries#resliceSeries">resliceSeries</a></li></ul></li><li><a href="module-imaging_imageStore.html">imaging/imageStore</a><ul class='members'><li data-type='member' style='display: none;'><a href="module-imaging_imageStore.html#.larvitar_store">larvitar_store</a></li></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_imageStore.html#initLarvitarStore#.initLarvitarStore">initLarvitarStore</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageStore.html#addSeriesIds#~addSeriesIds">addSeriesIds</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageStore.html#addViewport#~addViewport">addViewport</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageStore.html#deleteViewport#~deleteViewport">deleteViewport</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageStore.html#disableVuex#~disableVuex">disableVuex</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageStore.html#enableVuex#~enableVuex">enableVuex</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageStore.html#get#~get">get</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageStore.html#removeSeriesIds#~removeSeriesIds">removeSeriesIds</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageStore.html#set#~set">set</a></li></ul></li><li><a href="module-imaging_imageTools.html">imaging/imageTools</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_imageTools.html#addContoursTool#~addContoursTool">addContoursTool</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageTools.html#addDefaultTools#~addDefaultTools">addDefaultTools</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageTools.html#addDiameterTool#~addDiameterTool">addDiameterTool</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageTools.html#addMaskEditingTool#~addMaskEditingTool">addMaskEditingTool</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageTools.html#addSeedsTool#~addSeedsTool">addSeedsTool</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageTools.html#addStackStateToElement#~addStackStateToElement">addStackStateToElement</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageTools.html#addToolStateSingleSlice#~addToolStateSingleSlice">addToolStateSingleSlice</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageTools.html#clearCornerstoneElements#~clearCornerstoneElements">clearCornerstoneElements</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageTools.html#clearMeasurements#~clearMeasurements">clearMeasurements</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageTools.html#clearToolStateByName#~clearToolStateByName">clearToolStateByName</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageTools.html#getCurrentMaskData#~getCurrentMaskData">getCurrentMaskData</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageTools.html#getToolState#~getToolState">getToolState</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageTools.html#isToolMissing#~isToolMissing">isToolMissing</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageTools.html#setSegmentationConfig#~setSegmentationConfig">setSegmentationConfig</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageTools.html#setToolActive#~setToolActive">setToolActive</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageTools.html#setToolActive#~setToolActive">setToolActive</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageTools.html#setToolEnabled#~setToolEnabled">setToolEnabled</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageTools.html#setToolPassive#~setToolPassive">setToolPassive</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageTools.html#syncToolStack#~syncToolStack">syncToolStack</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageTools.html#updateDiameterTool#~updateDiameterTool">updateDiameterTool</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageTools.html#updateStackToolState#~updateStackToolState">updateStackToolState</a></li></ul></li><li><a href="module-imaging_imageUtils.html">imaging/imageUtils</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#formatDate#formatDate">formatDate</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#formatDateTime#formatDateTime">formatDateTime</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#getCmprMetadata#getCmprMetadata">getCmprMetadata</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#getDICOMTag#getDICOMTag">getDICOMTag</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#getDICOMTagCode#getDICOMTagCode">getDICOMTagCode</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#getDistanceBetweenSlices#getDistanceBetweenSlices">getDistanceBetweenSlices</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#getMaxPixelValue#getMaxPixelValue">getMaxPixelValue</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#getMeanValue#getMeanValue">getMeanValue</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#getMinPixelValue#getMinPixelValue">getMinPixelValue</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#getNormalOrientation#getNormalOrientation">getNormalOrientation</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#getPixelRepresentation#getPixelRepresentation">getPixelRepresentation</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#getPixelTypedArray#getPixelTypedArray">getPixelTypedArray</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#getReslicedIOP#getReslicedIOP">getReslicedIOP</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#getReslicedIPP#getReslicedIPP">getReslicedIPP</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#getReslicedMetadata#getReslicedMetadata">getReslicedMetadata</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#getReslicedPixeldata#getReslicedPixeldata">getReslicedPixeldata</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#getReslicedSliceLocation#getReslicedSliceLocation">getReslicedSliceLocation</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#getSortedStack#getSortedStack">getSortedStack</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#getSortedUIDs#getSortedUIDs">getSortedUIDs</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#getTagValue#getTagValue">getTagValue</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#getTypedArray#getTypedArray">getTypedArray</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#getTypedArrayFromDataType#getTypedArrayFromDataType">getTypedArrayFromDataType</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#isElement#isElement">isElement</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#isNegativeSign#isNegativeSign">isNegativeSign</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#isStringVr#isStringVr">isStringVr</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#isValidDate#isValidDate">isValidDate</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#parseAgeTag#parseAgeTag">parseAgeTag</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#parseDateTag#parseDateTag">parseDateTag</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#parseDateTimeTag#parseDateTimeTag">parseDateTimeTag</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#parseDICOMFileIDTag#parseDICOMFileIDTag">parseDICOMFileIDTag</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#parsePatientNameTag#parsePatientNameTag">parsePatientNameTag</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#parseTag#parseTag">parseTag</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#parseTimeTag#parseTimeTag">parseTimeTag</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#permuteSignedArrays#permuteSignedArrays">permuteSignedArrays</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#permuteValues#permuteValues">permuteValues</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#rand#rand">rand</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#randomId#randomId">randomId</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#sortStackCallback#sortStackCallback">sortStackCallback</a></li><li data-type='method' style='display: none;'><a href="module-imaging_imageUtils.html#spacingArray#spacingArray">spacingArray</a></li></ul></li><li><a href="module-imaging_strategies_eraseFreehand.html">imaging/strategies/eraseFreehand</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_strategies_eraseFreehand.html#eraseInsideFreehand#.eraseInsideFreehand">eraseInsideFreehand</a></li><li data-type='method' style='display: none;'><a href="module-imaging_strategies_eraseFreehand.html#eraseOutsideFreehand#.eraseOutsideFreehand">eraseOutsideFreehand</a></li><li data-type='method' style='display: none;'><a href="module-imaging_strategies_eraseFreehand.html#eraseFreehand#~eraseFreehand">eraseFreehand</a></li></ul></li><li><a href="module-imaging_strategies_fillFreehand.html">imaging/strategies/fillFreehand</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_strategies_fillFreehand.html#fillInsideFreehand#.fillInsideFreehand">fillInsideFreehand</a></li><li data-type='method' style='display: none;'><a href="module-imaging_strategies_fillFreehand.html#fillOutsideFreehand#.fillOutsideFreehand">fillOutsideFreehand</a></li><li data-type='method' style='display: none;'><a href="module-imaging_strategies_fillFreehand.html#fillFreehand#~fillFreehand">fillFreehand</a></li></ul></li><li><a href="module-imaging_tools_custom_contourTool.html">imaging/tools/custom/contourTool</a></li><li><a href="module-imaging_tools_custom_diameterTool.html">imaging/tools/custom/diameterTool</a></li><li><a href="module-imaging_tools_custom_editMaskTool.html">imaging/tools/custom/editMaskTool</a></li><li><a href="module-imaging_tools_custom_polygonScissorsTool.html">imaging/tools/custom/polygonScissorsTool</a></li><li><a href="module-imaging_tools_custom_thresholdBrushTool.html">imaging/tools/custom/thresholdBrushTool</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_tools_custom_thresholdBrushTool.html#_paint#_paint">_paint</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_custom_thresholdBrushTool.html#getCircleWithThreshold#~getCircleWithThreshold">getCircleWithThreshold</a></li></ul></li><li><a href="module-imaging_tools_default.html">imaging/tools/default</a></li><li><a href="module-imaging_tools_interaction.html">imaging/tools/interaction</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_tools_interaction.html#addMouseKeyHandlers#.addMouseKeyHandlers">addMouseKeyHandlers</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_interaction.html#toggleMouseHandlers#toggleMouseHandlers">toggleMouseHandlers</a></li></ul></li><li><a href="module-imaging_tools_io.html">imaging/tools/io</a><ul class='members'><li data-type='member' style='display: none;'><a href="module-imaging_tools_io.html#.exportAnnotations">exportAnnotations</a></li><li data-type='member' style='display: none;'><a href="module-imaging_tools_io.html#.loadAnnotations">loadAnnotations</a></li><li data-type='member' style='display: none;'><a href="module-imaging_tools_io.html#.saveAnnotations">saveAnnotations</a></li></ul><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_tools_io.html#generateCSV#.generateCSV">generateCSV</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_io.html#download#~download">download</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_io.html#extractToolInfo#~extractToolInfo">extractToolInfo</a></li></ul></li><li><a href="module-imaging_tools_main.html">imaging/tools/main</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_tools_main.html#csToolsUpdateImageIndex#.csToolsUpdateImageIndex">csToolsUpdateImageIndex</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_main.html#addDefaultTools#~addDefaultTools">addDefaultTools</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_main.html#addTool#~addTool">addTool</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_main.html#csToolsCreateStack#~csToolsCreateStack">csToolsCreateStack</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_main.html#initializeCSTools#~initializeCSTools">initializeCSTools</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_main.html#isToolMissing#~isToolMissing">isToolMissing</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_main.html#setToolActive#~setToolActive">setToolActive</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_main.html#setToolDisabled#~setToolDisabled">setToolDisabled</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_main.html#setToolEnabled#~setToolEnabled">setToolEnabled</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_main.html#setToolPassive#~setToolPassive">setToolPassive</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_main.html#setToolsStyle#~setToolsStyle">setToolsStyle</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_main.html#tryUpdateImage#~tryUpdateImage">tryUpdateImage</a></li></ul></li><li><a href="module-imaging_tools_polygonSegmentationMixin.html">imaging/tools/polygonSegmentationMixin</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_tools_polygonSegmentationMixin.html#_checkIfDrawing#~_checkIfDrawing">_checkIfDrawing</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_polygonSegmentationMixin.html#renderToolData#~renderToolData">renderToolData</a></li></ul></li><li><a href="module-imaging_tools_segmentation.html">imaging/tools/segmentation</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_tools_segmentation.html#addSegmentationMask#.addSegmentationMask">addSegmentationMask</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_segmentation.html#clearSegmentationState#.clearSegmentationState">clearSegmentationState</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_segmentation.html#deleteMask#.deleteMask">deleteMask</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_segmentation.html#disableBrushTool#.disableBrushTool">disableBrushTool</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_segmentation.html#enableBrushTool#.enableBrushTool">enableBrushTool</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_segmentation.html#forceRender#.forceRender">forceRender</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_segmentation.html#getActiveLabelmapBuffer#.getActiveLabelmapBuffer">getActiveLabelmapBuffer</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_segmentation.html#getLabelColor#.getLabelColor">getLabelColor</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_segmentation.html#initSegmentationModule#.initSegmentationModule">initSegmentationModule</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_segmentation.html#loadMaskSlice#.loadMaskSlice">loadMaskSlice</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_segmentation.html#redoLastStroke#.redoLastStroke">redoLastStroke</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_segmentation.html#setActiveLabelmap#.setActiveLabelmap">setActiveLabelmap</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_segmentation.html#setActiveLabelOpacity#.setActiveLabelOpacity">setActiveLabelOpacity</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_segmentation.html#setActiveSegment#.setActiveSegment">setActiveSegment</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_segmentation.html#setBrushProps#.setBrushProps">setBrushProps</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_segmentation.html#setInactiveLabelOpacity#.setInactiveLabelOpacity">setInactiveLabelOpacity</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_segmentation.html#setLabelColor#.setLabelColor">setLabelColor</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_segmentation.html#setMaskProps#.setMaskProps">setMaskProps</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_segmentation.html#toggleContourMode#.toggleContourMode">toggleContourMode</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_segmentation.html#toggleVisibility#.toggleVisibility">toggleVisibility</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_segmentation.html#undoLastStroke#.undoLastStroke">undoLastStroke</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_segmentation.html#generateLUT#~generateLUT">generateLUT</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_segmentation.html#generateUniformLUT#~generateUniformLUT">generateUniformLUT</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_segmentation.html#HSVtoRGB#~HSVtoRGB">HSVtoRGB</a></li></ul></li><li><a href="module-imaging_tools_state.html">imaging/tools/state</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-imaging_tools_state.html#restoreToolState#~restoreToolState">restoreToolState</a></li><li data-type='method' style='display: none;'><a href="module-imaging_tools_state.html#saveToolState#~saveToolState">saveToolState</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_multiframeLoader.html">loaders/multiframeLoader</a><ul class='methods'><li data-type='method' style='display: none;'><a href="module-loaders_multiframeLoader.html#clearMultiFrameCache#clearMultiFrameCache">clearMultiFrameCache</a></li><li data-type='method' style='display: none;'><a href="module-loaders_multiframeLoader.html#createCustomImage#createCustomImage">createCustomImage</a></li><li data-type='method' style='display: none;'><a href="module-loaders_multiframeLoader.html#getMultiFrameImageId#getMultiFrameImageId">getMultiFrameImageId</a></li><li data-type='method' style='display: none;'><a href="module-loaders_multiframeLoader.html#setPixelDataType#setPixelDataType">setPixelDataType</a></li><li data-type='method' style='display: none;'><a href="module-loaders_multiframeLoader.html#buildMultiFrameImage#~buildMultiFrameImage">buildMultiFrameImage</a></li><li data-type='method' style='display: none;'><a href="module-loaders_multiframeLoader.html#loadMultiFrameImage#~loadMultiFrameImage">loadMultiFrameImage</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="module-imaging_tools_custom_contourTool.ContoursTool.html#event:_drawingDoubleTapClickCallback">imaging/tools/custom/contourTool.ContoursTool#_drawingDoubleTapClickCallback</a></li><li><a href="module-imaging_tools_custom_contourTool.ContoursTool.html#event:_drawingMouseDoubleClickCallback">imaging/tools/custom/contourTool.ContoursTool#_drawingMouseDoubleClickCallback</a></li><li><a href="module-imaging_tools_custom_contourTool.ContoursTool.html#event:_drawingMouseDownCallback">imaging/tools/custom/contourTool.ContoursTool#_drawingMouseDownCallback</a></li><li><a href="module-imaging_tools_custom_contourTool.ContoursTool.html#event:_drawingMouseDragCallback">imaging/tools/custom/contourTool.ContoursTool#_drawingMouseDragCallback</a></li><li><a href="module-imaging_tools_custom_contourTool.ContoursTool.html#event:_drawingMouseMoveCallback">imaging/tools/custom/contourTool.ContoursTool#_drawingMouseMoveCallback</a></li><li><a href="module-imaging_tools_custom_contourTool.ContoursTool.html#event:_drawingMouseUpCallback">imaging/tools/custom/contourTool.ContoursTool#_drawingMouseUpCallback</a></li><li><a href="module-imaging_tools_custom_contourTool.ContoursTool.html#event:_drawingTouchDragCallback">imaging/tools/custom/contourTool.ContoursTool#_drawingTouchDragCallback</a></li><li><a href="module-imaging_tools_custom_contourTool.ContoursTool.html#event:_drawingTouchStartCallback">imaging/tools/custom/contourTool.ContoursTool#_drawingTouchStartCallback</a></li><li><a href="module-imaging_tools_custom_contourTool.ContoursTool.html#event:_editMouseDragCallback">imaging/tools/custom/contourTool.ContoursTool#_editMouseDragCallback</a></li><li><a href="module-imaging_tools_custom_contourTool.ContoursTool.html#event:_editTouchDragCallback">imaging/tools/custom/contourTool.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#getSegmentsOnPixelData">getSegmentsOnPixelData</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#setLabelmap3DByFirstImageId">setLabelmap3DByFirstImageId</a></li><li><a href="global.html#setLabelmap3DForElement">setLabelmap3DForElement</a></li></ul>
41
-
42
- </nav>
43
-
44
- <div id="main">
45
-
46
- <h1 class="page-title">imageTools.js</h1>
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
- <section>
55
- <article>
56
- <pre class="prettyprint source linenums"><code>/** @module imaging/imageTools
57
- * @desc This file provides functionalities for
58
- * interacting with cornerstone tools
59
- */
60
-
61
- // external libraries
62
- import cornerstone from "cornerstone-core";
63
- import cornerstoneTools from "cornerstone-tools";
64
- import { each, extend, filter, remove, cloneDeep } from "lodash";
65
-
66
- // internal libraries
67
- import { DEFAULT_TOOLS } from "./tools/default";
68
- // import { SeedsTool } from "./tools/custom/seedTool";
69
- import { ContoursTool } from "./tools/custom/contourTool";
70
- import { EditMaskTool } from "./tools/custom/editMaskTool";
71
- import { DiameterTool } from "./tools/custom/diameterTool";
72
- import { getImageIdFromSlice } from "./loaders/nrrdLoader";
73
- import { getSeriesDataFromLarvitarManager } from "./loaders/commonLoader";
74
- import { parseContours } from "./imageContours";
75
- import { isElement } from "./imageUtils";
76
-
77
- /*
78
- * This module provides the following functions to be exported:
79
- * csToolsCreateStack(element)
80
- * addDefaultTools(toolToActivate)
81
- * clearMeasurements()
82
- * addContoursTool(rawContours, maskName)
83
- * addMaskEditingTool(seriesId,mask,setConfig,callback, targetViewport)
84
- * getCurrentMaskData(viewportId)
85
- * addStackStateToElement(seriesId, element)
86
- * addSeedsTool(preLoadSeeds, initViewport)
87
- * addDiameterTool(targetElementId, diameters, seriesId)
88
- * setToolActive(toolName, options, activeViewport, viewports)
89
- * setToolDisabled(toolName, options, activeViewport, viewports)
90
- * setToolEnabled(toolName, options, activeViewport, viewports)
91
- * setToolPassive(toolName, options, activeViewport, viewports)
92
- * getToolState(toolName)
93
- * updateDiameterTool(diameterId, value, seriesId)
94
- * addToolStateSingleSlice(element, toolType, data, slice, seriesId)
95
- * clearToolStateByName(toolName, options)
96
- * clearCornerstoneElements()
97
- * syncToolStack(srcSliceNumber, toolName, viewport, seriesId)
98
- * updateStackToolState(element, imageIndex)
99
- */
100
-
101
- /**
102
- * Add all default tools, as listed in tools/default.js
103
- * @function addDefaultTools
104
- * @deprecated (OBSOLETE)
105
- */
106
- export const addDefaultTools = function (toolToActivate) {
107
- // for each default tool
108
- each(DEFAULT_TOOLS, tool => {
109
- // check if already added
110
- if (!isToolMissing(tool.name)) {
111
- return;
112
- }
113
-
114
- let configuration = tool.configuration;
115
- let toolClass = cornerstoneTools[tool.class];
116
-
117
- // check target viewports and call add tool with options
118
- if (tool.viewports == "all") {
119
- cornerstoneTools.addTool(toolClass, { configuration });
120
- } else {
121
- // call add tool for element for each element
122
- each(tool.viewports, targetElement => {
123
- cornerstoneTools.addToolForElement(
124
- targetElement,
125
- toolClass,
126
- configuration
127
- );
128
- });
129
- }
130
-
131
- let elements = cornerstone.getEnabledElements();
132
-
133
- // if sync tool, enable
134
- if (tool.sync) {
135
- const synchronizer = new cornerstoneTools.Synchronizer(
136
- "cornerstoneimagerendered",
137
- cornerstoneTools[tool.sync]
138
- );
139
- elements.forEach(element => {
140
- synchronizer.add(element.element);
141
- });
142
-
143
- synchronizer.enabled = true;
144
- }
145
-
146
- if (tool.defaultActive || tool.name == toolToActivate) {
147
- setToolActive(tool.name, tool.options);
148
- }
149
- });
150
-
151
- // set wheel scroll active
152
- setToolActive("StackScrollMouseWheel", {
153
- loop: false, // default false
154
- allowSkipping: false, // default true
155
- invert: false
156
- });
157
- };
158
-
159
- /**
160
- * Add Diameter tool
161
- * @function addDiameterTool
162
- * @param {String} elementId - The target hmtl element id or its DOM HTMLElement
163
- * @param {Array} diameters - The array of diameter objects.
164
- * @param {String} seriesId - The id of the target serie.
165
- */
166
- export const addDiameterTool = function (elementId, diameters, seriesId) {
167
- if (isToolMissing("Diameter")) {
168
- let element = isElement(elementId)
169
- ? elementId
170
- : document.getElementById(elementId);
171
- cornerstoneTools.addToolForElement(element, DiameterTool, {
172
- dataArray: diameters,
173
- seriesId: seriesId
174
- });
175
- setToolPassive("Diameter");
176
- }
177
- };
178
-
179
- /**
180
- * Add Contour tool
181
- * @function addContoursTool
182
- * @param {Object} rawContours - The contours object (generated from a segmentation mask).
183
- * @param {String} maskName - The name tag that identify the mask
184
- */
185
- export const addContoursTool = function (rawContours, maskName) {
186
- var pointBatchSize = 2;
187
- console.time("...parsing contours");
188
- var contoursParsedData = parseContours(rawContours, pointBatchSize, maskName);
189
- console.timeEnd("...parsing contours");
190
- cornerstoneTools.addTool(ContoursTool, {
191
- contoursParsedData,
192
- maskName
193
- });
194
- };
195
-
196
- /**
197
- * Add mask editing tool
198
- * @function addMaskEditingTool
199
- * @param {Array} mask - The mask data.
200
- * @param {Function} callback - The tool initialization callback
201
- * @param {String} targetViewport - The target hmtl element id.
202
- */
203
- export const addMaskEditingTool = function (mask, callback, targetViewport) {
204
- let enabledElements = cornerstone.getEnabledElements();
205
-
206
- each(enabledElements, el => {
207
- if (el.element.id == targetViewport) {
208
- cornerstoneTools.addToolForElement(el.element, EditMaskTool, {
209
- mask: mask,
210
- initCallback: callback,
211
- configuration: { alwaysEraseOnClick: false }
212
- });
213
- cornerstoneTools.setToolEnabledForElement(el.element, "EditMask", {
214
- mouseButtonMask: 1
215
- });
216
- }
217
- });
218
-
219
- let defaultConfig = {
220
- radius: 5,
221
- fillAlpha: 0.5
222
- };
223
-
224
- setSegmentationConfig(defaultConfig);
225
- };
226
-
227
- /**
228
- * Modify configuration for cornerstone tools segmentation module
229
- * @function setSegmentationConfig
230
- * @param {Object} config - The custom configuration.
231
- * @example
232
- * Example of custom configuration
233
- * config = {
234
- renderOutline: true,
235
- renderFill: true,
236
- shouldRenderInactiveLabelmaps: true,
237
- radius: 10,
238
- minRadius: 1,
239
- maxRadius: 50,
240
- segmentsPerLabelmap: 65535,
241
- fillAlpha: 0.7,
242
- fillAlphaInactive: 0.1,
243
- outlineAlpha: 0.7,
244
- outlineAlphaInactive: 0.35,
245
- outlineWidth: 3,
246
- storeHistory: true
247
- };
248
- */
249
- export const setSegmentationConfig = function (config) {
250
- let { configuration } = cornerstoneTools.getModule("segmentation");
251
- extend(configuration, config);
252
- let enabledElements = cornerstone.getEnabledElements();
253
- each(enabledElements, el => {
254
- cornerstone.updateImage(el.element);
255
- });
256
- };
257
-
258
- /**
259
- * Get mask editing tool current data from state
260
- * @function getCurrentMaskData
261
- * @param {String} viewportId - The target hmtl element id.
262
- * @return {Array} labelmap3D - The mask array
263
- */
264
- export const getCurrentMaskData = function (viewportId) {
265
- const { getters } = cornerstoneTools.getModule("segmentation");
266
- let enabledElement = cornerstone
267
- .getEnabledElements()
268
- .filter(e => e.element.id == viewportId)
269
- .pop();
270
-
271
- const { labelmap3D } = getters.labelmap2D(enabledElement.element);
272
- return labelmap3D;
273
- };
274
-
275
- /**
276
- * Add Stack State to a single hmtl element
277
- * @function addStackStateToElement
278
- * @param {String} seriesId - The id of the target serie.
279
- * @param {HTMLElement} element - The target hmtl element.
280
- */
281
- export const addStackStateToElement = function (seriesId, element) {
282
- // Define the Stack object
283
- const stack = getSeriesDataFromLarvitarManager(seriesId)[element.id];
284
- // Add the stack tool state to the enabled element
285
- cornerstoneTools.addStackStateManager(element, ["stack"]);
286
- cornerstoneTools.addToolState(element, "stack", stack);
287
- };
288
-
289
- /**
290
- * Add seeds tool
291
- * @function addSeedsTool
292
- * @param {Array} preLoadSeeds - The array of seeds to load as initialization.
293
- * @param {String} initViewport - The hmtl element id to be used for tool initialization.
294
- */
295
- export const addSeedsTool = function (preLoadSeeds, initViewport) {
296
- if (isToolMissing("Seeds")) {
297
- let enabledElements = cornerstone.getEnabledElements();
298
- each(enabledElements, el => {
299
- let initialize = el.element.id == initViewport;
300
- cornerstoneTools.addToolForElement(el.element, SeedsTool, {
301
- preLoadSeeds,
302
- initialize,
303
- initViewport
304
- });
305
- });
306
- setToolEnabled("Seeds");
307
- }
308
- };
309
-
310
- /**
311
- * Delete all measurements from tools state, for tools that have the "cleaneable" prop set to true in tools/default.js
312
- * @function clearMeasurements
313
- */
314
- export const clearMeasurements = function () {
315
- let enabledElements = cornerstone.getEnabledElements();
316
- let clenableTools = filter(DEFAULT_TOOLS, "cleanable");
317
-
318
- each(enabledElements, el => {
319
- each(clenableTools, function (tool) {
320
- cornerstoneTools.clearToolState(el.element, tool.name);
321
- });
322
- });
323
- each(enabledElements, el => {
324
- cornerstone.updateImage(el.element);
325
- });
326
- };
327
-
328
- /**
329
- * Set Tool "active" on all elements (ie, rendered and manipulable) &amp; refresh cornerstone elements
330
- * @function setToolActive
331
- * @param {String} toolName - The tool name.
332
- * @param {Object} options - The custom options. @default from tools/default.js
333
- * @param {String} activeViewport - The active viewport (if "all", viewports array will be used)
334
- * @param {Array} viewports - The hmtl element id to be used for tool initialization.
335
- */
336
- export const setToolActive = function (
337
- toolName,
338
- options,
339
- activeViewport,
340
- viewports
341
- ) {
342
- let defaultOpt = DEFAULT_TOOLS[toolName].options;
343
- extend(defaultOpt, options);
344
- cornerstoneTools.setToolActive(toolName, defaultOpt);
345
- if (activeViewport == "all") {
346
- each(viewports, function (elementId) {
347
- let el = document.getElementById(elementId);
348
- if (el) {
349
- cornerstone.updateImage(el);
350
- }
351
- });
352
- } else {
353
- let el = document.getElementById(activeViewport);
354
- if (el) {
355
- cornerstone.updateImage(el);
356
- }
357
- }
358
- };
359
-
360
- /**
361
- * Set Tool "disabled" on all elements (ie, not rendered) &amp; refresh cornerstone elements
362
- * @function setToolActive
363
- * @param {String} toolName - The tool name.
364
- * @param {String} activeViewport - The active viewport (if "all", viewports array will be used)
365
- * @param {Array} viewports - The hmtl element id to be used for tool initialization.
366
- */
367
- export const setToolDisabled = function (toolName, activeViewport, viewports) {
368
- cornerstoneTools.setToolDisabled(toolName);
369
- if (activeViewport == "all") {
370
- each(viewports, function (elementId) {
371
- let el = document.getElementById(elementId);
372
- if (el) {
373
- cornerstone.updateImage(el);
374
- }
375
- });
376
- } else {
377
- let el = document.getElementById(activeViewport);
378
- if (el) {
379
- cornerstone.updateImage(el);
380
- }
381
- }
382
- };
383
-
384
- /**
385
- * Set Tool "enabled" on all elements (ie, rendered but not manipulable) &amp; refresh cornerstone elements
386
- * @function setToolEnabled
387
- * @param {String} toolName - The tool name.
388
- * @param {String} activeViewport - The active viewport (if "all", viewports array will be used)
389
- * @param {Array} viewports - The hmtl element id to be used for tool initialization.
390
- */
391
- export const setToolEnabled = function (toolName, activeViewport, viewports) {
392
- cornerstoneTools.setToolEnabled(toolName);
393
- if (activeViewport == "all") {
394
- each(viewports, function (elementId) {
395
- let el = document.getElementById(elementId);
396
- if (el) {
397
- cornerstone.updateImage(el);
398
- }
399
- });
400
- } else {
401
- let el = document.getElementById(activeViewport);
402
- if (el) {
403
- cornerstone.updateImage(el);
404
- }
405
- }
406
- };
407
-
408
- /**
409
- * Set Tool "enabled" on all elements (ie, rendered and manipulable passively) &amp; refresh cornerstone elements
410
- * @function setToolPassive
411
- * @param {String} toolName - The tool name.
412
- * @param {String} activeViewport - The active viewport (if "all", viewports array will be used)
413
- * @param {Array} viewports - The hmtl element id to be used for tool initialization.
414
- */
415
- export const setToolPassive = function (toolName, activeViewport, viewports) {
416
- cornerstoneTools.setToolPassive(toolName);
417
- if (activeViewport == "all") {
418
- each(viewports, function (elementId) {
419
- let el = document.getElementById(elementId);
420
- if (el) {
421
- cornerstone.updateImage(el);
422
- }
423
- });
424
- } else {
425
- let el = document.getElementById(activeViewport);
426
- if (el) {
427
- cornerstone.updateImage(el);
428
- }
429
- }
430
- };
431
-
432
- /**
433
- * Get tool data for all enabled elements
434
- * @function getToolState
435
- * @param {String} toolName - The tool name.
436
- * @return {Object} - Tool data grouped by element id
437
- */
438
- export const getToolState = function (toolName) {
439
- let enabledElements = cornerstone.getEnabledElements();
440
- let toolData = {};
441
- each(enabledElements, el => {
442
- toolData[el.element.id] = cornerstoneTools.getToolState(
443
- el.element,
444
- toolName
445
- );
446
- });
447
- return toolData;
448
- };
449
-
450
- /**
451
- * Clear tool data for a subset of seeds
452
- * @function clearToolStateByName
453
- * @param {String} toolName - The tool name.
454
- * @param {Object} options - Props used to select the data to delete (at the moment only {name : "targetName"} is implemented)
455
- */
456
- export const clearToolStateByName = function (toolName, options) {
457
- let enabledElements = cornerstone.getEnabledElements();
458
- each(enabledElements, el => {
459
- const toolStateManager = el.toolStateManager;
460
- let imageIds = Object.keys(toolStateManager.toolState);
461
- each(imageIds, imageId => {
462
- let toolData = toolStateManager.toolState[imageId];
463
- if (toolData[toolName]) {
464
- remove(toolData[toolName].data, singleData => {
465
- return singleData.name == options.name;
466
- });
467
- }
468
- });
469
- });
470
- each(enabledElements, el => {
471
- cornerstone.updateImage(el.element);
472
- });
473
- };
474
-
475
- /**
476
- * Update diameter tool with new value (removing old one)
477
- * @function updateDiameterTool
478
- * @param {String | Number} diameterId - The id that identify the diameter data.
479
- * @param {Object} value - The object representing the new diameter data.
480
- * @param {String} seriesId - The target serie id.
481
- * @param {String} viewportId - The viewport id.
482
- */
483
- export const updateDiameterTool = function (
484
- diameterId,
485
- value,
486
- seriesId,
487
- viewportId
488
- ) {
489
- // clear target diameter
490
- if (!diameterId) {
491
- console.warn("no diameterId, return");
492
- return;
493
- }
494
-
495
- clearToolStateByName("Diameter", {
496
- name: diameterId
497
- });
498
- // insert new one
499
- let data = {
500
- toolType: "Diameter",
501
- name: diameterId,
502
- isCreating: true,
503
- visible: true,
504
- active: false,
505
- invalidated: false,
506
- handles: {
507
- start: {
508
- x: value.tool.x1,
509
- y: value.tool.y1,
510
- index: 0,
511
- drawnIndependently: false,
512
- allowedOutsideImage: false,
513
- highlight: true,
514
- active: false
515
- },
516
- end: {
517
- x: value.tool.x2,
518
- y: value.tool.y2,
519
- index: 1,
520
- drawnIndependently: false,
521
- allowedOutsideImage: false,
522
- highlight: true,
523
- active: false
524
- },
525
- perpendicularStart: {
526
- x: value.tool.x3,
527
- y: value.tool.y3,
528
- index: 2,
529
- drawnIndependently: false,
530
- allowedOutsideImage: false,
531
- highlight: true,
532
- active: false,
533
- locked: false
534
- },
535
- perpendicularEnd: {
536
- x: value.tool.x4,
537
- y: value.tool.y4,
538
- index: 3,
539
- drawnIndependently: false,
540
- allowedOutsideImage: false,
541
- highlight: true,
542
- active: false
543
- },
544
- textBox: {
545
- x: value.tool.value_max,
546
- y: value.tool.value_min,
547
- index: null,
548
- drawnIndependently: true,
549
- allowedOutsideImage: true,
550
- highlight: false,
551
- active: false,
552
- hasMoved: true,
553
- movesIndependently: false,
554
- hasBoundingBox: true,
555
- boundingBox: {
556
- width: 59.6484375,
557
- height: 47,
558
- left: 165.02487562189057,
559
- top: 240.53482587064684
560
- }
561
- }
562
- },
563
- longestDiameter: value.tool.value_max.toString(),
564
- shortestDiameter: value.tool.value_min.toString()
565
- };
566
-
567
- let sliceNumber = value.tool.slice;
568
- let enabledElement = cornerstone
569
- .getEnabledElements()
570
- .filter(el => el.element.id == viewportId)
571
- .pop();
572
-
573
- // add to master viewport
574
- addToolStateSingleSlice(
575
- enabledElement.element,
576
- "Diameter",
577
- data,
578
- sliceNumber,
579
- seriesId
580
- );
581
- };
582
-
583
- /**
584
- * Add tool data for a single target slice
585
- * @function addToolStateSingleSlice
586
- * @param {HTMLElement} element - The target hmtl element.
587
- * @param {String} toolName - The tool name.
588
- * @param {Object | Array} data - The tool data to add (tool-specific)
589
- * @param {Number} slice - The target slice to put the data in.
590
- * @param {String} seriesId - The target serie id.
591
- */
592
- export const addToolStateSingleSlice = function (
593
- element,
594
- toolName,
595
- data,
596
- slice,
597
- seriesId
598
- ) {
599
- const enabledElement = cornerstone.getEnabledElement(element);
600
-
601
- if (!enabledElement.image) {
602
- console.warn("no image");
603
- return;
604
- }
605
-
606
- let targetImageId = getImageIdFromSlice(slice, element.id, seriesId);
607
-
608
- if (enabledElement.toolStateManager === undefined) {
609
- console.warn("State Manager undefined");
610
- return;
611
- }
612
- let toolState = enabledElement.toolStateManager.toolState;
613
-
614
- if (toolState.hasOwnProperty(targetImageId) === false) {
615
- toolState[targetImageId] = {};
616
- }
617
-
618
- const imageIdToolState = toolState[targetImageId];
619
-
620
- // If we don't have tool state for this type of tool, add an empty object
621
- if (imageIdToolState.hasOwnProperty(toolName) === false) {
622
- imageIdToolState[toolName] = {
623
- data: []
624
- };
625
- }
626
-
627
- const toolData = imageIdToolState[toolName];
628
-
629
- // if an array is provided, override data
630
- // if (Array.isArray(data)) {
631
- // toolData.data = data;
632
- // } else {
633
- // toolData.data.push(data);
634
- // }
635
-
636
- // This implementation works better
637
- let singledata = typeof data.pop == "function" ? data.pop() : data;
638
- // remove old data for this id (avoid doubling contours) // TODO generalize
639
- if (toolName == "ContoursTool") {
640
- remove(toolData.data, entry => entry &amp;&amp; entry.id == singledata.id);
641
- }
642
- toolData.data.push(singledata);
643
- };
644
-
645
- /**
646
- * Clear tool state and disable all cornerstone elements
647
- * @function clearCornerstoneElements
648
- */
649
- export const clearCornerstoneElements = function () {
650
- var enabledElements = cornerstone.getEnabledElements();
651
- var inMemElements = cloneDeep(enabledElements); // copy before modifying
652
- each(inMemElements, el => {
653
- each(DEFAULT_TOOLS, function (tool) {
654
- if (tool.cleanable) {
655
- cornerstoneTools.clearToolState(el.element, tool.name);
656
- }
657
- });
658
- cornerstone.disable(el.element);
659
- });
660
- };
661
-
662
- /**
663
- * Sync the cornerstone tools stack given a slice as data source
664
- * @function syncToolStack
665
- * @param {Number} srcSliceNumber - The slice to be used as data source.
666
- * @param {String} toolName - The name of the tool to sync.
667
- * @param {String} viewport - The target viewport id.
668
- * @param {String} seriesId - The target serie id.
669
- */
670
- export const syncToolStack = function (
671
- srcSliceNumber,
672
- toolName,
673
- viewport,
674
- seriesId
675
- ) {
676
- // get the imageIds array
677
- let seriesData = getSeriesDataFromLarvitarManager(seriesId);
678
- let imageIds = seriesData[viewport].imageIds;
679
-
680
- // get the tool state of source imageId
681
- let element = document.getElementById(viewport);
682
- let enabledElement = cornerstone.getEnabledElement(element);
683
- let srcImageId = getImageIdFromSlice(srcSliceNumber, viewport, seriesId);
684
- let srcImageToolState =
685
- enabledElement.toolStateManager.toolState[srcImageId][toolName];
686
-
687
- each(Object.keys(imageIds), sliceNumber => {
688
- if (sliceNumber == srcSliceNumber) {
689
- return;
690
- }
691
- each(srcImageToolState, data => {
692
- addToolStateSingleSlice(element, toolName, data, sliceNumber, seriesId);
693
- });
694
- });
695
- };
696
-
697
- /**
698
- * Update slice index in cornerstone tools stack state
699
- * @function updateStackToolState
700
- * @param {String} elementId - The html div id used for rendering or its DOM HTMLElement
701
- * @param {Number} imageIndex - The new imageIndex value.
702
- */
703
- export const updateStackToolState = function (elementId, imageIndex) {
704
- let element = isElement(elementId)
705
- ? elementId
706
- : document.getElementById(elementId);
707
- if (!element) {
708
- console.error("invalid html element: " + elementId);
709
- return;
710
- }
711
- let enabledElement = cornerstone.getEnabledElement(element);
712
- if (!enabledElement.toolStateManager) {
713
- return;
714
- }
715
- let stackState = enabledElement.toolStateManager.toolState["stack"];
716
- if (!stackState) {
717
- return;
718
- }
719
- // READY for different segmentations data (data[segmentation_label_id])
720
- stackState.data[0].currentImageIdIndex = imageIndex;
721
- };
722
-
723
- /** @inner Internal module functions */
724
-
725
- /**
726
- * Check if a tool has already been added
727
- * @function isToolMissing
728
- * @param {String} toolName - The tool name.
729
- * @param {Array} _viewports - The viewports to check.
730
- */
731
- const isToolMissing = function (toolName, _viewports) {
732
- let isToolMissing = false;
733
-
734
- if (_viewports) {
735
- each(_viewports, function (viewport) {
736
- let element = cornerstone.getEnabledElement(
737
- document.getElementById(viewport)
738
- );
739
- let added = cornerstoneTools.getToolForElement(element, toolName);
740
- if (added === undefined) {
741
- isToolMissing = true;
742
- }
743
- });
744
- } else {
745
- let elements = cornerstone.getEnabledElements();
746
- each(elements, function (element) {
747
- let added = cornerstoneTools.getToolForElement(element, toolName);
748
- if (added === undefined) {
749
- isToolMissing = true;
750
- }
751
- });
752
- }
753
-
754
- return isToolMissing;
755
- };
756
- </code></pre>
757
- </article>
758
- </section>
759
-
760
-
761
-
762
-
763
-
764
-
765
- </div>
766
-
767
- <br class="clear">
768
-
769
- <footer>
770
- 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.
771
- </footer>
772
-
773
- <script>prettyPrint();</script>
774
- <script src="scripts/polyfill.js"></script>
775
- <script src="scripts/linenumber.js"></script>
776
-
777
- <script src="scripts/search.js" defer></script>
778
-
779
-
780
- <script src="scripts/collapse.js" defer></script>
781
-
782
-
783
- </body>
784
- </html>