@cornerstonejs/tools 3.29.4 → 3.30.0

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.
@@ -44,6 +44,9 @@ function normalizeSegments(segmentsConfig, type, data) {
44
44
  normalizedSegments[segmentIndex] = normalizedSegment;
45
45
  });
46
46
  }
47
+ else if (type === SegmentationRepresentations.Contour) {
48
+ normalizeContourSegments(normalizedSegments, data);
49
+ }
47
50
  else if (type === SegmentationRepresentations.Surface) {
48
51
  normalizeSurfaceSegments(normalizedSegments, data);
49
52
  }
@@ -52,6 +55,16 @@ function normalizeSegments(segmentsConfig, type, data) {
52
55
  }
53
56
  return normalizedSegments;
54
57
  }
58
+ function normalizeContourSegments(normalizedSegments, contourData) {
59
+ const { geometryIds } = contourData;
60
+ geometryIds?.forEach((geometryId) => {
61
+ const geometry = cache.getGeometry(geometryId);
62
+ if (geometry?.data) {
63
+ const { segmentIndex } = geometry.data;
64
+ normalizedSegments[segmentIndex] = { segmentIndex };
65
+ }
66
+ });
67
+ }
55
68
  function normalizeSurfaceSegments(normalizedSegments, surfaceData) {
56
69
  const { geometryIds } = surfaceData;
57
70
  geometryIds?.forEach((geometryId) => {
@@ -159,7 +159,8 @@ class OrientationMarkerTool extends BaseTool {
159
159
  actor?.delete();
160
160
  const renderWindow = viewport
161
161
  .getRenderingEngine()
162
- .offscreenMultiRenderWindow.getRenderWindow();
162
+ .getOffscreenMultiRenderWindow(viewport.id)
163
+ .getRenderWindow();
163
164
  renderWindow.render();
164
165
  viewport.getRenderingEngine().render();
165
166
  delete this.orientationMarkers[viewport.id];
@@ -204,7 +205,8 @@ class OrientationMarkerTool extends BaseTool {
204
205
  const renderer = viewport.getRenderer();
205
206
  const renderWindow = viewport
206
207
  .getRenderingEngine()
207
- .offscreenMultiRenderWindow.getRenderWindow();
208
+ .getOffscreenMultiRenderWindow(viewportId)
209
+ .getRenderWindow();
208
210
  const { enabled, viewportCorner, viewportSize, minPixelSize, maxPixelSize, } = this.configuration.orientationWidget;
209
211
  const orientationWidget = vtkOrientationMarkerWidget.newInstance({
210
212
  actor,
@@ -1 +1 @@
1
- export declare const version = "3.29.4";
1
+ export declare const version = "3.30.0";
@@ -1 +1 @@
1
- export const version = '3.29.4';
1
+ export const version = '3.30.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/tools",
3
- "version": "3.29.4",
3
+ "version": "3.30.0",
4
4
  "description": "Cornerstone3D Tools",
5
5
  "types": "./dist/esm/index.d.ts",
6
6
  "module": "./dist/esm/index.js",
@@ -108,7 +108,7 @@
108
108
  "canvas": "^3.1.0"
109
109
  },
110
110
  "peerDependencies": {
111
- "@cornerstonejs/core": "^3.29.4",
111
+ "@cornerstonejs/core": "^3.30.0",
112
112
  "@kitware/vtk.js": "32.12.1",
113
113
  "@types/d3-array": "^3.0.4",
114
114
  "@types/d3-interpolate": "^3.0.1",
@@ -127,5 +127,5 @@
127
127
  "type": "individual",
128
128
  "url": "https://ohif.org/donate"
129
129
  },
130
- "gitHead": "64e6d79c48a562bef369da783441c5152730f8b4"
130
+ "gitHead": "f1bc10daabe26e00c716747b29365ed040e402cd"
131
131
  }