Skip to content

Commit

Permalink
fix: Use the right type of measurements for non-closed freehand (#1372)
Browse files Browse the repository at this point in the history
* fix: Use the right type of measurements for non-closed freehand

Also fix the units for US regions in cm

* Try to fix the netlify build

* Test netlify syntax

* fix: setViewReference should fire scroll event
  • Loading branch information
wayfarer3130 authored Jul 5, 2024
1 parent f27a99e commit de0112d
Show file tree
Hide file tree
Showing 5 changed files with 275 additions and 188 deletions.
21 changes: 21 additions & 0 deletions common/reviews/api/tools.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4025,6 +4025,27 @@ export class PlanarFreehandROITool extends ContourSegmentationBaseTool {
toolSelectedCallback: (evt: EventTypes_2.InteractionEventType, annotation: PlanarFreehandROIAnnotation) => void;
// (undocumented)
touchDragCallback: any;
// (undocumented)
protected updateClosedCachedStats({ viewport, points, imageData, metadata, cachedStats, targetId, modalityUnit, canvasCoordinates, calibratedScale, }: {
viewport: any;
points: any;
imageData: any;
metadata: any;
cachedStats: any;
targetId: any;
modalityUnit: any;
canvasCoordinates: any;
calibratedScale: any;
}): void;
// (undocumented)
protected updateOpenCachedStats({ targetId, metadata, canvasCoordinates, cachedStats, modalityUnit, calibratedScale, }: {
targetId: any;
metadata: any;
canvasCoordinates: any;
cachedStats: any;
modalityUnit: any;
calibratedScale: any;
}): void;
}

declare namespace planarFreehandROITool {
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/RenderingEngine/StackViewport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2965,17 +2965,17 @@ class StackViewport extends Viewport implements IStackViewport, IImagesLoader {
if (!viewRef) {
return;
}
const { referencedImageId, sliceIndex, volumeId } = viewRef;
const { referencedImageId, sliceIndex } = viewRef;
if (
typeof sliceIndex === 'number' &&
referencedImageId &&
referencedImageId === this.imageIds[sliceIndex]
) {
this.setImageIdIndex(sliceIndex);
this.scroll(sliceIndex - this.targetImageIdIndex);
} else {
const foundIndex = this.imageIds.indexOf(referencedImageId);
if (foundIndex !== -1) {
this.setImageIdIndex(foundIndex);
this.scroll(foundIndex - this.targetImageIdIndex);
} else {
throw new Error('Unsupported - referenced image id not found');
}
Expand Down
14 changes: 10 additions & 4 deletions packages/docs/netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,16 @@
# COMMENT: For sharedArrayBuffer, see https://developer.chrome.com/blog/enabling-shared-array-buffer/
[[headers]]
# Define which paths this specific [[headers]] block will cover.
for = "/live-examples/*"
[headers.values]
Cross-Origin-Embedder-Policy = "require-corp"
Cross-Origin-Opener-Policy = "same-origin"
for = "*.js"
[headers.values]
Cross-Origin-Embedder-Policy = "require-corp"
Cross-Origin-Opener-Policy = "same-origin"

[[headers]]
for = "*.html"
[headers.values]
Cross-Origin-Embedder-Policy = "require-corp"
Cross-Origin-Opener-Policy = "same-origin"

# Attempt to speed up docusaurus builds by persisting the webpack cache
# across deploys. This is done in the main docusaurus repo: https://github.com/facebook/docusaurus/blob/cc0bceab9c1678303f6237f5526753edc1b12fc3/website/netlify.toml#L22
Expand Down
Loading

0 comments on commit de0112d

Please sign in to comment.