Files
ohif-viewer/Packages/ohif-lesiontracker/both/configuration/targetCR.js
T

57 lines
1.3 KiB
JavaScript

import { SimpleSchema } from 'meteor/aldeed:simple-schema';
import { MeasurementSchemaTypes } from 'meteor/ohif:measurements/both/schema/measurements';
const CornerstoneHandleSchema = MeasurementSchemaTypes.CornerstoneHandleSchema;
const TargetCRHandlesSchema = new SimpleSchema({
start: {
type: CornerstoneHandleSchema,
label: 'Start'
},
end: {
type: CornerstoneHandleSchema,
label: 'End'
},
textBox: {
type: CornerstoneHandleSchema,
label: 'Text Box'
}
});
const TargetCRSchema = new SimpleSchema([MeasurementSchemaTypes.CornerstoneToolMeasurement, {
handles: {
type: TargetCRHandlesSchema,
label: 'Handles'
},
location: {
type: String,
label: 'Location',
optional: true
},
description: {
type: String,
label: 'Description',
optional: true
},
locationUid: {
type: String,
label: 'Location UID',
optional: true // Optional because it is added after initial drawing, via a callback
}
}]);
function displayFunction(data) {
return data.location;
}
export const targetCR = {
id: 'targetsCR',
memberOf: 'targets',
name: 'CR Targets',
cornerstoneToolType: 'targetCR',
schema: TargetCRSchema,
options: {
includeInCaseProgress: true,
}
};