From 716dfdad8d2ad1b78c6b3474b9e096940b96d7a1 Mon Sep 17 00:00:00 2001 From: Leonardo Campos Date: Sat, 4 Mar 2017 00:25:51 -0300 Subject: [PATCH] updating cornerstoneWADOImageLoader (PR #70) Pull Request https://github.com/chafey/cornerstoneWADOImageLoader/pull/70 --- .../client/cornerstoneWADOImageLoader.js | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/Packages/ohif-cornerstone/client/cornerstoneWADOImageLoader.js b/Packages/ohif-cornerstone/client/cornerstoneWADOImageLoader.js index 4d61a0a82..f3138c7bd 100644 --- a/Packages/ohif-cornerstone/client/cornerstoneWADOImageLoader.js +++ b/Packages/ohif-cornerstone/client/cornerstoneWADOImageLoader.js @@ -1077,6 +1077,25 @@ if(typeof cornerstoneWADOImageLoader === 'undefined'){ return; } + if(type === 'generalSeriesModule') { + return { + modality: getValue(metaData['00080060']), + seriesInstanceUID: getValue(metaData['0020000e']), + seriesNumber: getNumberValue(metaData['00200011']), + studyInstanceUID: getValue(metaData['0020000d']), + seriesDate: dicomParser.parseDA(getValue(metaData['00080021'])), + seriesTime: dicomParser.parseTM(getValue(metaData['00080031'], 0, '')) + }; + } + + if(type === 'patientStudyModule') { + return { + patientAge: getNumberValue(metaData['00101010']), + patientSize: getNumberValue(metaData['00101020']), + patientWeight: getNumberValue(metaData['00101030']) + } + } + if (type === 'imagePlaneModule') { return { pixelSpacing: getNumberValues(metaData['00280030'], 2), @@ -1134,6 +1153,21 @@ if(typeof cornerstoneWADOImageLoader === 'undefined'){ }; } + if (type === 'petIsotopeModule') { + var radiopharmaceuticalInfo = getValue(metaData['00540016']); + if (radiopharmaceuticalInfo === undefined) { + return; + } + + return { + radiopharmaceuticalInfo: { + radiopharmaceuticalStartTime: dicomParser.parseTM(getValue(radiopharmaceuticalInfo['00181072'])), + radionuclideTotalDose: getNumberValue(radiopharmaceuticalInfo['00181074']), + radionuclideHalfLife: getNumberValue(radiopharmaceuticalInfo['00181075']) + } + }; + } + } @@ -1643,6 +1677,26 @@ if(typeof cornerstoneWADOImageLoader === 'undefined'){ return; } + if(type === 'generalSeriesModule') { + return { + modality: dataSet.string('x00080060'), + seriesInstanceUID: dataSet.string('x0020000e'), + seriesNumber: dataSet.intString('x00200011'), + studyInstanceUID: dataSet.string('x0020000d'), + seriesInstanceUID: dataSet.string('x0020000e'), + seriesDate: dicomParser.parseDA(dataSet.string('x00080021')), + seriesTime: dicomParser.parseTM(dataSet.string('x00080031')) + }; + } + + if(type === 'patientStudyModule') { + return { + patientAge: dataSet.intString('x00101010'), + patientSize: dataSet.floatString('x00101020'), + patientWeight: dataSet.floatString('x00101030') + } + } + if (type === 'imagePlaneModule') { return { pixelSpacing: getNumberValues(dataSet, 'x00280030', 2), @@ -1683,6 +1737,22 @@ if(typeof cornerstoneWADOImageLoader === 'undefined'){ }; } + if (type === 'petIsotopeModule') { + var radiopharmaceuticalInfo = dataSet.elements.x00540016; + if (radiopharmaceuticalInfo === undefined) { + return; + } + + var firstRadiopharmaceuticalInfoDataSet = radiopharmaceuticalInfo.items[0].dataSet; + return { + radiopharmaceuticalInfo: { + radiopharmaceuticalStartTime: dicomParser.parseTM(firstRadiopharmaceuticalInfoDataSet.string('x00181072')), + radionuclideTotalDose: firstRadiopharmaceuticalInfoDataSet.floatString('x00181074'), + radionuclideHalfLife: firstRadiopharmaceuticalInfoDataSet.floatString('x00181075') + } + } + } + }