bringing series into viewport (work in progress)
This commit is contained in:
parent
42c8ddc73b
commit
7c1a0c38c0
@ -69,6 +69,10 @@ var measurementManagerDAL = (function() {
|
|||||||
|
|
||||||
// Update timepoints from lesion data
|
// Update timepoints from lesion data
|
||||||
var timepoints = measurement.timepoints;
|
var timepoints = measurement.timepoints;
|
||||||
|
if (timepoints[timepointID] === undefined) {
|
||||||
|
timepoints[timepointID] = {};
|
||||||
|
}
|
||||||
|
|
||||||
timepoints[timepointID].longestDiameter = lesionData.measurementText;
|
timepoints[timepointID].longestDiameter = lesionData.measurementText;
|
||||||
timepoints[timepointID].imageId = lesionData.imageId;
|
timepoints[timepointID].imageId = lesionData.imageId;
|
||||||
timepoints[timepointID].seriesInstanceUid = lesionData.seriesInstanceUid;
|
timepoints[timepointID].seriesInstanceUid = lesionData.seriesInstanceUid;
|
||||||
@ -108,7 +112,7 @@ var measurementManagerDAL = (function() {
|
|||||||
// Returns new lesion number according to timepointID
|
// Returns new lesion number according to timepointID
|
||||||
function getNewLesionNumber(timepointID, isTarget) {
|
function getNewLesionNumber(timepointID, isTarget) {
|
||||||
// Get all current lesion measurements
|
// Get all current lesion measurements
|
||||||
var measurements = Measurements.find({isTarget: isTarget}).fetch();
|
var measurements = Measurements.find({isTarget: isTarget},{sort: {lesionNumber: 1}}).fetch();
|
||||||
|
|
||||||
// If no measurements exist yet, start at 1
|
// If no measurements exist yet, start at 1
|
||||||
if (!measurements.length) {
|
if (!measurements.length) {
|
||||||
@ -123,7 +127,8 @@ var measurementManagerDAL = (function() {
|
|||||||
var timepoints = measurement.timepoints;
|
var timepoints = measurement.timepoints;
|
||||||
|
|
||||||
if (!timepoints[timepointID]) {
|
if (!timepoints[timepointID]) {
|
||||||
return;
|
// Find lesion number for this timepointID
|
||||||
|
return measurement.lesionNumber
|
||||||
}
|
}
|
||||||
|
|
||||||
if (timepoints[timepointID].longestDiameter === '') {
|
if (timepoints[timepointID].longestDiameter === '') {
|
||||||
|
|||||||
@ -41,10 +41,16 @@ function updateLesions(e) {
|
|||||||
|
|
||||||
var timepointObject = timepoints[timepointID];
|
var timepointObject = timepoints[timepointID];
|
||||||
|
|
||||||
// TODO: Bring series in correct imageViewport
|
if (timepointObject === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!timepointObject ) {
|
||||||
|
timepointObject = {}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (timepointObject.seriesInstanceUid !== "") {
|
||||||
|
|
||||||
if (timepointObject.seriesInstanceUid !== series.seriesInstanceUid) {
|
|
||||||
console.log("not in same series");
|
|
||||||
var newSeriesData = {
|
var newSeriesData = {
|
||||||
seriesInstanceUid: timepointObject.seriesInstanceUid,
|
seriesInstanceUid: timepointObject.seriesInstanceUid,
|
||||||
studyInstanceUid: timepointObject.studyInstanceUid
|
studyInstanceUid: timepointObject.studyInstanceUid
|
||||||
@ -55,6 +61,8 @@ function updateLesions(e) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Defines event data
|
// Defines event data
|
||||||
|
console.log(element);
|
||||||
|
console.log(cornerstone.getEnabledElement(element));
|
||||||
var eventData = {
|
var eventData = {
|
||||||
enabledElement: cornerstone.getEnabledElement(element),
|
enabledElement: cornerstone.getEnabledElement(element),
|
||||||
lesionData: {
|
lesionData: {
|
||||||
|
|||||||
@ -11,6 +11,10 @@ function setLesionNumberCallback(measurementData, eventData, doneCallback) {
|
|||||||
if (!timepoint) {
|
if (!timepoint) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Get patientId
|
||||||
|
// TODO: add measurement data according to patientId to get correct lesion number for each patient
|
||||||
|
|
||||||
measurementData.timepointID = timepoint.timepointID;
|
measurementData.timepointID = timepoint.timepointID;
|
||||||
|
|
||||||
// Get a lesion number for this lesion, depending on whether or not the same lesion previously
|
// Get a lesion number for this lesion, depending on whether or not the same lesion previously
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user