feat(SR): Measurement adapter mappings and save to same series (#3140)

* feat: Add adapter mappings for RectangleROI and Angle and save same

PR comments

* fix: Rehydrate check on non core measurement adapters
This commit is contained in:
Bill Wallace authored and GitHub committed 2023-02-17 16:44:21 -05:00
1 parent 926290f69e
commit 67fc3f733d
42 files changed
+1277 -218

No files matched your search

+2 -2
View File
@@ -37,8 +37,8 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"dcmjs": "0.29.4",
"dicomweb-client": "^0.6.0",
"dcmjs": "^0.29.4",
"dicomweb-client": "^0.8.4",
"isomorphic-base64": "^1.0.2",
"lodash.merge": "^4.6.1",
"lodash.clonedeep": "^4.5.0",
@@ -11,7 +11,7 @@ export const polygonRoi = {
id: 'PolygonRoi',
name: 'Polygon',
toolGroup: 'allTools',
cornerstoneToolType: 'FreehandRoiTool',
cornerstoneToolType: 'PlanarFreehandROITool',
options: {
measurementTable: {
displayFunction,
@@ -71,6 +71,7 @@ const EVENTS = {
};
const VALUE_TYPES = {
ANGLE: 'value_type::polyline',
POLYLINE: 'value_type::polyline',
POINT: 'value_type::point',
BIDIRECTIONAL: 'value_type::shortAxisLongAxis', // TODO -> Discuss with Danny. => just using SCOORD values isn't enough here.
@@ -103,18 +104,15 @@ class MeasurementService extends PubSubService {
},
};
public static VALUE_TYPES = VALUE_TYPES;
public readonly VALUE_TYPES = VALUE_TYPES;
constructor() {
super(EVENTS);
this.sources = {};
this.mappings = {};
this.measurements = {};
this._jumpToMeasurementCache = {};
Object.defineProperty(this, 'VALUE_TYPES', {
value: VALUE_TYPES,
writable: false,
enumerable: true,
configurable: false,
});
}
/**
@@ -529,6 +527,7 @@ class MeasurementService extends PubSubService {
measurement = toMeasurementSchema(sourceAnnotationDetail);
measurement.source = source;
} catch (error) {
console.log('Failed to map', error);
throw new Error(
`Failed to map '${sourceInfo}' measurement for annotationType ${annotationType}: ${error.message}`
);
+1 -2
View File
@@ -66,8 +66,7 @@
"core-js": "^3.16.1",
"cornerstone-math": "^0.1.9",
"cornerstone-wado-image-loader": "^4.2.1",
"dayjs": "^1.11.6",
"dcmjs": "0.29.4",
"dcmjs": "^0.29.4",
"detect-gpu": "^4.0.16",
"dicom-parser": "^1.8.9",
"dotenv-webpack": "^1.7.0",