Skip to content

Commit

Permalink
feat: add petSeries and petImage modules to providers (#505)
Browse files Browse the repository at this point in the history
  • Loading branch information
sedghi authored Jan 10, 2023
1 parent 60f280e commit 16e0130
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/imageLoader/wadors/metaData/metaDataProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,18 @@ function metaDataProvider(type, imageId) {
studyInstanceUID: getValue(metaData['0020000D']),
seriesDate: dicomParser.parseDA(getValue(metaData['00080021'])),
seriesTime: dicomParser.parseTM(getValue(metaData['00080031'], 0, '')),
acquisitionDate: dicomParser.parseDA(getValue(metaData['00080022']), ''),
acquisitionTime: dicomParser.parseTM(
getValue(metaData['00080032'], 0, '')
),
};
}

if (type === 'patientStudyModule') {
return {
patientAge: getNumberValue(metaData['00101010']),
patientSize: getNumberValue(metaData['00101020']),
patientSex: getValue(metaData['00100040']),
patientWeight: getNumberValue(metaData['00101030']),
};
}
Expand Down Expand Up @@ -165,6 +170,21 @@ function metaDataProvider(type, imageId) {
transferSyntaxUID: getValue(metaData['00020010']),
};
}

if (type === 'petSeriesModule') {
return {
correctedImage: getValue(metaData['00280051']),
units: getValue(metaData['00541001']),
decayCorrection: getValue(metaData['00541102']),
};
}

if (type === 'petImageModule') {
return {
frameReferenceTime: getNumberValue(metaData['00541300']),
actualFrameDuration: getNumberValue(metaData['00181242']),
};
}
}

export default metaDataProvider;
19 changes: 19 additions & 0 deletions src/imageLoader/wadouri/metaData/metaDataProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ function metaDataProvider(type, imageId) {
studyInstanceUID: dataSet.string('x0020000d'),
seriesDate: dicomParser.parseDA(dataSet.string('x00080021')),
seriesTime: dicomParser.parseTM(dataSet.string('x00080031') || ''),
acquisitionDate: dicomParser.parseDA(dataSet.string('x00080022') || ''),
acquisitionTime: dicomParser.parseTM(dataSet.string('x00080032') || ''),
};
}

Expand Down Expand Up @@ -154,6 +156,23 @@ function metaDataProvider(type, imageId) {
transferSyntaxUID: dataSet.string('x00020010'),
};
}

if (type === 'petSeriesModule') {
return {
correctedImage: dataSet.string('x00280051'),
units: dataSet.string('x00541001'),
decayCorrection: dataSet.string('x00541102'),
};
}

if (type === 'petImageModule') {
return {
frameReferenceTime: dicomParser.floatString(
dataSet.string('x00541300') || ''
),
actualFrameDuration: dicomParser.intString(dataSet.string('x00181242')),
};
}
}

export default metaDataProvider;

0 comments on commit 16e0130

Please sign in to comment.