@cornerstonejs/tools 1.42.1 → 1.43.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.
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/stateManagement/segmentation/activeSegmentation.d.ts +2 -1
- package/dist/cjs/stateManagement/segmentation/activeSegmentation.js +10 -1
- package/dist/cjs/stateManagement/segmentation/activeSegmentation.js.map +1 -1
- package/dist/cjs/stateManagement/segmentation/segmentIndex.js +5 -0
- package/dist/cjs/stateManagement/segmentation/segmentIndex.js.map +1 -1
- package/dist/cjs/tools/displayTools/Labelmap/labelmapConfig.js +2 -0
- package/dist/cjs/tools/displayTools/Labelmap/labelmapConfig.js.map +1 -1
- package/dist/cjs/tools/displayTools/Labelmap/labelmapDisplay.js +10 -4
- package/dist/cjs/tools/displayTools/Labelmap/labelmapDisplay.js.map +1 -1
- package/dist/cjs/tools/index.d.ts +2 -1
- package/dist/cjs/tools/index.js +3 -1
- package/dist/cjs/tools/index.js.map +1 -1
- package/dist/cjs/tools/segmentation/BrushTool.d.ts +1 -0
- package/dist/cjs/tools/segmentation/BrushTool.js +32 -15
- package/dist/cjs/tools/segmentation/BrushTool.js.map +1 -1
- package/dist/cjs/tools/segmentation/CircleScissorsTool.js +5 -0
- package/dist/cjs/tools/segmentation/CircleScissorsTool.js.map +1 -1
- package/dist/cjs/tools/segmentation/RectangleScissorsTool.js +5 -0
- package/dist/cjs/tools/segmentation/RectangleScissorsTool.js.map +1 -1
- package/dist/cjs/tools/segmentation/SegmentSelectTool.d.ts +15 -0
- package/dist/cjs/tools/segmentation/SegmentSelectTool.js +105 -0
- package/dist/cjs/tools/segmentation/SegmentSelectTool.js.map +1 -0
- package/dist/cjs/tools/segmentation/SphereScissorsTool.js +5 -0
- package/dist/cjs/tools/segmentation/SphereScissorsTool.js.map +1 -1
- package/dist/cjs/tools/segmentation/strategies/BrushStrategy.d.ts +2 -1
- package/dist/cjs/tools/segmentation/strategies/BrushStrategy.js.map +1 -1
- package/dist/cjs/tools/segmentation/strategies/fillCircle.js +8 -9
- package/dist/cjs/tools/segmentation/strategies/fillCircle.js.map +1 -1
- package/dist/cjs/tools/segmentation/strategies/fillRectangle.js +30 -3
- package/dist/cjs/tools/segmentation/strategies/fillRectangle.js.map +1 -1
- package/dist/cjs/tools/segmentation/strategies/fillSphere.js +3 -20
- package/dist/cjs/tools/segmentation/strategies/fillSphere.js.map +1 -1
- package/dist/cjs/types/LabelmapTypes.d.ts +1 -0
- package/dist/cjs/utilities/boundingBox/getBoundingBoxAroundShape.d.ts +4 -2
- package/dist/cjs/utilities/boundingBox/getBoundingBoxAroundShape.js +45 -23
- package/dist/cjs/utilities/boundingBox/getBoundingBoxAroundShape.js.map +1 -1
- package/dist/cjs/utilities/boundingBox/index.d.ts +2 -2
- package/dist/cjs/utilities/boundingBox/index.js +5 -3
- package/dist/cjs/utilities/boundingBox/index.js.map +1 -1
- package/dist/cjs/utilities/getSphereBoundsInfo.d.ts +11 -0
- package/dist/cjs/utilities/getSphereBoundsInfo.js +45 -0
- package/dist/cjs/utilities/getSphereBoundsInfo.js.map +1 -0
- package/dist/cjs/utilities/index.d.ts +2 -2
- package/dist/cjs/utilities/index.js +3 -3
- package/dist/cjs/utilities/index.js.map +1 -1
- package/dist/cjs/utilities/pointInShapeCallback.d.ts +1 -1
- package/dist/cjs/utilities/pointInShapeCallback.js +1 -1
- package/dist/cjs/utilities/pointInShapeCallback.js.map +1 -1
- package/dist/cjs/utilities/rectangleROITool/getBoundsIJKFromRectangleAnnotations.js +2 -2
- package/dist/cjs/utilities/rectangleROITool/getBoundsIJKFromRectangleAnnotations.js.map +1 -1
- package/dist/cjs/utilities/rectangleROITool/index.d.ts +2 -1
- package/dist/cjs/utilities/rectangleROITool/index.js +3 -1
- package/dist/cjs/utilities/rectangleROITool/index.js.map +1 -1
- package/dist/cjs/utilities/rectangleROITool/isAxisAlignedRectangle.d.ts +2 -0
- package/dist/cjs/utilities/rectangleROITool/isAxisAlignedRectangle.js +26 -0
- package/dist/cjs/utilities/rectangleROITool/isAxisAlignedRectangle.js.map +1 -0
- package/dist/cjs/utilities/segmentation/createLabelmapVolumeForViewport.js +1 -1
- package/dist/cjs/utilities/segmentation/createLabelmapVolumeForViewport.js.map +1 -1
- package/dist/cjs/utilities/segmentation/index.d.ts +2 -1
- package/dist/cjs/utilities/segmentation/index.js +3 -1
- package/dist/cjs/utilities/segmentation/index.js.map +1 -1
- package/dist/cjs/utilities/segmentation/invalidateBrushCursor.d.ts +1 -0
- package/dist/cjs/utilities/segmentation/invalidateBrushCursor.js +31 -0
- package/dist/cjs/utilities/segmentation/invalidateBrushCursor.js.map +1 -0
- package/dist/cjs/utilities/segmentation/utilities.d.ts +1 -1
- package/dist/cjs/utilities/segmentation/utilities.js +2 -2
- package/dist/cjs/utilities/segmentation/utilities.js.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/stateManagement/segmentation/activeSegmentation.js +10 -2
- package/dist/esm/stateManagement/segmentation/activeSegmentation.js.map +1 -1
- package/dist/esm/stateManagement/segmentation/segmentIndex.js +6 -1
- package/dist/esm/stateManagement/segmentation/segmentIndex.js.map +1 -1
- package/dist/esm/tools/displayTools/Labelmap/labelmapConfig.js +2 -0
- package/dist/esm/tools/displayTools/Labelmap/labelmapConfig.js.map +1 -1
- package/dist/esm/tools/displayTools/Labelmap/labelmapDisplay.js +11 -5
- package/dist/esm/tools/displayTools/Labelmap/labelmapDisplay.js.map +1 -1
- package/dist/esm/tools/index.js +2 -1
- package/dist/esm/tools/index.js.map +1 -1
- package/dist/esm/tools/segmentation/BrushTool.js +31 -15
- package/dist/esm/tools/segmentation/BrushTool.js.map +1 -1
- package/dist/esm/tools/segmentation/CircleScissorsTool.js +5 -0
- package/dist/esm/tools/segmentation/CircleScissorsTool.js.map +1 -1
- package/dist/esm/tools/segmentation/RectangleScissorsTool.js +5 -0
- package/dist/esm/tools/segmentation/RectangleScissorsTool.js.map +1 -1
- package/dist/esm/tools/segmentation/SegmentSelectTool.js +100 -0
- package/dist/esm/tools/segmentation/SegmentSelectTool.js.map +1 -0
- package/dist/esm/tools/segmentation/SphereScissorsTool.js +5 -0
- package/dist/esm/tools/segmentation/SphereScissorsTool.js.map +1 -1
- package/dist/esm/tools/segmentation/strategies/BrushStrategy.js.map +1 -1
- package/dist/esm/tools/segmentation/strategies/fillCircle.js +8 -9
- package/dist/esm/tools/segmentation/strategies/fillCircle.js.map +1 -1
- package/dist/esm/tools/segmentation/strategies/fillRectangle.js +32 -5
- package/dist/esm/tools/segmentation/strategies/fillRectangle.js.map +1 -1
- package/dist/esm/tools/segmentation/strategies/fillSphere.js +3 -20
- package/dist/esm/tools/segmentation/strategies/fillSphere.js.map +1 -1
- package/dist/esm/utilities/boundingBox/getBoundingBoxAroundShape.js +40 -23
- package/dist/esm/utilities/boundingBox/getBoundingBoxAroundShape.js.map +1 -1
- package/dist/esm/utilities/boundingBox/index.js +2 -2
- package/dist/esm/utilities/boundingBox/index.js.map +1 -1
- package/dist/esm/utilities/getSphereBoundsInfo.js +42 -0
- package/dist/esm/utilities/getSphereBoundsInfo.js.map +1 -0
- package/dist/esm/utilities/index.js +2 -2
- package/dist/esm/utilities/index.js.map +1 -1
- package/dist/esm/utilities/pointInShapeCallback.js +1 -1
- package/dist/esm/utilities/pointInShapeCallback.js.map +1 -1
- package/dist/esm/utilities/rectangleROITool/getBoundsIJKFromRectangleAnnotations.js +2 -2
- package/dist/esm/utilities/rectangleROITool/getBoundsIJKFromRectangleAnnotations.js.map +1 -1
- package/dist/esm/utilities/rectangleROITool/index.js +2 -1
- package/dist/esm/utilities/rectangleROITool/index.js.map +1 -1
- package/dist/esm/utilities/rectangleROITool/isAxisAlignedRectangle.js +23 -0
- package/dist/esm/utilities/rectangleROITool/isAxisAlignedRectangle.js.map +1 -0
- package/dist/esm/utilities/segmentation/createLabelmapVolumeForViewport.js +1 -1
- package/dist/esm/utilities/segmentation/createLabelmapVolumeForViewport.js.map +1 -1
- package/dist/esm/utilities/segmentation/index.js +2 -1
- package/dist/esm/utilities/segmentation/index.js.map +1 -1
- package/dist/esm/utilities/segmentation/invalidateBrushCursor.js +24 -0
- package/dist/esm/utilities/segmentation/invalidateBrushCursor.js.map +1 -0
- package/dist/esm/utilities/segmentation/utilities.js +2 -2
- package/dist/esm/utilities/segmentation/utilities.js.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/stateManagement/segmentation/activeSegmentation.d.ts +2 -1
- package/dist/types/stateManagement/segmentation/activeSegmentation.d.ts.map +1 -1
- package/dist/types/stateManagement/segmentation/segmentIndex.d.ts.map +1 -1
- package/dist/types/tools/displayTools/Labelmap/labelmapConfig.d.ts.map +1 -1
- package/dist/types/tools/displayTools/Labelmap/labelmapDisplay.d.ts.map +1 -1
- package/dist/types/tools/index.d.ts +2 -1
- package/dist/types/tools/index.d.ts.map +1 -1
- package/dist/types/tools/segmentation/BrushTool.d.ts +1 -0
- package/dist/types/tools/segmentation/BrushTool.d.ts.map +1 -1
- package/dist/types/tools/segmentation/CircleScissorsTool.d.ts.map +1 -1
- package/dist/types/tools/segmentation/RectangleScissorsTool.d.ts.map +1 -1
- package/dist/types/tools/segmentation/SegmentSelectTool.d.ts +16 -0
- package/dist/types/tools/segmentation/SegmentSelectTool.d.ts.map +1 -0
- package/dist/types/tools/segmentation/SphereScissorsTool.d.ts.map +1 -1
- package/dist/types/tools/segmentation/strategies/BrushStrategy.d.ts +2 -1
- package/dist/types/tools/segmentation/strategies/BrushStrategy.d.ts.map +1 -1
- package/dist/types/tools/segmentation/strategies/fillCircle.d.ts.map +1 -1
- package/dist/types/tools/segmentation/strategies/fillRectangle.d.ts.map +1 -1
- package/dist/types/tools/segmentation/strategies/fillSphere.d.ts.map +1 -1
- package/dist/types/types/LabelmapTypes.d.ts +1 -0
- package/dist/types/types/LabelmapTypes.d.ts.map +1 -1
- package/dist/types/utilities/boundingBox/getBoundingBoxAroundShape.d.ts +4 -2
- package/dist/types/utilities/boundingBox/getBoundingBoxAroundShape.d.ts.map +1 -1
- package/dist/types/utilities/boundingBox/index.d.ts +2 -2
- package/dist/types/utilities/boundingBox/index.d.ts.map +1 -1
- package/dist/types/utilities/getSphereBoundsInfo.d.ts +12 -0
- package/dist/types/utilities/getSphereBoundsInfo.d.ts.map +1 -0
- package/dist/types/utilities/index.d.ts +2 -2
- package/dist/types/utilities/index.d.ts.map +1 -1
- package/dist/types/utilities/pointInShapeCallback.d.ts +1 -1
- package/dist/types/utilities/rectangleROITool/getBoundsIJKFromRectangleAnnotations.d.ts.map +1 -1
- package/dist/types/utilities/rectangleROITool/index.d.ts +2 -1
- package/dist/types/utilities/rectangleROITool/index.d.ts.map +1 -1
- package/dist/types/utilities/rectangleROITool/isAxisAlignedRectangle.d.ts +3 -0
- package/dist/types/utilities/rectangleROITool/isAxisAlignedRectangle.d.ts.map +1 -0
- package/dist/types/utilities/segmentation/index.d.ts +2 -1
- package/dist/types/utilities/segmentation/index.d.ts.map +1 -1
- package/dist/types/utilities/segmentation/invalidateBrushCursor.d.ts +2 -0
- package/dist/types/utilities/segmentation/invalidateBrushCursor.d.ts.map +1 -0
- package/dist/types/utilities/segmentation/utilities.d.ts +1 -1
- package/dist/types/utilities/segmentation/utilities.d.ts.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +2 -0
- package/src/stateManagement/segmentation/activeSegmentation.ts +24 -1
- package/src/stateManagement/segmentation/segmentIndex.ts +15 -2
- package/src/tools/displayTools/Labelmap/labelmapConfig.ts +2 -0
- package/src/tools/displayTools/Labelmap/labelmapDisplay.ts +23 -12
- package/src/tools/index.ts +2 -0
- package/src/tools/segmentation/BrushTool.ts +53 -26
- package/src/tools/segmentation/CircleScissorsTool.ts +9 -0
- package/src/tools/segmentation/RectangleScissorsTool.ts +10 -1
- package/src/tools/segmentation/SegmentSelectTool.ts +182 -0
- package/src/tools/segmentation/SphereScissorsTool.ts +9 -0
- package/src/tools/segmentation/strategies/BrushStrategy.ts +2 -1
- package/src/tools/segmentation/strategies/fillCircle.ts +15 -14
- package/src/tools/segmentation/strategies/fillRectangle.ts +51 -6
- package/src/tools/segmentation/strategies/fillSphere.ts +10 -38
- package/src/types/LabelmapTypes.ts +5 -2
- package/src/utilities/boundingBox/getBoundingBoxAroundShape.ts +88 -37
- package/src/utilities/boundingBox/index.ts +11 -2
- package/src/utilities/{pointInSurroundingSphereCallback.ts → getSphereBoundsInfo.ts} +39 -82
- package/src/utilities/index.ts +2 -2
- package/src/utilities/math/ellipse/pointInEllipse.ts +1 -1
- package/src/utilities/pointInShapeCallback.ts +2 -2
- package/src/utilities/rectangleROITool/getBoundsIJKFromRectangleAnnotations.ts +5 -2
- package/src/utilities/rectangleROITool/index.ts +2 -1
- package/src/utilities/rectangleROITool/isAxisAlignedRectangle.ts +53 -0
- package/src/utilities/segmentation/createLabelmapVolumeForViewport.ts +1 -1
- package/src/utilities/segmentation/index.ts +2 -0
- package/src/utilities/segmentation/invalidateBrushCursor.ts +48 -0
- package/src/utilities/segmentation/utilities.ts +5 -2
- package/dist/cjs/utilities/pointInSurroundingSphereCallback.d.ts +0 -4
- package/dist/cjs/utilities/pointInSurroundingSphereCallback.js +0 -70
- package/dist/cjs/utilities/pointInSurroundingSphereCallback.js.map +0 -1
- package/dist/esm/utilities/pointInSurroundingSphereCallback.js +0 -64
- package/dist/esm/utilities/pointInSurroundingSphereCallback.js.map +0 -1
- package/dist/types/utilities/pointInSurroundingSphereCallback.d.ts +0 -5
- package/dist/types/utilities/pointInSurroundingSphereCallback.d.ts.map +0 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { vec3 } from 'gl-matrix';
|
|
2
|
+
import { utilities as csUtils } from '@cornerstonejs/core';
|
|
3
|
+
|
|
4
|
+
const { isEqual } = csUtils;
|
|
5
|
+
|
|
6
|
+
const iAxis = vec3.fromValues(1, 0, 0);
|
|
7
|
+
const jAxis = vec3.fromValues(0, 1, 0);
|
|
8
|
+
const kAxis = vec3.fromValues(0, 0, 1);
|
|
9
|
+
|
|
10
|
+
const axisList = [iAxis, jAxis, kAxis];
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Determines whether a given rectangle in a 3D space (defined by its corner
|
|
14
|
+
* points in IJK coordinates) is aligned with the IJK axes.
|
|
15
|
+
* @param rectangleCornersIJK - The corner points of the rectangle in IJK coordinates
|
|
16
|
+
* @returns True if the rectangle is aligned with the IJK axes, false otherwise
|
|
17
|
+
*/
|
|
18
|
+
function isAxisAlignedRectangle(rectangleCornersIJK) {
|
|
19
|
+
const rectangleVec1 = vec3.subtract(
|
|
20
|
+
vec3.create(),
|
|
21
|
+
rectangleCornersIJK[0],
|
|
22
|
+
rectangleCornersIJK[1]
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
const rectangleVec2 = vec3.subtract(
|
|
26
|
+
vec3.create(),
|
|
27
|
+
rectangleCornersIJK[0],
|
|
28
|
+
rectangleCornersIJK[2]
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
// Calculate the angles with IJK axes for both vectors
|
|
32
|
+
const anglesVec1 = calculateAnglesWithAxes(rectangleVec1, axisList);
|
|
33
|
+
const anglesVec2 = calculateAnglesWithAxes(rectangleVec2, axisList);
|
|
34
|
+
|
|
35
|
+
// Check if all angles are aligned (0, 90, 180, or 270 degrees)
|
|
36
|
+
// we could do csUtils.isEqual(angle % 90, 0) but this is more explicit for reading
|
|
37
|
+
const isAligned = [...anglesVec1, ...anglesVec2].every(
|
|
38
|
+
(angle) =>
|
|
39
|
+
isEqual(angle, 0) ||
|
|
40
|
+
isEqual(angle, 90) ||
|
|
41
|
+
isEqual(angle, 180) ||
|
|
42
|
+
isEqual(angle, 270)
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
return isAligned;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Function to calculate angle with IJK axes
|
|
49
|
+
function calculateAnglesWithAxes(vec, axes) {
|
|
50
|
+
return axes.map((axis) => (vec3.angle(vec, axis) * 180) / Math.PI);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export { isAxisAlignedRectangle };
|
|
@@ -65,7 +65,7 @@ export default async function createLabelmapVolumeForViewport(input: {
|
|
|
65
65
|
} else {
|
|
66
66
|
// create a labelmap from a reference volume
|
|
67
67
|
const { uid: volumeId } = viewport.getDefaultActor();
|
|
68
|
-
await volumeLoader.
|
|
68
|
+
await volumeLoader.createAndCacheDerivedSegmentationVolume(volumeId, {
|
|
69
69
|
volumeId: segmentationId,
|
|
70
70
|
});
|
|
71
71
|
}
|
|
@@ -19,6 +19,7 @@ import { createImageIdReferenceMap } from './createImageIdReferenceMap';
|
|
|
19
19
|
import contourAndFindLargestBidirectional from './contourAndFindLargestBidirectional';
|
|
20
20
|
import createBidirectionalToolData from './createBidirectionalToolData';
|
|
21
21
|
import segmentContourAction from './segmentContourAction';
|
|
22
|
+
import { invalidateBrushCursor } from './invalidateBrushCursor';
|
|
22
23
|
|
|
23
24
|
export {
|
|
24
25
|
thresholdVolumeByRange,
|
|
@@ -38,4 +39,5 @@ export {
|
|
|
38
39
|
contourAndFindLargestBidirectional,
|
|
39
40
|
createBidirectionalToolData,
|
|
40
41
|
segmentContourAction,
|
|
42
|
+
invalidateBrushCursor,
|
|
41
43
|
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { getToolGroup } from '../../store/ToolGroupManager';
|
|
2
|
+
import BrushTool from '../../tools/segmentation/BrushTool';
|
|
3
|
+
import triggerAnnotationRenderForViewportIds from '../triggerAnnotationRenderForViewportIds';
|
|
4
|
+
import { getRenderingEngine } from '@cornerstonejs/core';
|
|
5
|
+
import getBrushToolInstances from './utilities';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Invalidates the brush cursor for a specific tool group.
|
|
9
|
+
* This function triggers the update of the brush being rendered.
|
|
10
|
+
* It also triggers an annotation render for any viewports on the tool group.
|
|
11
|
+
*
|
|
12
|
+
* @param toolGroupId - The ID of the tool group.
|
|
13
|
+
*/
|
|
14
|
+
export function invalidateBrushCursor(toolGroupId: string): void {
|
|
15
|
+
const toolGroup = getToolGroup(toolGroupId);
|
|
16
|
+
|
|
17
|
+
if (toolGroup === undefined) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const brushBasedToolInstances = getBrushToolInstances(toolGroupId);
|
|
22
|
+
|
|
23
|
+
brushBasedToolInstances.forEach((tool: BrushTool) => {
|
|
24
|
+
// Invalidate the brush being rendered so it can update.
|
|
25
|
+
tool.invalidateBrushCursor();
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// Trigger an annotation render for any viewports on the toolgroup
|
|
29
|
+
const viewportsInfo = toolGroup.getViewportsInfo();
|
|
30
|
+
|
|
31
|
+
const viewportsInfoArray = Object.keys(viewportsInfo).map(
|
|
32
|
+
(key) => viewportsInfo[key]
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
if (!viewportsInfoArray.length) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const { renderingEngineId } = viewportsInfoArray[0];
|
|
40
|
+
|
|
41
|
+
// Use helper to get array of viewportIds, or we just end up doing this mapping
|
|
42
|
+
// ourselves here.
|
|
43
|
+
const viewportIds = toolGroup.getViewportIds();
|
|
44
|
+
|
|
45
|
+
const renderingEngine = getRenderingEngine(renderingEngineId);
|
|
46
|
+
|
|
47
|
+
triggerAnnotationRenderForViewportIds(renderingEngine, viewportIds);
|
|
48
|
+
}
|
|
@@ -2,7 +2,7 @@ import { Types } from '@cornerstonejs/core';
|
|
|
2
2
|
import { utilities as csUtils } from '@cornerstonejs/core';
|
|
3
3
|
import { getToolGroup } from '../../store/ToolGroupManager';
|
|
4
4
|
import BrushTool from '../../tools/segmentation/BrushTool';
|
|
5
|
-
import
|
|
5
|
+
import { getBoundingBoxAroundShapeIJK } from '../boundingBox/getBoundingBoxAroundShape';
|
|
6
6
|
|
|
7
7
|
export type ThresholdInformation = {
|
|
8
8
|
volume: Types.IImageVolume;
|
|
@@ -67,7 +67,10 @@ export function getVoxelOverlap(
|
|
|
67
67
|
const voxelCornersIJK = voxelCornersWorld.map(
|
|
68
68
|
(world) => csUtils.transformWorldToIndex(imageData, world) as Types.Point3
|
|
69
69
|
);
|
|
70
|
-
const overlapBounds =
|
|
70
|
+
const overlapBounds = getBoundingBoxAroundShapeIJK(
|
|
71
|
+
voxelCornersIJK,
|
|
72
|
+
dimensions
|
|
73
|
+
);
|
|
71
74
|
|
|
72
75
|
return overlapBounds;
|
|
73
76
|
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Types } from '@cornerstonejs/core';
|
|
2
|
-
import type { vtkImageData } from '@kitware/vtk.js/Common/DataModel/ImageData';
|
|
3
|
-
import { PointInShapeCallback } from './pointInShapeCallback';
|
|
4
|
-
export default function pointInSurroundingSphereCallback(imageData: vtkImageData, circlePoints: [Types.Point3, Types.Point3], callback: PointInShapeCallback, viewport?: Types.IVolumeViewport): void;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const core_1 = require("@cornerstonejs/core");
|
|
7
|
-
const gl_matrix_1 = require("gl-matrix");
|
|
8
|
-
const sphere_1 = require("./math/sphere");
|
|
9
|
-
const pointInShapeCallback_1 = __importDefault(require("./pointInShapeCallback"));
|
|
10
|
-
const boundingBox_1 = require("./boundingBox");
|
|
11
|
-
const { transformWorldToIndex } = core_1.utilities;
|
|
12
|
-
function pointInSurroundingSphereCallback(imageData, circlePoints, callback, viewport) {
|
|
13
|
-
const { boundsIJK, centerWorld, radiusWorld } = _getBounds(circlePoints, imageData, viewport);
|
|
14
|
-
const sphereObj = {
|
|
15
|
-
center: centerWorld,
|
|
16
|
-
radius: radiusWorld,
|
|
17
|
-
};
|
|
18
|
-
(0, pointInShapeCallback_1.default)(imageData, (pointLPS) => (0, sphere_1.pointInSphere)(sphereObj, pointLPS), callback, boundsIJK);
|
|
19
|
-
}
|
|
20
|
-
exports.default = pointInSurroundingSphereCallback;
|
|
21
|
-
function _getBounds(circlePoints, imageData, viewport) {
|
|
22
|
-
const [bottom, top] = circlePoints;
|
|
23
|
-
const centerWorld = gl_matrix_1.vec3.fromValues((bottom[0] + top[0]) / 2, (bottom[1] + top[1]) / 2, (bottom[2] + top[2]) / 2);
|
|
24
|
-
const radiusWorld = gl_matrix_1.vec3.distance(bottom, top) / 2;
|
|
25
|
-
let boundsIJK;
|
|
26
|
-
if (!viewport) {
|
|
27
|
-
const centerIJK = transformWorldToIndex(imageData, centerWorld);
|
|
28
|
-
const spacings = imageData.getSpacing();
|
|
29
|
-
const minSpacing = Math.min(...spacings);
|
|
30
|
-
const maxRadiusIJK = Math.ceil(radiusWorld / minSpacing);
|
|
31
|
-
boundsIJK = [
|
|
32
|
-
[centerIJK[0] - maxRadiusIJK, centerIJK[0] + maxRadiusIJK],
|
|
33
|
-
[centerIJK[1] - maxRadiusIJK, centerIJK[1] + maxRadiusIJK],
|
|
34
|
-
[centerIJK[2] - maxRadiusIJK, centerIJK[2] + maxRadiusIJK],
|
|
35
|
-
];
|
|
36
|
-
return {
|
|
37
|
-
boundsIJK,
|
|
38
|
-
centerWorld: centerWorld,
|
|
39
|
-
radiusWorld,
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
boundsIJK = _computeBoundsIJKWithCamera(imageData, viewport, circlePoints, centerWorld, radiusWorld);
|
|
43
|
-
return {
|
|
44
|
-
boundsIJK,
|
|
45
|
-
centerWorld: centerWorld,
|
|
46
|
-
radiusWorld,
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
function _computeBoundsIJKWithCamera(imageData, viewport, circlePoints, centerWorld, radiusWorld) {
|
|
50
|
-
const [bottom, top] = circlePoints;
|
|
51
|
-
const dimensions = imageData.getDimensions();
|
|
52
|
-
const camera = viewport.getCamera();
|
|
53
|
-
const viewUp = gl_matrix_1.vec3.fromValues(camera.viewUp[0], camera.viewUp[1], camera.viewUp[2]);
|
|
54
|
-
const viewPlaneNormal = gl_matrix_1.vec3.fromValues(camera.viewPlaneNormal[0], camera.viewPlaneNormal[1], camera.viewPlaneNormal[2]);
|
|
55
|
-
const viewRight = gl_matrix_1.vec3.create();
|
|
56
|
-
gl_matrix_1.vec3.cross(viewRight, viewUp, viewPlaneNormal);
|
|
57
|
-
const topLeftWorld = gl_matrix_1.vec3.create();
|
|
58
|
-
const bottomRightWorld = gl_matrix_1.vec3.create();
|
|
59
|
-
gl_matrix_1.vec3.scaleAndAdd(topLeftWorld, top, viewPlaneNormal, radiusWorld);
|
|
60
|
-
gl_matrix_1.vec3.scaleAndAdd(bottomRightWorld, bottom, viewPlaneNormal, -radiusWorld);
|
|
61
|
-
gl_matrix_1.vec3.scaleAndAdd(topLeftWorld, topLeftWorld, viewRight, -radiusWorld);
|
|
62
|
-
gl_matrix_1.vec3.scaleAndAdd(bottomRightWorld, bottomRightWorld, viewRight, radiusWorld);
|
|
63
|
-
const sphereCornersIJK = [
|
|
64
|
-
transformWorldToIndex(imageData, topLeftWorld),
|
|
65
|
-
(transformWorldToIndex(imageData, bottomRightWorld)),
|
|
66
|
-
];
|
|
67
|
-
const boundsIJK = (0, boundingBox_1.getBoundingBoxAroundShape)(sphereCornersIJK, dimensions);
|
|
68
|
-
return boundsIJK;
|
|
69
|
-
}
|
|
70
|
-
//# sourceMappingURL=pointInSurroundingSphereCallback.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pointInSurroundingSphereCallback.js","sourceRoot":"","sources":["../../../src/utilities/pointInSurroundingSphereCallback.ts"],"names":[],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MAAM,eAAe,GAAG,gBAAI,CAAC,UAAU,CACrC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,EACzB,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,EACzB,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,CAC1B,CAAC;IACF,MAAM,SAAS,GAAG,gBAAI,CAAC,MAAM,EAAE,CAAC;IAEhC,gBAAI,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC;IAQ/C,MAAM,YAAY,GAAG,gBAAI,CAAC,MAAM,EAAE,CAAC;IACnC,MAAM,gBAAgB,GAAG,gBAAI,CAAC,MAAM,EAAE,CAAC;IAEvC,gBAAI,CAAC,WAAW,CAAC,YAAY,EAAE,GAAG,EAAE,eAAe,EAAE,WAAW,CAAC,CAAC;IAClE,gBAAI,CAAC,WAAW,CAAC,gBAAgB,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC,WAAW,CAAC,CAAC;IAG1E,gBAAI,CAAC,WAAW,CAAC,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC,WAAW,CAAC,CAAC;IACtE,gBAAI,CAAC,WAAW,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;IAI7E,MAAM,gBAAgB,GAAG;QACT,qBAAqB,CAAC,SAAS,EAAgB,YAAY,CAAC;QAC5D,CACZ,qBAAqB,CAAC,SAAS,EAAgB,gBAAgB,CAAC,CACjE;KACF,CAAC;IAGF,MAAM,SAAS,GAAG,IAAA,uCAAyB,EAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC;IAE1E,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { utilities as csUtils } from '@cornerstonejs/core';
|
|
2
|
-
import { vec3 } from 'gl-matrix';
|
|
3
|
-
import { pointInSphere } from './math/sphere';
|
|
4
|
-
import pointInShapeCallback from './pointInShapeCallback';
|
|
5
|
-
import { getBoundingBoxAroundShape } from './boundingBox';
|
|
6
|
-
const { transformWorldToIndex } = csUtils;
|
|
7
|
-
export default function pointInSurroundingSphereCallback(imageData, circlePoints, callback, viewport) {
|
|
8
|
-
const { boundsIJK, centerWorld, radiusWorld } = _getBounds(circlePoints, imageData, viewport);
|
|
9
|
-
const sphereObj = {
|
|
10
|
-
center: centerWorld,
|
|
11
|
-
radius: radiusWorld,
|
|
12
|
-
};
|
|
13
|
-
pointInShapeCallback(imageData, (pointLPS) => pointInSphere(sphereObj, pointLPS), callback, boundsIJK);
|
|
14
|
-
}
|
|
15
|
-
function _getBounds(circlePoints, imageData, viewport) {
|
|
16
|
-
const [bottom, top] = circlePoints;
|
|
17
|
-
const centerWorld = vec3.fromValues((bottom[0] + top[0]) / 2, (bottom[1] + top[1]) / 2, (bottom[2] + top[2]) / 2);
|
|
18
|
-
const radiusWorld = vec3.distance(bottom, top) / 2;
|
|
19
|
-
let boundsIJK;
|
|
20
|
-
if (!viewport) {
|
|
21
|
-
const centerIJK = transformWorldToIndex(imageData, centerWorld);
|
|
22
|
-
const spacings = imageData.getSpacing();
|
|
23
|
-
const minSpacing = Math.min(...spacings);
|
|
24
|
-
const maxRadiusIJK = Math.ceil(radiusWorld / minSpacing);
|
|
25
|
-
boundsIJK = [
|
|
26
|
-
[centerIJK[0] - maxRadiusIJK, centerIJK[0] + maxRadiusIJK],
|
|
27
|
-
[centerIJK[1] - maxRadiusIJK, centerIJK[1] + maxRadiusIJK],
|
|
28
|
-
[centerIJK[2] - maxRadiusIJK, centerIJK[2] + maxRadiusIJK],
|
|
29
|
-
];
|
|
30
|
-
return {
|
|
31
|
-
boundsIJK,
|
|
32
|
-
centerWorld: centerWorld,
|
|
33
|
-
radiusWorld,
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
boundsIJK = _computeBoundsIJKWithCamera(imageData, viewport, circlePoints, centerWorld, radiusWorld);
|
|
37
|
-
return {
|
|
38
|
-
boundsIJK,
|
|
39
|
-
centerWorld: centerWorld,
|
|
40
|
-
radiusWorld,
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
function _computeBoundsIJKWithCamera(imageData, viewport, circlePoints, centerWorld, radiusWorld) {
|
|
44
|
-
const [bottom, top] = circlePoints;
|
|
45
|
-
const dimensions = imageData.getDimensions();
|
|
46
|
-
const camera = viewport.getCamera();
|
|
47
|
-
const viewUp = vec3.fromValues(camera.viewUp[0], camera.viewUp[1], camera.viewUp[2]);
|
|
48
|
-
const viewPlaneNormal = vec3.fromValues(camera.viewPlaneNormal[0], camera.viewPlaneNormal[1], camera.viewPlaneNormal[2]);
|
|
49
|
-
const viewRight = vec3.create();
|
|
50
|
-
vec3.cross(viewRight, viewUp, viewPlaneNormal);
|
|
51
|
-
const topLeftWorld = vec3.create();
|
|
52
|
-
const bottomRightWorld = vec3.create();
|
|
53
|
-
vec3.scaleAndAdd(topLeftWorld, top, viewPlaneNormal, radiusWorld);
|
|
54
|
-
vec3.scaleAndAdd(bottomRightWorld, bottom, viewPlaneNormal, -radiusWorld);
|
|
55
|
-
vec3.scaleAndAdd(topLeftWorld, topLeftWorld, viewRight, -radiusWorld);
|
|
56
|
-
vec3.scaleAndAdd(bottomRightWorld, bottomRightWorld, viewRight, radiusWorld);
|
|
57
|
-
const sphereCornersIJK = [
|
|
58
|
-
transformWorldToIndex(imageData, topLeftWorld),
|
|
59
|
-
(transformWorldToIndex(imageData, bottomRightWorld)),
|
|
60
|
-
];
|
|
61
|
-
const boundsIJK = getBoundingBoxAroundShape(sphereCornersIJK, dimensions);
|
|
62
|
-
return boundsIJK;
|
|
63
|
-
}
|
|
64
|
-
//# sourceMappingURL=pointInSurroundingSphereCallback.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pointInSurroundingSphereCallback.js","sourceRoot":"","sources":["../../../src/utilities/pointInSurroundingSphereCallback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,OAAO,EAAE,MAAM,qBA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ataModel/ImageData';
|
|
3
|
-
import { PointInShapeCallback } from './pointInShapeCallback';
|
|
4
|
-
export default function pointInSurroundingSphereCallback(imageData: vtkImageData, circlePoints: [Types.Point3, Types.Point3], callback: PointInShapeCallback, viewport?: Types.IVolumeViewport): void;
|
|
5
|
-
//# sourceMappingURL=pointInSurroundingSphereCallback.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pointInSurroundingSphereCallback.d.ts","sourceRoot":"","sources":["../../../src/utilities/pointInSurroundingSphereCallback.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAG/E,OAA6B,EAC3B,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAqBhC,MAAM,CAAC,OAAO,UAAU,gCAAgC,CACtD,SAAS,EAAE,YAAY,EACvB,YAAY,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAC1C,QAAQ,EAAE,oBAAoB,EAC9B,QAAQ,CAAC,EAAE,KAAK,CAAC,eAAe,GAC/B,IAAI,CAsBN"}
|