Skip to content

Commit

Permalink
fix(utilities/math): export circle math utilities (#1703)
Browse files Browse the repository at this point in the history
* fix(utilities/math): export circle math utilities

* api
  • Loading branch information
JSweet314 authored Dec 12, 2024
1 parent a3d34e4 commit 1a7b7d6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
1 change: 0 additions & 1 deletion common/reviews/api/ai.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { Corners } from '@kitware/vtk.js/Interaction/Widgets/OrientationMarkerWi
import type { IColorMapPreset } from '@kitware/vtk.js/Rendering/Core/ColorTransferFunction/ColorMaps';
import type { mat3 } from 'gl-matrix';
import { mat4 } from 'gl-matrix';
import { PixelDataTypedArray as PixelDataTypedArray_2 } from 'packages/core/dist/esm/types';
import type { Range as Range_2 } from '@kitware/vtk.js/types';
import { vec3 } from 'gl-matrix';
import type vtkActor from '@kitware/vtk.js/Rendering/Core/Actor';
Expand Down
14 changes: 14 additions & 0 deletions common/reviews/api/tools.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,13 @@ declare namespace CINETypes {
}
}

declare namespace circle {
export {
getCanvasCircleRadius,
getCanvasCircleCorners
}
}

// @public (undocumented)
interface CircleROIAnnotation extends Annotation {
// (undocumented)
Expand Down Expand Up @@ -2654,6 +2661,12 @@ const getCalibratedProbeUnitsAndValue: (image: any, handles: any) => {
calibrationType: string;
};

// @public (undocumented)
function getCanvasCircleCorners(circleCanvasPoints: canvasCoordinates): Array<Types_2.Point2>;

// @public (undocumented)
function getCanvasCircleRadius(circleCanvasPoints: canvasCoordinates): number;

// @public (undocumented)
function getCanvasEllipseCorners(ellipseCanvasPoints: CanvasCoordinates): Array<Types_2.Point2>;

Expand Down Expand Up @@ -3817,6 +3830,7 @@ declare namespace math {
export {
aabb,
BasicStatsCalculator,
circle,
ellipse,
lineSegment,
point,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"build:update-api:tools": "cd packages/tools && npm run build:update-api",
"build:update-api:nifti": "cd packages/nifti-volume-loader && npm run build:update-api",
"build:update-api:dicomImageLoader": "cd packages/dicomImageLoader && npm run build:update-api",
"build:update-api": "npm run build:update-api:ai && npm run build:update-api:core && npm run build:update-api:tools && npm run build:update-api:nifti && npm run build:update-api:dicomImageLoader",
"build:update-api": "npm run build && npm run build:update-api:ai && npm run build:update-api:core && npm run build:update-api:tools && npm run build:update-api:nifti && npm run build:update-api:dicomImageLoader",
"clean": "npx lerna run clean --stream",
"clean:deep": "npx lerna run clean:deep --stream",
"example": "node ./utils/ExampleRunner/example-runner-cli.js",
Expand Down
2 changes: 2 additions & 0 deletions packages/tools/src/utilities/math/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as aabb from './aabb';
import * as BasicStatsCalculator from './basic';
import * as circle from './circle';
import * as ellipse from './ellipse';
import * as lineSegment from './line';
import * as point from './point';
Expand All @@ -10,6 +11,7 @@ import * as vec2 from './vec2';
export {
aabb,
BasicStatsCalculator,
circle,
ellipse,
lineSegment,
point,
Expand Down

0 comments on commit 1a7b7d6

Please sign in to comment.