LT-115: Configuring schemas for for CR-target and UN-Target
This commit is contained in:
1 parent
0cf9163885
commit
e640f5a007
14 files changed
+179
-63
No files matched your search
@@ -1,8 +1,8 @@
|
||||
import { bidirectional } from './bidirectional';
|
||||
import { target } from './target';
|
||||
import { nonTarget } from './nonTarget';
|
||||
import { length } from './length';
|
||||
import { ellipse } from './ellipse';
|
||||
|
||||
export const validateMeasurements = () => {
|
||||
console.log('validateMeasurements');
|
||||
};
|
||||
console.log('validateMeasurements');
|
||||
};
|
||||
@@ -1,11 +1,15 @@
|
||||
import { bidirectional } from './bidirectional';
|
||||
import { target } from './target';
|
||||
import { targetCR } from './targetCR';
|
||||
import { targetUN } from './targetUN';
|
||||
import { nonTarget } from './nonTarget';
|
||||
import { length } from './length';
|
||||
import { ellipse } from './ellipse';
|
||||
|
||||
export const measurementTools = [
|
||||
bidirectional,
|
||||
nonTarget,
|
||||
length,
|
||||
ellipse
|
||||
];
|
||||
target,
|
||||
targetCR,
|
||||
targetUN,
|
||||
nonTarget,
|
||||
length,
|
||||
ellipse
|
||||
];
|
||||
+6
-5
@@ -3,7 +3,7 @@ import { MeasurementSchemaTypes } from 'meteor/ohif:measurements/both/schema/mea
|
||||
|
||||
const CornerstoneHandleSchema = MeasurementSchemaTypes.CornerstoneHandleSchema;
|
||||
|
||||
const BidirectionalHandlesSchema = new SimpleSchema({
|
||||
const TargetHandlesSchema = new SimpleSchema({
|
||||
start: {
|
||||
type: CornerstoneHandleSchema,
|
||||
label: 'Start'
|
||||
@@ -26,9 +26,9 @@ const BidirectionalHandlesSchema = new SimpleSchema({
|
||||
},
|
||||
});
|
||||
|
||||
const BidirectionalSchema = new SimpleSchema([MeasurementSchemaTypes.CornerstoneToolMeasurement, {
|
||||
const TargetSchema = new SimpleSchema([MeasurementSchemaTypes.CornerstoneToolMeasurement, {
|
||||
handles: {
|
||||
type: BidirectionalHandlesSchema,
|
||||
type: TargetHandlesSchema,
|
||||
label: 'Handles'
|
||||
},
|
||||
location: {
|
||||
@@ -81,14 +81,15 @@ function displayFunction(data) {
|
||||
return data.longestDiameter;
|
||||
}
|
||||
|
||||
export const bidirectional = {
|
||||
export const target = {
|
||||
id: 'targets',
|
||||
name: 'Targets',
|
||||
cornerstoneToolType: 'bidirectional',
|
||||
schema: BidirectionalSchema,
|
||||
schema: TargetSchema,
|
||||
options: {
|
||||
showInMeasurementTable: true,
|
||||
measurementTableOptions: {
|
||||
key: 'targets',
|
||||
displayFunction: displayFunction
|
||||
},
|
||||
includeInCaseProgress: true,
|
||||
@@ -0,0 +1,56 @@
|
||||
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,
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,56 @@
|
||||
import { SimpleSchema } from 'meteor/aldeed:simple-schema';
|
||||
import { MeasurementSchemaTypes } from 'meteor/ohif:measurements/both/schema/measurements';
|
||||
|
||||
const CornerstoneHandleSchema = MeasurementSchemaTypes.CornerstoneHandleSchema;
|
||||
|
||||
const TargetUNHandlesSchema = new SimpleSchema({
|
||||
start: {
|
||||
type: CornerstoneHandleSchema,
|
||||
label: 'Start'
|
||||
},
|
||||
end: {
|
||||
type: CornerstoneHandleSchema,
|
||||
label: 'End'
|
||||
},
|
||||
textBox: {
|
||||
type: CornerstoneHandleSchema,
|
||||
label: 'Text Box'
|
||||
}
|
||||
});
|
||||
|
||||
const TargetUNSchema = new SimpleSchema([MeasurementSchemaTypes.CornerstoneToolMeasurement, {
|
||||
handles: {
|
||||
type: TargetUNHandlesSchema,
|
||||
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 targetUN = {
|
||||
id: 'targetsUN',
|
||||
memberOf: 'targets',
|
||||
name: 'UN Targets',
|
||||
cornerstoneToolType: 'targetUN',
|
||||
schema: TargetUNSchema,
|
||||
options: {
|
||||
includeInCaseProgress: true,
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user