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,849 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
-
5
- <meta charset="utf-8">
6
- <title>imageRendering.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">imageRendering.js</h1>
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
- <section>
55
- <article>
56
- <pre class="prettyprint source linenums"><code>/** @module imaging/imageRendering
57
- * @desc This file provides functionalities for
58
- * rendering images in html canvas using cornerstone
59
- */
60
-
61
- // external libraries
62
- import cornerstone from "cornerstone-core";
63
- import cornerstoneWADOImageLoader from "cornerstone-wado-image-loader";
64
- import { each, has } from "lodash";
65
-
66
- // internal libraries
67
- import { getFileImageId } from "./loaders/fileLoader";
68
- import { csToolsCreateStack } from "./tools/main";
69
- import { toggleMouseToolsListeners } from "./tools/interaction";
70
- import { larvitar_store } from "./imageStore";
71
- import { applyColorMap } from "./imageColormaps";
72
- import { isElement } from "./imageUtils";
73
-
74
- /*
75
- * This module provides the following functions to be exported:
76
- * clearImageCache(seriesId)
77
- * loadAndCacheImages(seriesData)
78
- * renderFileImage(file, elementId)
79
- * renderWebImage(url, elementId)
80
- * disableViewport(elementId)
81
- * unloadViewport(elementId, seriesId)
82
- * resizeViewport(elementId)
83
- * renderImage(series, elementId, defaultProps)
84
- * updateImage(series, elementId, imageIndex)
85
- * resetViewports([elementIds])
86
- * updateViewportData(elementId)
87
- * toggleMouseHandlers(elementId, disableFlag)
88
- * storeViewportData(params...)
89
- * invertImage(elementId)
90
- * flipImageHorizontal(elementId)
91
- * flipImageVertical(elementId)
92
- * rotateImageLeft(elementId)
93
- * rotateImageRight(elementId)
94
- */
95
-
96
- /**
97
- * Purge the cornestone internal cache
98
- * If seriesId is passed as argument only imageIds of the series are purged from internal cache
99
- * @instance
100
- * @function clearImageCache
101
- * @param {String} seriesId - The id of the serie
102
- */
103
- export const clearImageCache = function (seriesId) {
104
- if (seriesId) {
105
- let series = larvitar_store.get("series");
106
- if (has(series, seriesId)) {
107
- each(series[seriesId].imageIds, function (imageId) {
108
- if (cornerstone.imageCache.cachedImages.length > 0) {
109
- try {
110
- cornerstone.imageCache.removeImageLoadObject(imageId);
111
- } catch (e) {
112
- console.warn("no cached image");
113
- }
114
- } else {
115
- let uri =
116
- cornerstoneWADOImageLoader.wadouri.parseImageId(imageId).url;
117
- cornerstoneWADOImageLoader.wadouri.dataSetCacheManager.unload(uri);
118
- }
119
- });
120
-
121
- larvitar_store.removeSeriesIds(seriesId);
122
- console.log("Uncached images for ", seriesId);
123
- }
124
- } else {
125
- cornerstone.imageCache.purgeCache();
126
- }
127
- };
128
-
129
- /**
130
- * Load and cache all serie's images
131
- * Add series's imageIds into store
132
- * @instance
133
- * @function loadAndCacheImages
134
- * @param {Object} series the parsed series data
135
- * @param {Function} callback a callback function
136
- */
137
- export function loadAndCacheImages(series, callback) {
138
- let t0 = performance.now();
139
- let cachingCounter = 0;
140
- if (series.isMultiframe) {
141
- // console.warn("Do not cache multiframe images for performance issues");
142
- return;
143
- }
144
- let response = {
145
- seriesId: series.seriesUID,
146
- loading: 0,
147
- series: {}
148
- };
149
- callback(response);
150
- // add serie's imageIds into store
151
- larvitar_store.addSeriesIds(series.seriesUID, series.imageIds);
152
- // add serie's caching progress into store
153
- larvitar_store.set("progress", [series.seriesUID, 0]);
154
- each(series.imageIds, function (imageId) {
155
- cornerstone.loadAndCacheImage(imageId).then(function () {
156
- cachingCounter += 1;
157
- let cachingPercentage = Math.floor(
158
- (cachingCounter / series.imageIds.length) * 100
159
- );
160
- response.loading = cachingPercentage;
161
- larvitar_store.set("progress", [series.seriesUID, cachingPercentage]);
162
- if (cachingCounter == series.imageIds.length) {
163
- let t1 = performance.now();
164
- console.log(`Call to cacheImages took ${t1 - t0} milliseconds.`);
165
- console.log("Cached images for ", series.seriesUID);
166
- response.series = series;
167
- }
168
- callback(response);
169
- });
170
- });
171
- }
172
-
173
- /**
174
- * Render an image (png or jpg) from File on a html div using cornerstone
175
- * @instance
176
- * @function renderWebImage
177
- * @param {Object} file - The image File object
178
- * @param {String} elementId - The html div id used for rendering or its DOM HTMLElement
179
- * @returns {Promise} - Return a promise which will resolve when image is displayed
180
- */
181
- export const renderFileImage = function (file, elementId) {
182
- let element = isElement(elementId)
183
- ? elementId
184
- : document.getElementById(elementId);
185
- if (!element) {
186
- console.error("invalid html element: " + elementId);
187
- return;
188
- }
189
-
190
- if (cornerstone.getEnabledElements().length == 0) {
191
- cornerstone.enable(element);
192
- }
193
-
194
- let renderPromise = new Promise(resolve => {
195
- // check if imageId is already stored in fileManager
196
- const imageId = getFileImageId(file);
197
- if (imageId) {
198
- cornerstone.loadImage(imageId).then(function (image) {
199
- cornerstone.displayImage(element, image);
200
- let viewport = cornerstone.getViewport(element);
201
- viewport.displayedArea.brhc.x = image.width;
202
- viewport.displayedArea.brhc.y = image.height;
203
- cornerstone.setViewport(element, viewport);
204
- cornerstone.fitToWindow(element);
205
- csToolsCreateStack(element);
206
- resolve(image);
207
- });
208
- }
209
- });
210
- return renderPromise;
211
- };
212
-
213
- /**
214
- * Render an image (png or jpg) from web url on a html div using cornerstone
215
- * @instance
216
- * @function renderWebImage
217
- * @param {String} url - The image data url
218
- * @param {String} elementId - The html div id used for rendering or its DOM HTMLElement
219
- * @returns {Promise} - Return a promise which will resolve when image is displayed
220
- */
221
- export const renderWebImage = function (url, elementId) {
222
- let element = isElement(elementId)
223
- ? elementId
224
- : document.getElementById(elementId);
225
- if (!element) {
226
- console.error("invalid html element: " + elementId);
227
- return;
228
- }
229
- let renderPromise = new Promise(resolve => {
230
- cornerstone.enable(element);
231
- cornerstone.loadImage(url).then(function (image) {
232
- cornerstone.displayImage(element, image);
233
- csToolsCreateStack(element);
234
- resolve(image);
235
- });
236
- });
237
- return renderPromise;
238
- };
239
-
240
- /**
241
- * Unrender an image on a html div using cornerstone
242
- * @instance
243
- * @function disableViewport
244
- * @param {String} elementId - The html div id used for rendering or its DOM HTMLElement
245
- */
246
- export const disableViewport = function (elementId) {
247
- let element = isElement(elementId)
248
- ? elementId
249
- : document.getElementById(elementId);
250
- if (!element) {
251
- console.error("invalid html element: " + elementId);
252
- return;
253
- }
254
- // toggleMouseHandlers(elementId, true); // flagged true to disable handlers
255
- toggleMouseToolsListeners(elementId, true);
256
- cornerstone.disable(element);
257
- };
258
-
259
- /**
260
- * Unrender an image on a html div using cornerstone
261
- * Remove image from cornerstone cache and remove from store
262
- * @instance
263
- * @function unloadViewport
264
- * @param {String} elementId - The html div id used for rendering or its DOM HTMLElement
265
- * @param {String} seriesId - The id of the serie
266
- */
267
- export const unloadViewport = function (elementId, seriesId) {
268
- disableViewport(elementId);
269
-
270
- if (!seriesId) {
271
- console.warn(
272
- "seriesId not provided, use disableViewport if you do not want to uncache images"
273
- );
274
- }
275
- // remove images from cornerstone cache
276
- if (seriesId &amp;&amp; has(larvitar_store.get("series"), seriesId)) {
277
- clearImageCache(seriesId);
278
- }
279
- larvitar_store.deleteViewport(elementId);
280
- };
281
-
282
- /**
283
- * Resize a viewport using cornerstone resize
284
- * And forcing fit to window
285
- * @instance
286
- * @function resizeViewport
287
- * @param {String} elementId - The html div id used for rendering or its DOM HTMLElement
288
- */
289
- export const resizeViewport = function (elementId) {
290
- let element = isElement(elementId)
291
- ? elementId
292
- : document.getElementById(elementId);
293
- if (!element) {
294
- console.error("invalid html element: " + elementId);
295
- return;
296
- }
297
- cornerstone.resize(element, true); // true flag forces fitToWindow
298
- };
299
-
300
- /**
301
- * Cache image and render it in a html div using cornerstone
302
- * @instance
303
- * @function renderImage
304
- * @param {Object} seriesStack - The original series data object
305
- * @param {String} elementId - The html div id used for rendering or its DOM HTMLElement
306
- * @param {Object} defaultProps - Optional default props
307
- * @return {Promise} Return a promise which will resolve when image is displayed
308
- */
309
- export const renderImage = function (seriesStack, elementId, defaultProps) {
310
- let t0 = performance.now();
311
-
312
- // get element and enable it
313
- let element = isElement(elementId)
314
- ? elementId
315
- : document.getElementById(elementId);
316
- if (!element) {
317
- console.error("invalid html element: " + elementId);
318
- return;
319
- }
320
- cornerstone.enable(element);
321
-
322
- let series = { ...seriesStack };
323
-
324
- // default to 0 if multiframe and frameId is null
325
- // let frameId = series.isMultiframe ? 1 : null;
326
-
327
- larvitar_store.set("renderingStatus", [elementId, false]);
328
- let data = getSeriesData(series, defaultProps);
329
- if (!data.imageId) {
330
- console.warn("Error during renderImage: imageId has not been loaded yet.");
331
- return;
332
- }
333
-
334
- let renderPromise = new Promise(resolve => {
335
- // load and display one image (imageId)
336
- cornerstone.loadImage(data.imageId).then(function (image) {
337
- cornerstone.displayImage(element, image);
338
-
339
- if (series.layer) {
340
- // assign the image to its layer and return its id
341
- series.layer.id = cornerstone.addLayer(
342
- element,
343
- image,
344
- series.layer.options
345
- );
346
- }
347
-
348
- let viewport = cornerstone.getViewport(element);
349
-
350
- // window width and window level
351
- // are stored in specific dicom tags
352
- // (x00281050 and x00281051)
353
- // if not present check in image object
354
- data.ww = data.ww ? data.ww : image.windowWidth;
355
- data.wc = data.wc ? data.wc : image.windowCenter;
356
- data.defaultWW = data.defaultWW ? data.defaultWW : data.ww;
357
- data.defaultWC = data.defaultWC ? data.defaultWC : data.wc;
358
-
359
- cornerstone.fitToWindow(element);
360
-
361
- if (defaultProps &amp;&amp; has(defaultProps, "scale")) {
362
- viewport.scale = defaultProps["scale"];
363
- cornerstone.setViewport(element, viewport);
364
- }
365
-
366
- if (
367
- defaultProps &amp;&amp;
368
- has(defaultProps, "tr_x") &amp;&amp;
369
- has(defaultProps, "tr_y")
370
- ) {
371
- viewport.translation.x = defaultProps["tr_x"];
372
- viewport.translation.y = defaultProps["tr_y"];
373
- cornerstone.setViewport(element, viewport);
374
- }
375
-
376
- // color maps
377
- if (
378
- defaultProps &amp;&amp;
379
- has(defaultProps, "colormap") &amp;&amp;
380
- image.color == false
381
- ) {
382
- applyColorMap(defaultProps["colormap"]);
383
- }
384
-
385
- let storedViewport = cornerstone.getViewport(element);
386
- storeViewportData(
387
- image,
388
- elementId,
389
- data.imageIndex,
390
- data.numberOfSlices,
391
- data.rows,
392
- data.cols,
393
- data.spacing_x,
394
- data.spacing_y,
395
- data.thickness,
396
- storedViewport,
397
- data.defaultWW,
398
- data.defaultWC
399
- );
400
- larvitar_store.set("renderingStatus", [elementId, true]);
401
- let t1 = performance.now();
402
- console.log(`Call to renderImage took ${t1 - t0} milliseconds.`);
403
-
404
- let uri = cornerstoneWADOImageLoader.wadouri.parseImageId(
405
- data.imageId
406
- ).url;
407
- cornerstoneWADOImageLoader.wadouri.dataSetCacheManager.unload(uri);
408
- image = null;
409
- series = null;
410
- data = null;
411
- resolve();
412
- });
413
- });
414
-
415
- csToolsCreateStack(element, series.imageIds, data.imageIndex - 1);
416
- toggleMouseToolsListeners(elementId);
417
-
418
- return renderPromise;
419
- };
420
-
421
- /**
422
- * Update the cornerstone image with new imageIndex
423
- * @instance
424
- * @function updateImage
425
- * @param {Object} series - The original series data object
426
- * @param {String} elementId - The html div id used for rendering or its DOM HTMLElement
427
- * @param {Number} imageIndex - The index of the image to be rendered
428
- * @param {Boolean} cacheImage - A flag to handle image cache
429
- */
430
- export const updateImage = function (
431
- series,
432
- elementId,
433
- imageIndex,
434
- cacheImage
435
- ) {
436
- let element = isElement(elementId)
437
- ? elementId
438
- : document.getElementById(elementId);
439
- if (!element) {
440
- console.log("not element");
441
- return;
442
- }
443
- let index = imageIndex == 0 ? imageIndex : imageIndex - 1;
444
- if (cacheImage) {
445
- cornerstone
446
- .loadAndCacheImage(series.imageIds[index])
447
- .then(function (image) {
448
- cornerstone.displayImage(element, image);
449
- });
450
- } else {
451
- cornerstone.loadImage(series.imageIds[index]).then(function (image) {
452
- cornerstone.displayImage(element, image);
453
- });
454
- }
455
- };
456
-
457
- /**
458
- * Reset viewport values (scale, translation and wwwc)
459
- * @instance
460
- * @function resetViewports
461
- * @param {Array} elementIds - The array of hmtl div ids
462
- */
463
- export const resetViewports = function (elementIds) {
464
- each(elementIds, function (elementId) {
465
- let element = document.getElementById(elementId);
466
- if (!element) {
467
- console.error("invalid html element: " + elementId);
468
- return;
469
- }
470
- let viewport = cornerstone.getViewport(element);
471
- viewport.scale = larvitar_store.get(
472
- "viewports",
473
- elementId,
474
- "default",
475
- "scale"
476
- );
477
-
478
- viewport.rotation = larvitar_store.get(
479
- "viewports",
480
- elementId,
481
- "default",
482
- "rotation"
483
- );
484
- viewport.translation.x = larvitar_store.get(
485
- "viewports",
486
- elementId,
487
- "default",
488
- "translation",
489
- "x"
490
- );
491
- viewport.translation.y = larvitar_store.get(
492
- "viewports",
493
- elementId,
494
- "default",
495
- "translation",
496
- "y"
497
- );
498
- viewport.voi.windowWidth = larvitar_store.get(
499
- "viewports",
500
- elementId,
501
- "default",
502
- "voi",
503
- "windowWidth"
504
- );
505
- viewport.voi.windowCenter = larvitar_store.get(
506
- "viewports",
507
- elementId,
508
- "default",
509
- "voi",
510
- "windowCenter"
511
- );
512
-
513
- viewport.hflip = false;
514
- viewport.vflip = false;
515
- viewport.invert = false;
516
-
517
- cornerstone.setViewport(element, viewport);
518
- cornerstone.fitToWindow(element);
519
- cornerstone.updateImage(element);
520
-
521
- larvitar_store.set("scale", [elementId, viewport.scale]);
522
- larvitar_store.set("rotation", [elementId, viewport.rotation]);
523
- larvitar_store.set("translation", [
524
- elementId,
525
- viewport.translation.x,
526
- viewport.translation.y
527
- ]);
528
- larvitar_store.set("contrast", [
529
- elementId,
530
- viewport.voi.windowWidth,
531
- viewport.voi.windowCenter
532
- ]);
533
- });
534
- };
535
-
536
- /**
537
- * Update viewport data in store
538
- * @instance
539
- * @function updateViewportData
540
- * @param {String} elementId - The html div id used for rendering or its DOM HTMLElement
541
- * @param {Object} viewportData - The new viewport data
542
- */
543
- export const updateViewportData = function (
544
- elementId,
545
- viewportData,
546
- activeTool
547
- ) {
548
- let element = isElement(elementId)
549
- ? elementId
550
- : document.getElementById(elementId);
551
- if (!element) {
552
- console.error("invalid html element: " + elementId);
553
- return;
554
- }
555
- switch (activeTool) {
556
- case "Wwwc":
557
- case "WwwcRegion":
558
- // sync viewports if needed
559
- let elements = cornerstone.getEnabledElements();
560
- each(elements, function (el) {
561
- larvitar_store.set("contrast", [
562
- el.element.id,
563
- viewportData.voi.windowWidth,
564
- viewportData.voi.windowCenter
565
- ]);
566
- });
567
- break;
568
- case "Pan":
569
- larvitar_store.set("translation", [
570
- elementId,
571
- viewportData.translation.x,
572
- viewportData.translation.y
573
- ]);
574
- break;
575
- case "Zoom":
576
- larvitar_store.set("scale", [elementId, viewportData.scale]);
577
- break;
578
- case "Rotate":
579
- larvitar_store.set("rotation", [elementId, viewportData.rotation]);
580
- break;
581
- default:
582
- break;
583
- }
584
- };
585
-
586
- /**
587
- * Store the viewport data into internal storage
588
- * @instance
589
- * @function storeViewportData
590
- * @param {Object} image - The cornerstone image frame
591
- * @param {String} elementId - The html div id used for rendering
592
- * @param {Number} imageIndex - The index of the image
593
- * @param {Number} numberOfSlices - The number of slices of the series
594
- * @param {Number} rows - The number of rows of the image
595
- * @param {Number} cols - The number of columns of the image
596
- * @param {Number} spacing_x - The spacing value for x axis
597
- * @param {Number} spacing_y - The spacing value for y direction
598
- * @param {Number} thickness - The thickness value between slices
599
- * @param {String} viewport - The viewport tag name
600
- * @param {Number} defaultWW - The default WW value
601
- * @param {Number} defaultWC - The default WC value
602
- */
603
- export const storeViewportData = function (
604
- image,
605
- elementId,
606
- imageIndex,
607
- numberOfSlices,
608
- rows,
609
- cols,
610
- spacing_x,
611
- spacing_y,
612
- thickness,
613
- viewport,
614
- defaultWW,
615
- defaultWC
616
- ) {
617
- larvitar_store.set("dimensions", [elementId, rows, cols]);
618
- larvitar_store.set("spacing", [elementId, spacing_x, spacing_y]);
619
- larvitar_store.set("thickness", [elementId, thickness]);
620
- larvitar_store.set("minPixelValue", [elementId, image.minPixelValue]);
621
- larvitar_store.set("maxPixelValue", [elementId, image.maxPixelValue]);
622
- larvitar_store.set("minSliceId", [elementId, 1]);
623
- larvitar_store.set("sliceId", [elementId, imageIndex]);
624
- larvitar_store.set("maxSliceId", [elementId, numberOfSlices]);
625
- larvitar_store.set("defaultViewport", [
626
- elementId,
627
- viewport.scale,
628
- viewport.rotation,
629
- viewport.translation.x,
630
- viewport.translation.y,
631
- defaultWW,
632
- defaultWC
633
- ]);
634
- larvitar_store.set("scale", [elementId, viewport.scale]);
635
- larvitar_store.set("rotation", [elementId, viewport.rotation]);
636
- larvitar_store.set("translation", [
637
- elementId,
638
- viewport.translation.x,
639
- viewport.translation.y
640
- ]);
641
- larvitar_store.set("contrast", [
642
- elementId,
643
- viewport.voi.windowWidth,
644
- viewport.voi.windowCenter
645
- ]);
646
- };
647
-
648
- /**
649
- * Invert pixels of an image
650
- * @instance
651
- * @function invertImage
652
- * @param {Object} elementId - The html div id used for rendering or its DOM HTMLElement
653
- */
654
- export const invertImage = function (elementId) {
655
- let element = isElement(elementId)
656
- ? elementId
657
- : document.getElementById(elementId);
658
- if (!element) {
659
- console.error("invalid html element: " + elementId);
660
- return;
661
- }
662
- let viewport = cornerstone.getViewport(element);
663
- viewport.invert = !viewport.invert;
664
- cornerstone.setViewport(element, viewport);
665
- };
666
-
667
- /**
668
- * Flip image around horizontal axis
669
- * @instance
670
- * @function flipImageHorizontal
671
- * @param {Object} elementId - The html div id used for rendering or its DOM HTMLElement
672
- */
673
- export const flipImageHorizontal = function (elementId) {
674
- let element = isElement(elementId)
675
- ? elementId
676
- : document.getElementById(elementId);
677
- if (!element) {
678
- console.error("invalid html element: " + elementId);
679
- return;
680
- }
681
- let viewport = cornerstone.getViewport(element);
682
- viewport.hflip = !viewport.hflip;
683
- cornerstone.setViewport(element, viewport);
684
- };
685
-
686
- /**
687
- * Flip image around vertical axis
688
- * @instance
689
- * @function flipImageVertical
690
- * @param {Object} elementId - The html div id used for rendering or its DOM HTMLElement
691
- */
692
- export const flipImageVertical = function (elementId) {
693
- let element = isElement(elementId)
694
- ? elementId
695
- : document.getElementById(elementId);
696
- if (!element) {
697
- console.error("invalid html element: " + elementId);
698
- return;
699
- }
700
- let viewport = cornerstone.getViewport(element);
701
- viewport.vflip = !viewport.vflip;
702
- cornerstone.setViewport(element, viewport);
703
- };
704
-
705
- /**
706
- * Rotate image by 90° in left direction
707
- * @instance
708
- * @function rotateImageLeft
709
- * @param {Object} elementId - The html div id used for rendering or its DOM HTMLElement
710
- */
711
- export const rotateImageLeft = function (elementId) {
712
- let element = isElement(elementId)
713
- ? elementId
714
- : document.getElementById(elementId);
715
- if (!element) {
716
- console.error("invalid html element: " + elementId);
717
- return;
718
- }
719
- let viewport = cornerstone.getViewport(element);
720
- viewport.rotation -= 90;
721
- cornerstone.setViewport(element, viewport);
722
- };
723
-
724
- /**
725
- * Rotate image by 90° in right direction
726
- * @instance
727
- * @function rotateImageRight
728
- * @param {Object} elementId - The html div id used for rendering or its DOM HTMLElement
729
- */
730
- export const rotateImageRight = function (elementId) {
731
- let element = isElement(elementId)
732
- ? elementId
733
- : document.getElementById(elementId);
734
- if (!element) {
735
- console.error("invalid html element: " + elementId);
736
- return;
737
- }
738
- let viewport = cornerstone.getViewport(element);
739
- viewport.rotation += 90;
740
- cornerstone.setViewport(element, viewport);
741
- };
742
-
743
- /* Internal module functions */
744
-
745
- /**
746
- * Get series metadata from default props and series' metadata
747
- * @instance
748
- * @function getSeriesData
749
- * @param {Object} series - The parsed data series
750
- * @param {Object} defaultProps - Optional default properties
751
- * @return {Object} data - A data dictionary with parsed tags' values
752
- */
753
- let getSeriesData = function (series, defaultProps) {
754
- let data = {};
755
- // image index
756
- if (series.isMultiframe) {
757
- data.numberOfSlices = series.imageIds.length;
758
- data.imageIndex = 1;
759
- data.imageId = series.imageIds[0];
760
- } else {
761
- data.numberOfSlices =
762
- defaultProps &amp;&amp; has(defaultProps, "numberOfSlices")
763
- ? defaultProps["numberOfSlices"]
764
- : series.imageIds.length;
765
-
766
- data.imageIndex =
767
- defaultProps &amp;&amp;
768
- has(defaultProps, "sliceNumber") &amp;&amp;
769
- defaultProps["sliceNumber"] &lt;= data.numberOfSlices
770
- ? defaultProps["sliceNumber"]
771
- : Math.floor(data.numberOfSlices / 2);
772
-
773
- data.imageId =
774
- data.imageIndex > 0
775
- ? series.imageIds[data.imageIndex - 1]
776
- : series.imageIds[0];
777
- }
778
-
779
- // rows, cols and x y z spacing
780
- data.rows = series.instances[series.imageIds[0]].metadata["x00280010"];
781
- data.cols = series.instances[series.imageIds[0]].metadata["x00280011"];
782
- data.thickness = series.instances[series.imageIds[0]].metadata["x00180050"];
783
- data.spacing_x = series.instances[series.imageIds[0]].metadata["x00280030"]
784
- ? series.instances[series.imageIds[0]].metadata["x00280030"][0]
785
- : null;
786
- data.spacing_y = series.instances[series.imageIds[0]].metadata["x00280030"]
787
- ? series.instances[series.imageIds[0]].metadata["x00280030"][1]
788
- : null;
789
-
790
- // window center and window width
791
- data.wc =
792
- defaultProps &amp;&amp; has(defaultProps, "wc")
793
- ? defaultProps["wc"]
794
- : series.instances[series.imageIds[0]].metadata["x00281050"];
795
-
796
- data.ww =
797
- defaultProps &amp;&amp; has(defaultProps, "ww")
798
- ? defaultProps["ww"]
799
- : series.instances[series.imageIds[0]].metadata["x00281051"];
800
-
801
- // default values for reset
802
- data.defaultWW =
803
- defaultProps &amp;&amp; has(defaultProps, "defaultWW")
804
- ? defaultProps["defaultWW"]
805
- : data.ww;
806
- data.defaultWC =
807
- defaultProps &amp;&amp; has(defaultProps, "defaultWC")
808
- ? defaultProps["defaultWC"]
809
- : data.wc;
810
-
811
- if (data.rows == null || data.cols == null) {
812
- console.error("invalid image metadata");
813
- larvitar_store.set("errorLog", "Invalid Image Metadata");
814
- return;
815
- } else {
816
- larvitar_store.set("errorLog", "");
817
- }
818
-
819
- return data;
820
- };
821
- </code></pre>
822
- </article>
823
- </section>
824
-
825
-
826
-
827
-
828
-
829
-
830
- </div>
831
-
832
- <br class="clear">
833
-
834
- <footer>
835
- 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.
836
- </footer>
837
-
838
- <script>prettyPrint();</script>
839
- <script src="scripts/polyfill.js"></script>
840
- <script src="scripts/linenumber.js"></script>
841
-
842
- <script src="scripts/search.js" defer></script>
843
-
844
-
845
- <script src="scripts/collapse.js" defer></script>
846
-
847
-
848
- </body>
849
- </html>