larvitar 1.2.6 → 1.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,11 +6,11 @@
6
6
 
7
7
  ## Dicom Image Toolkit for CornestoneJS
8
8
 
9
- ### Current version: 1.2.6
9
+ ### Current version: 1.2.7
10
10
 
11
- ### Latest Stable version: 1.2.6
11
+ ### Latest Stable version: 1.2.7
12
12
 
13
- ### Latest Published Release: 1.2.6
13
+ ### Latest Published Release: 1.2.7
14
14
 
15
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
16
  Orthogonal multiplanar reformat is included as well as custom loader/exporter for nrrd files and [Vuex](https://vuex.vuejs.org/) custom integration.
@@ -13,6 +13,8 @@ const { getters, setters } = segModule;
13
13
  // internal libraries
14
14
  import { setToolActive, setToolDisabled } from "./main";
15
15
  import { isElement } from "../imageUtils";
16
+ import { larvitar_store } from "../imageStore";
17
+ import { updateStackToolState } from "../imageTools";
16
18
 
17
19
  // custom code
18
20
  import { setLabelmap3DForElement } from "./setLabelMap3D";
@@ -199,6 +201,19 @@ export function addSegmentationMask(props, data, elementId) {
199
201
  // bind labelmap to colorLUT
200
202
  let labelmap3d = getters.labelmap3D(element, props.labelId);
201
203
  setters.colorLUTIndexForLabelmap3D(labelmap3d, props.labelId);
204
+
205
+ // set current imageIdIndex in tool state
206
+ let currentImageIdIndex = larvitar_store.get(
207
+ "viewports",
208
+ elementId,
209
+ "sliceId"
210
+ );
211
+ if (currentImageIdIndex !== "error" && currentImageIdIndex >= 0) {
212
+ updateStackToolState(elementId, currentImageIdIndex);
213
+ } else {
214
+ console.error("Cannot get currentImageIdIndex");
215
+ }
216
+
202
217
  resolve();
203
218
  });
204
219
  return promise;
package/index.js CHANGED
@@ -142,7 +142,9 @@ import {
142
142
  setActiveSegment,
143
143
  undoLastStroke,
144
144
  redoLastStroke,
145
- setBrushProps
145
+ setBrushProps,
146
+ hexToRgb,
147
+ rgbToHex
146
148
  } from "./imaging/tools/segmentation";
147
149
 
148
150
  import {
@@ -365,5 +367,7 @@ export {
365
367
  setActiveSegment,
366
368
  undoLastStroke,
367
369
  redoLastStroke,
368
- setBrushProps
370
+ setBrushProps,
371
+ hexToRgb,
372
+ rgbToHex
369
373
  };
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "medical",
7
7
  "cornerstone"
8
8
  ],
9
- "version": "1.2.6",
9
+ "version": "1.2.7",
10
10
  "description": "javascript library for parsing, loading, rendering and interacting with DICOM images",
11
11
  "repository": {
12
12
  "url": "https://github.com/dvisionlab/Larvitar.git",