LT-275: Storing the selected label and description on measurements collection
This commit is contained in:
1 parent
20a2a8e453
commit
cd5a1277aa
10 files changed
+157
-84
No files matched your search
@@ -4,26 +4,26 @@ import { MeasurementSchemaTypes } from 'meteor/ohif:measurements/both/schema/mea
|
||||
const CornerstoneHandleSchema = MeasurementSchemaTypes.CornerstoneHandleSchema;
|
||||
|
||||
const BidirectionalHandlesSchema = new SimpleSchema({
|
||||
start: {
|
||||
type: CornerstoneHandleSchema,
|
||||
label: 'Start'
|
||||
},
|
||||
end: {
|
||||
type: CornerstoneHandleSchema,
|
||||
label: 'End'
|
||||
},
|
||||
perpendicularStart: {
|
||||
type: CornerstoneHandleSchema,
|
||||
label: 'Perpendicular Start'
|
||||
},
|
||||
perpendicularEnd: {
|
||||
type: CornerstoneHandleSchema,
|
||||
label: 'Perpendicular End'
|
||||
},
|
||||
textBox: {
|
||||
type: CornerstoneHandleSchema,
|
||||
label: 'Text Box'
|
||||
},
|
||||
start: {
|
||||
type: CornerstoneHandleSchema,
|
||||
label: 'Start'
|
||||
},
|
||||
end: {
|
||||
type: CornerstoneHandleSchema,
|
||||
label: 'End'
|
||||
},
|
||||
perpendicularStart: {
|
||||
type: CornerstoneHandleSchema,
|
||||
label: 'Perpendicular Start'
|
||||
},
|
||||
perpendicularEnd: {
|
||||
type: CornerstoneHandleSchema,
|
||||
label: 'Perpendicular End'
|
||||
},
|
||||
textBox: {
|
||||
type: CornerstoneHandleSchema,
|
||||
label: 'Text Box'
|
||||
},
|
||||
});
|
||||
|
||||
const BidirectionalSchema = new SimpleSchema([MeasurementSchemaTypes.CornerstoneToolMeasurement, {
|
||||
@@ -31,36 +31,46 @@ const BidirectionalSchema = new SimpleSchema([MeasurementSchemaTypes.Cornerstone
|
||||
type: BidirectionalHandlesSchema,
|
||||
label: 'Handles'
|
||||
},
|
||||
location: {
|
||||
type: String,
|
||||
label: 'Location',
|
||||
optional: true
|
||||
},
|
||||
description: {
|
||||
type: String,
|
||||
label: 'Description',
|
||||
optional: true
|
||||
},
|
||||
longestDiameter: {
|
||||
type: Number,
|
||||
label: 'Longest Diameter',
|
||||
type: Number,
|
||||
label: 'Longest Diameter',
|
||||
decimal: true
|
||||
},
|
||||
shortestDiameter: {
|
||||
type: Number,
|
||||
label: 'Shortest Diameter',
|
||||
type: Number,
|
||||
label: 'Shortest Diameter',
|
||||
decimal: true
|
||||
},
|
||||
locationUid: {
|
||||
type: String,
|
||||
label: 'Location UID',
|
||||
type: String,
|
||||
label: 'Location UID',
|
||||
optional: true // Optional because it is added after initial drawing, via a callback
|
||||
}
|
||||
}]);
|
||||
|
||||
function displayFunction(data) {
|
||||
// Check whether this is a Nodal or Extranodal Measurement
|
||||
const targetType = 'target';
|
||||
const nodalType = data.isNodal ? 'nodal' : 'extraNodal';
|
||||
// const targetType = 'target';
|
||||
// const nodalType = data.isNodal ? 'nodal' : 'extraNodal';
|
||||
|
||||
// Get criteria types
|
||||
const criteriaTypes = TrialCriteriaTypes.find({
|
||||
selected: true
|
||||
}).map(criteria => {
|
||||
return criteria.id;
|
||||
});
|
||||
// const criteriaTypes = TrialCriteriaTypes.find({
|
||||
// selected: true
|
||||
// }).map(criteria => {
|
||||
// return criteria.id;
|
||||
// });
|
||||
|
||||
const currentConstraints = OHIF.lesiontracker.getTrialCriteriaConstraints(criteriaTypes, data.imageId);
|
||||
// const currentConstraints = OHIF.lesiontracker.getTrialCriteriaConstraints(criteriaTypes, data.imageId);
|
||||
|
||||
if (data.shortestDiameter) {
|
||||
// TODO: Make this check criteria again to see if we should display
|
||||
@@ -83,4 +93,4 @@ export const bidirectional = {
|
||||
},
|
||||
includeInCaseProgress: true,
|
||||
},
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user