Bug fixes for conformance criteria and pixel spacing check

This commit is contained in:
Erik Ziegler 2016-02-09 17:41:58 +01:00
parent b01a2cccee
commit 5f757457c8
2 changed files with 11 additions and 7 deletions

View File

@ -39,7 +39,7 @@ function RECIST(image) {
criteria.baseline.target.nodal = { criteria.baseline.target.nodal = {
shortestDiameter: { shortestDiameter: {
numericality: { numericality: {
greaterThanOrEqualTo: Math.min(15, 2 * acquisitionSliceThickness), greaterThanOrEqualTo: Math.max(15, 2 * acquisitionSliceThickness),
message: '^Nodal lesions must be >= 15 mm short axis AND >= double the acquisition slice thickness (' + message: '^Nodal lesions must be >= 15 mm short axis AND >= double the acquisition slice thickness (' +
acquisitionSliceThickness + ' mm) for CT and MR.' acquisitionSliceThickness + ' mm) for CT and MR.'
} }
@ -114,7 +114,7 @@ function RECIST(image) {
criteria.baseline.target.extraNodal = { criteria.baseline.target.extraNodal = {
longestDiameter: { longestDiameter: {
numericality: { numericality: {
greaterThanOrEqualTo: Math.min(10, 2 * acquisitionSliceThickness), greaterThanOrEqualTo: Math.max(10, 2 * acquisitionSliceThickness),
message: '^Extranodal lesions must be >= 10 mm long axis AND >= double the acquisition slice thickness (' + message: '^Extranodal lesions must be >= 10 mm long axis AND >= double the acquisition slice thickness (' +
acquisitionSliceThickness + ' mm) for CT and MR.' acquisitionSliceThickness + ' mm) for CT and MR.'
} }
@ -179,14 +179,14 @@ function irRC(image) {
criteria.baseline.target.all = { criteria.baseline.target.all = {
longestDiameter: { longestDiameter: {
numericality: { numericality: {
greaterThanOrEqualTo: Math.min(10, acquisitionSliceThickness), greaterThanOrEqualTo: Math.max(10, acquisitionSliceThickness),
message: '^Target lesions must be >= 10 mm long axis AND >= double the acquisition slice thickness (' + message: '^Target lesions must be >= 10 mm long axis AND >= double the acquisition slice thickness (' +
acquisitionSliceThickness + ' mm) for CT and MR.' acquisitionSliceThickness + ' mm) for CT and MR.'
} }
}, },
shortestDiameter: { shortestDiameter: {
numericality: { numericality: {
greaterThanOrEqualTo: Math.min(10, acquisitionSliceThickness), greaterThanOrEqualTo: Math.max(10, acquisitionSliceThickness),
message: '^Target lesions must be >= 10 mm short axis AND >= double the acquisition slice thickness (' + message: '^Target lesions must be >= 10 mm short axis AND >= double the acquisition slice thickness (' +
acquisitionSliceThickness + ' mm) for CT and MR.' acquisitionSliceThickness + ' mm) for CT and MR.'
} }
@ -258,14 +258,14 @@ function irRC(image) {
// - New target lesions must be >/= 5 X 5 mm AND >/= double the acquisition slice thickness by CT and MR // - New target lesions must be >/= 5 X 5 mm AND >/= double the acquisition slice thickness by CT and MR
longestDiameter: { longestDiameter: {
numericality: { numericality: {
greaterThanOrEqualTo: Math.min(5, 2 * acquisitionSliceThickness), greaterThanOrEqualTo: Math.max(5, 2 * acquisitionSliceThickness),
message: '^New target lesions must be >= 5 mm long axis AND >= double the acquisition slice thickness (' + message: '^New target lesions must be >= 5 mm long axis AND >= double the acquisition slice thickness (' +
acquisitionSliceThickness + ' mm) for CT and MR.' acquisitionSliceThickness + ' mm) for CT and MR.'
} }
}, },
shortestDiameter: { shortestDiameter: {
numericality: { numericality: {
greaterThanOrEqualTo: Math.min(5, 2 * acquisitionSliceThickness), greaterThanOrEqualTo: Math.max(5, 2 * acquisitionSliceThickness),
message: '^New target lesions must be >= 5 mm short axis AND >= double the acquisition slice thickness (' + message: '^New target lesions must be >= 5 mm short axis AND >= double the acquisition slice thickness (' +
acquisitionSliceThickness + ' mm) for CT and MR.' acquisitionSliceThickness + ' mm) for CT and MR.'
} }

View File

@ -15,7 +15,11 @@ pixelSpacingAutorunCheck = function() {
return; return;
} }
var enabledElement = cornerstone.getEnabledElement(element); try {
var enabledElement = cornerstone.getEnabledElement(element);
} catch(error) {
return;
}
// Check value of rowPixelSpacing & columnPixelSpacing to define as unavailable // Check value of rowPixelSpacing & columnPixelSpacing to define as unavailable
if (!enabledElement || if (!enabledElement ||