Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(measurement): Add calibration type labels (ERMF, PROJ, USER) #638

Merged
merged 43 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
f1cc30f
feat(measurement): Add calibration type labels (ERMF, PROJ, USER)
wayfarer3130 Jun 2, 2023
92eb32f
fix(measurement): Fix ERMF display
wayfarer3130 Jun 9, 2023
1fc950b
fix(measurement): Use consistent rounding/sizing on measurements
wayfarer3130 Jun 12, 2023
34b18c5
Fix freehand units
wayfarer3130 Jun 12, 2023
487d8ae
api-check
wayfarer3130 Jun 12, 2023
8ad6ca3
API check fix
wayfarer3130 Jun 12, 2023
def5b36
Merge remote-tracking branch 'origin/main' into feat/calibration-ermf…
wayfarer3130 Jun 13, 2023
ce28aad
PR comments
wayfarer3130 Jun 13, 2023
78b8d9f
PR fixes
wayfarer3130 Jun 13, 2023
4b89858
Merge remote-tracking branch 'origin/main' into feat/calibration-ermf…
wayfarer3130 Jun 19, 2023
d66ee79
API check
wayfarer3130 Jun 19, 2023
321f64f
Merge remote-tracking branch 'origin/main' into feat/calibration-ermf…
wayfarer3130 Jun 27, 2023
de90b68
Api check
wayfarer3130 Jun 27, 2023
349a8f7
api-check
wayfarer3130 Jun 27, 2023
fc85886
Example calibrations
wayfarer3130 Jun 28, 2023
266d686
fix: Update the image calibration to include a message
wayfarer3130 Jun 28, 2023
3465f64
PR requested changes
wayfarer3130 Jun 28, 2023
05e26c6
PR changes
wayfarer3130 Jun 28, 2023
94bd2a0
Fix the calibration application so it works properly
wayfarer3130 Jun 28, 2023
f4ce104
Fix remainder of tools
wayfarer3130 Jun 28, 2023
cfaa2da
Fix tests
wayfarer3130 Jun 28, 2023
a7c3cfa
Fix tests
wayfarer3130 Jun 28, 2023
227dbae
PR changes
wayfarer3130 Jun 28, 2023
beecc54
Api check
wayfarer3130 Jun 28, 2023
f50cc99
PR fixes
wayfarer3130 Jun 29, 2023
1f421b4
Reverting unneeded change
wayfarer3130 Jun 29, 2023
9c698a5
Build fixes
wayfarer3130 Jun 29, 2023
5228e4c
Convert null to 1 spacing to prevent deleting data
wayfarer3130 Jun 29, 2023
ff8e77a
Comments
wayfarer3130 Jun 30, 2023
2030744
Merge remote-tracking branch 'origin/main' into feat/calibration-ermf…
wayfarer3130 Jul 10, 2023
7887eb7
PR requested changes
wayfarer3130 Jul 10, 2023
946606b
Fix tests
wayfarer3130 Jul 10, 2023
ab7e516
api-check
wayfarer3130 Jul 10, 2023
ba0962c
Remove unneeded calibration event
wayfarer3130 Jul 10, 2023
3044ca3
Remove resolutions in favour of updating resemblejs
wayfarer3130 Jul 10, 2023
5dcd6ba
Fix the 1:1 and 0.5:1 aspect ratios
wayfarer3130 Jul 11, 2023
fd0c805
Fix exception being thrown on point near tool
wayfarer3130 Jul 11, 2023
c46f1eb
Merge remote-tracking branch 'origin/main' into feat/calibration-ermf…
wayfarer3130 Jul 14, 2023
6f94ab5
PR requested changes
wayfarer3130 Jul 16, 2023
d8b1d7a
Updated aspect docs as requested
wayfarer3130 Jul 17, 2023
3d3af5c
Merge remote-tracking branch 'origin/main' into feat/calibration-ermf…
wayfarer3130 Jul 19, 2023
8d2d5ca
Update API
wayfarer3130 Jul 19, 2023
e412d6c
api-check
wayfarer3130 Jul 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 45 additions & 4 deletions common/reviews/api/core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,24 @@ export const cache: Cache_2;
// @public (undocumented)
function calculateViewportsSpatialRegistration(viewport1: IStackViewport, viewport2: IStackViewport): void;

