larvitar 0.20.0 → 1.1.2

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 (42) hide show
  1. package/MIGRATION.md +25 -0
  2. package/README.md +28 -27
  3. package/imaging/dataDictionary.json +21865 -21865
  4. package/imaging/{image_anonymization.js → imageAnonymization.js} +1 -1
  5. package/imaging/{image_colormaps.js → imageColormaps.js} +2 -2
  6. package/imaging/{image_contours.js → imageContours.js} +1 -2
  7. package/imaging/{image_io.js → imageIo.js} +18 -15
  8. package/imaging/{image_layers.js → imageLayers.js} +2 -2
  9. package/imaging/{image_loading.js → imageLoading.js} +9 -6
  10. package/imaging/imageParsing.js +301 -0
  11. package/imaging/{image_presets.js → imagePresets.js} +2 -2
  12. package/imaging/{image_rendering.js → imageRendering.js} +36 -32
  13. package/imaging/imageReslice.js +78 -0
  14. package/imaging/{image_store.js → imageStore.js} +8 -7
  15. package/imaging/{image_tools.js → imageTools.js} +15 -23
  16. package/imaging/{image_utils.js → imageUtils.js} +1 -1
  17. package/imaging/loaders/commonLoader.js +1 -1
  18. package/imaging/loaders/dicomLoader.js +1 -1
  19. package/imaging/loaders/fileLoader.js +2 -2
  20. package/imaging/loaders/multiframeLoader.js +6 -2
  21. package/imaging/loaders/nrrdLoader.js +11 -7
  22. package/imaging/tools/{contourTool.js → custom/contourTool.js} +25 -20
  23. package/imaging/tools/{diameterTool.js → custom/diameterTool.js} +9 -3
  24. package/imaging/tools/{editMaskTool.js → custom/editMaskTool.js} +7 -1
  25. package/imaging/tools/{polylineScissorsTool.js → custom/polylineScissorsTool.js} +12 -5
  26. package/imaging/tools/{seedTool.js → custom/seedTool.js} +3 -3
  27. package/imaging/tools/{thresholdsBrushTool.js → custom/thresholdsBrushTool.js} +7 -1
  28. package/imaging/tools/{tools.default.js → default.js} +9 -2
  29. package/imaging/tools/{tools.interaction.js → interaction.js} +13 -6
  30. package/imaging/tools/{tools.io.js → io.js} +15 -6
  31. package/imaging/tools/{tools.main.js → main.js} +14 -13
  32. package/imaging/tools/polygonSegmentationMixin.js +8 -4
  33. package/imaging/tools/{tools.segmentation.js → segmentation.js} +162 -59
  34. package/imaging/tools/segmentations.md +32 -0
  35. package/imaging/tools/{tools.state.js → state.js} +7 -1
  36. package/imaging/tools/strategies/eraseFreehand.js +8 -9
  37. package/imaging/tools/strategies/fillFreehand.js +8 -9
  38. package/index.js +41 -39
  39. package/modules/vuex/larvitar.js +1 -1
  40. package/package.json +11 -8
  41. package/imaging/image_parsing.js +0 -307
  42. package/imaging/image_reslice.js +0 -80
package/MIGRATION.md ADDED
@@ -0,0 +1,25 @@
1
+ # Introduction
2
+
3
+ This guide is primarily for user with prior Larvitar v0.x experience who want to learn about the new features and changes in Larvitar v1.x. While it looks like a lot has changed, a lot of what you know and love about Larvitar is still the same; but we wanted to be as thorough as possibile and provide detailed explanations or examples for every documented change.
4
+
5
+ # Notable new features
6
+
7
+ We chose to migrate all functions using callback to promise. Promises are JavaScript objects that represent an eventual completion or failure of an asynchronous operation. A promise is a returned object where you attach callbacks, instead of passing callbacks into a function. the place where you attach the callback after a successful completion of a task is called, .then(). inside this you pass a callback through.
8
+
9
+ # Breaking changes
10
+
11
+ - imageIo module:
12
+ - *getCachedPixelData* now returns a promise which will resolve to a pixel data array or fail if an error occurs
13
+ - imageParsing module
14
+ - *readFiles* now returns a promise which will resolve to an image object list or fail if an error occurs
15
+ - *readFile* now returns a promise which will resolve to an image object or fail if an error occurs
16
+ - *dumpDataset* has been renamed to parseDataset [internal API]
17
+ - *dumpFiles* has been renamed to parseFiles [internal API]
18
+ - *dumpFile* has been renamed to parseFile [internal API]
19
+ - imageRendering module
20
+ - *renderImage* now returns a promise which will resolve when image is displayed
21
+ - imageReslice module
22
+ - *resliceImage* now returns a promise which will resolve when reslice data is available
23
+ - tools/segmentation module
24
+ - *addSegmentationMask* now returns a promise which will resolve when segmentation mask is added
25
+ - *getActivelabelmapBuffer* now needs elementId (or its DOM HTMLElement) as param and returns the buffer parent object"
package/README.md CHANGED
@@ -6,28 +6,29 @@
6
6
 
7
7
  ## Dicom Image Toolkit for CornestoneJS
8
8
 
9
- ### Current version: 0.20.0
9
+ ### Current version: 1.1.2
10
10
 