// @public (undocumented)
enum CalibrationTypes {
// (undocumented)
ERMF = "ERMF",
// (undocumented)
ERROR = "Error",
// (undocumented)
NOT_APPLICABLE = "",
// (undocumented)
PROJECTION = "Proj",
// (undocumented)
REGION = "Region",
// (undocumented)
UNCALIBRATED = "Uncalibrated",
// (undocumented)
USER = "User"
}

// @public (undocumented)
type CameraModifiedEvent = CustomEvent_2<CameraModifiedEventDetail>;

Expand Down Expand Up @@ -440,6 +458,7 @@ type CPUIImageData = {
scalarData: PixelDataTypedArray;
scaling: Scaling;
hasPixelSpacing?: boolean;
calibration?: IImageCalibration;
preScale?: {
scaled?: boolean;
scalingParameters?: {
Expand Down Expand Up @@ -565,6 +584,7 @@ declare namespace Enums {
export {
EVENTS as Events,
BlendModes,
CalibrationTypes,
InterpolationType,
RequestType,
ViewportType,
Expand Down Expand Up @@ -1128,8 +1148,26 @@ interface IImage {
windowWidth: number[] | number;
}

// @public (undocumented)
interface IImageCalibration {
// (undocumented)
columnPixelSpacing?: number;
// (undocumented)
rowPixelSpacing?: number;
// (undocumented)
scale?: number;
// (undocumented)
sequenceOfUltrasoundRegions?: Record<string, unknown>[];
// (undocumented)
tooltip?: string;
// (undocumented)
type: CalibrationTypes;
}

// @public (undocumented)
interface IImageData {
// (undocumented)
calibration?: IImageCalibration;
// (undocumented)
dimensions: Point3;
// (undocumented)
Expand Down Expand Up @@ -1396,8 +1434,8 @@ type ImageSpacingCalibratedEventDetail = {
viewportId: string;
renderingEngineId: string;
imageId: string;
rowScale: number;
columnScale: number;
scale?: number;
calibration?: IImageCalibration;
imageData: vtkImageData;
worldToIndex: mat4;
};
Expand Down Expand Up @@ -1911,8 +1949,8 @@ export { metaData }

// @public (undocumented)
const metadataProvider: {
add: (imageId: string, payload: CalibratedPixelValue) => void;
get: (type: string, imageId: string) => CalibratedPixelValue;
add: (imageId: string, payload: IImageCalibration) => void;
get: (type: string, imageId: string) => IImageCalibration;
};

// @public (undocumented)
Expand Down Expand Up @@ -2358,6 +2396,7 @@ declare namespace Types {
IStreamingImageVolume,
IImage,
IImageData,
IImageCalibration,
CPUIImageData,
CPUImageData,
EventTypes,
Expand Down Expand Up @@ -2498,6 +2537,8 @@ export class Viewport implements IViewport {
// (undocumented)
addActors(actors: Array<ActorEntry>, resetCameraPanAndZoom?: boolean): void;
// (undocumented)
protected calibration: IImageCalibration;
// (undocumented)
readonly canvas: HTMLCanvasElement;
// (undocumented)
canvasToWorld: (canvasPos: Point2) => Point3;
Expand Down
30 changes: 28 additions & 2 deletions common/reviews/api/streaming-image-volume-loader.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ enum BlendModes {
MINIMUM_INTENSITY_BLEND = BlendMode.MINIMUM_INTENSITY_BLEND,
}

// @public
enum CalibrationTypes {
ERMF = 'ERMF',
ERROR = 'Error',
NOT_APPLICABLE = '',
PROJECTION = 'Proj',
REGION = 'Region',
UNCALIBRATED = 'Uncalibrated',
USER = 'User',
}

// @public
type CameraModifiedEvent = CustomEvent_2<CameraModifiedEventDetail>;

Expand Down Expand Up @@ -361,6 +372,8 @@ type CPUIImageData = {
scalarData: PixelDataTypedArray;
scaling: Scaling;
hasPixelSpacing?: boolean;
calibration?: IImageCalibration;

preScale?: {
scaled?: boolean;
scalingParameters?: {
Expand Down Expand Up @@ -795,8 +808,21 @@ interface IImage {
windowWidth: number[] | number;
}

// @public
interface IImageCalibration {
// (undocumented)
columnPixelSpacing?: number;
rowPixelSpacing?: number;
scale?: number;
sequenceOfUltrasoundRegions?: Record<string, unknown>[];
tooltip?: string;
type: CalibrationTypes;
}

// @public
interface IImageData {
// (undocumented)
calibration?: IImageCalibration;
dimensions: Point3;
direction: Mat3;
hasPixelSpacing?: boolean;
Expand Down Expand Up @@ -998,8 +1024,8 @@ type ImageSpacingCalibratedEventDetail = {
viewportId: string;
renderingEngineId: string;
imageId: string;
rowScale: number;
columnScale: number;
scale?: number;
calibration?: IImageCalibration;
imageData: vtkImageData;
worldToIndex: mat4;
};
Expand Down
27 changes: 23 additions & 4 deletions common/reviews/api/tools.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ export class BrushTool extends BaseTool {
function calculateAreaOfPoints(points: Types_2.Point2[]): number;

// @public (undocumented)
function calibrateImageSpacing(imageId: string, renderingEngine: Types_2.IRenderingEngine, rowPixelSpacing: number, columnPixelSpacing: number): void;
function calibrateImageSpacing(imageId: string, renderingEngine: Types_2.IRenderingEngine, calibrationOrScale: Types_2.IImageCalibration | number): void;

// @public
type CameraModifiedEvent = CustomEvent_2<CameraModifiedEventDetail>;
Expand Down Expand Up @@ -1176,6 +1176,8 @@ type CPUIImageData = {
scalarData: PixelDataTypedArray;
scaling: Scaling;
hasPixelSpacing?: boolean;
calibration?: IImageCalibration;

preScale?: {
scaled?: boolean;
scalingParameters?: {
Expand Down Expand Up @@ -2496,8 +2498,21 @@ interface IImage {
windowWidth: number[] | number;
}

// @public
interface IImageCalibration {
// (undocumented)
columnPixelSpacing?: number;
rowPixelSpacing?: number;
scale?: number;
sequenceOfUltrasoundRegions?: Record<string, unknown>[];
tooltip?: string;
type: CalibrationTypes;
}

// @public
interface IImageData {
// (undocumented)
calibration?: IImageCalibration;
dimensions: Point3;
direction: Mat3;
hasPixelSpacing?: boolean;
Expand Down Expand Up @@ -2708,8 +2723,8 @@ type ImageSpacingCalibratedEventDetail = {
viewportId: string;
renderingEngineId: string;
imageId: string;
rowScale: number;
columnScale: number;
scale?: number;
calibration?: IImageCalibration;
imageData: vtkImageData;
worldToIndex: mat4;
};
Expand Down Expand Up @@ -4352,6 +4367,9 @@ function resetElementCursor(element: HTMLDivElement): void;
// @public
type RGB = [number, number, number];

// @public (undocumented)
function roundNumber(value: string | number, precision?: number): string;

// @public (undocumented)
interface ScaleOverlayAnnotation extends Annotation {
// (undocumented)
Expand Down Expand Up @@ -5366,7 +5384,8 @@ declare namespace utilities {
rectangleROITool,
planarFreehandROITool,
stackPrefetch,
scroll_2 as scroll
scroll_2 as scroll,
roundNumber
}
}
export { utilities }
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"postcss": "^8.4.23",
"prettier": "^2.8.8",
"puppeteer": "^13.5.0",
"resemblejs": "^4.1.0",
"resemblejs": "^5.0.0",
"rollup": "^3.21.3",
"shader-loader": "^1.3.1",
"shelljs": "^0.8.5",
Expand Down Expand Up @@ -159,5 +159,7 @@
"not ie < 11",
"not op_mini all"
],
"dependencies": {}
"dependencies": {},
"resolutions": {
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Segmentation from "./Segmentation.js";
import Segmentation from "./Segmentation";

const VTKjs = {
Segmentation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import VTKjs from "./VTKjs";
const adapters = {
Cornerstone,
Cornerstone3D,
VTKjs,
VTKjs
};

export default adapters;
Loading