11
- ### Latest Stable version: 0.20.0
11
+ ### Latest Stable version: 1.1.2
12
12
 
13
- ### Latest Published Release: 0.20.0
13
+ ### Latest Published Release: 1.1.2
14
14
 
15
- This library provides common dicom functionalities to be used in web-applications. Multiplanar reformat on axial, sagittal and coronal viewports is included as well as custom loader/exporter for nrrd files and orthogonal reslice.
15
+ This library provides common DICOM functionalities to be used in web-applications: it's wrapper that simplifies the use of cornestone-js environment.
16
+ Orthogonal multiplanar reformat is included as well as custom loader/exporter for nrrd files and [Vuex](https://vuex.vuejs.org/) custom integration.
16
17
 
17
18
  - `index` main file
18
19
  - `dataDictionary` json file for dicom tags
19
- - `image_colormaps` provides color maps functionalities
20
- - `image_contours` using to populate cornerstone tool for segmentation contours on 2D images
21
- - `image_io` import a dicom image in .nrrd format and build contiguous array for exporting data as volume
22
- - `image_layers` provide support for multi-layer cornerstone fusion renderer
23
- - `image_loading` initialize loader and custom loaders
24
- - `image_parsing` parse dicom files and return a cornestone data structure ready to be used for rendering
25
- - `image_presets` provides default image CT presets and set functionality
26
- - `image_rendering` provides rendering functionalities
27
- - `image_reslice` provides reslice functionalities
28
- - `image_store` provides data storage functionalities, vuex support is integrated
29
- - `image_tools` using to handle standard and custom cornerstone tools
30
- - `image_utils` utility functions on pixels and metadata tags
20
+ - `imageColormaps` provides color maps functionalities
21
+ - `imageContours` using to populate cornerstone tool for segmentation contours on 2D images
22
+ - `imageIo` import a dicom image in .nrrd format and build contiguous array for exporting data as volume
23
+ - `imageLayers` provide support for multi-layer cornerstone fusion renderer
24
+ - `imageLoading` initialize loader and custom loaders
25
+ - `imageParsing` parse dicom files and return a cornestone data structure ready to be used for rendering
26
+ - `imagePresets` provides default image CT presets and set functionality
27
+ - `imageRendering` provides rendering functionalities
28
+ - `imageReslice` provides reslice functionalities
29
+ - `imageStore` provides data storage functionalities, vuex support is integrated
30
+ - `imageTools` using to handle standard and custom cornerstone tools
31
+ - `imageUtils` utility functions on pixels and metadata tags
31
32
  - `loaders/commonLoader` common functionalities for custom loaders
32
33
  - `loaders/dicomLoader` custom loader for DICOM files with support for multiplanar reformat (axial, sagittal and coronal planes)
33
34
  - `loaders/fileLoader` custom loader for png/jpg files
@@ -35,16 +36,16 @@ This library provides common dicom functionalities to be used in web-application
35
36
  - `loaders/resliceLoader` custom loader for resliced data
36
37
  - `loaders/multiFrameLoader` custom loader for multiFrame data
37
38
  - `parsers/nrrd` custom parser for nrrd data
38
- - `tools/contourTool` is a custom cornerstone tool for 2D visualization of segmented images
39
- - `tools/diameterTool` is a custom cornerstone tool for 2D visualization of diameter widgets
40
- - `tools/editMaskTool` is a custom cornerstone tool for 2D visualization of segmentation masks with brush functionalities
41
- - `tools/seedTool` is a custom cornerstone tool for 2D interactive seeding with custom colors and labels
42
- - `tools/thresholdsBrushTool` is a custom cornerstone tool for handling thresholds in a brush tool
43
- - `tools/tools.default` default tools map and configuration
44
- - `tools/tools.io` import and export functionalities for tools
45
- - `tools/tools.main` tools main functionalities
46
- - `tools/tools.state` tools state management
47
- - `tools/tools.segmentation` segmentation masks management
39
+ - `tools/custom/contourTool` is a custom cornerstone tool for 2D visualization of segmented images
40
+ - `tools/custom/diameterTool` is a custom cornerstone tool for 2D visualization of diameter widgets
41
+ - `tools/custom/editMaskTool` is a custom cornerstone tool for 2D visualization of segmentation masks with brush functionalities
42
+ - `tools/custom/seedTool` is a custom cornerstone tool for 2D interactive seeding with custom colors and labels
43
+ - `tools/custom/thresholdsBrushTool` is a custom cornerstone tool for handling thresholds in a brush tool
44
+ - `tools/default` default tools map and configuration
45
+ - `tools/io` import and export functionalities for tools
46
+ - `tools/main` tools main functionalities
47
+ - `tools/state` tools state management
48
+ - `tools/segmentation` segmentation masks management
48
49
  - `modules/vuex/larvitar.js` optional vuex state module
49
50
 
50
51
  <br>
@@ -58,7 +59,7 @@ import store from "@/store/index";
58
59
  initLarvitarStore(store); // Calling this without parameters makes Larvitar use its internal store.
59
60
  ```
60
61
 
61
- Full documentation is available at http://www.dvisionlab.com/Larvitar/.
62
+ Full documentation and examples are available at http://www.dvisionlab.com/Larvitar/.
62
63
 
63
64
  <br>
64
65