Instance metadata/metadata providers overhaul (#1481)
* Instance metadata plus metadata provider overhaul. Fix consumption of wado-uri urls fallbacks + datatype agnosticism. WIP DICOMify things. fix various issues with naturalized variable naming migration. Remove metadata provider. Fix consumption of multiframe images and addition of CWIL metadata. Fix strange build issues. Fix CWIL style windowWidth to array from naturalized DICOM. Fix PT, CT, CR and DX issues for cornerstone + DX issues for vtkjs. Move color palette fetching down to the natuaralized JSON level. Remove unused StudyMetadataSummary Remove redundant dicom metadata dictionary. Working local + json routes. Fix SR read. Finished first round of testing + cleaned up debugging etc. * data => metadata for instance naturalizedJSON * Update dcmjs version * Correct github isssues. * Fix erroneously replaced files. * Danny's recommended changes. * Instance metadata plus metadata provider overhaul. Fix consumption of wado-uri urls fallbacks + datatype agnosticism. WIP DICOMify things. fix various issues with naturalized variable naming migration. Remove metadata provider. Fix consumption of multiframe images and addition of CWIL metadata. Fix strange build issues. Fix CWIL style windowWidth to array from naturalized DICOM. Fix PT, CT, CR and DX issues for cornerstone + DX issues for vtkjs. Move color palette fetching down to the natuaralized JSON level. Remove unused StudyMetadataSummary Remove redundant dicom metadata dictionary. Working local + json routes. Fix SR read. Finished first round of testing + cleaned up debugging etc. * data => metadata for instance naturalizedJSON * Update dcmjs version * Correct github isssues. * Fix erroneously replaced files. * Danny's recommended changes. * Update JSON CI * Update casing of import. * Fix jump for SR. * Fix unit tests for measurements service * Fix json CI test. * fix: update yarn lock * Fix local non-encapsulated pdf view * CI updated to new sucess message. Co-authored-by: Danny <danny.ri.brown@gmail.com>
This commit is contained in:
1 parent
8833731ad3
commit
1d85f7a74e
142 files changed
+5322
-8570
No files matched your search
@@ -23,16 +23,16 @@ class Viewer extends Component {
|
||||
static propTypes = {
|
||||
studies: PropTypes.arrayOf(
|
||||
PropTypes.shape({
|
||||
studyInstanceUid: PropTypes.string.isRequired,
|
||||
studyDate: PropTypes.string,
|
||||
StudyInstanceUID: PropTypes.string.isRequired,
|
||||
StudyDate: PropTypes.string,
|
||||
displaySets: PropTypes.arrayOf(
|
||||
PropTypes.shape({
|
||||
displaySetInstanceUid: PropTypes.string.isRequired,
|
||||
seriesDescription: PropTypes.string,
|
||||
seriesNumber: PropTypes.number,
|
||||
instanceNumber: PropTypes.number,
|
||||
displaySetInstanceUID: PropTypes.string.isRequired,
|
||||
SeriesDescription: PropTypes.string,
|
||||
SeriesNumber: PropTypes.number,
|
||||
InstanceNumber: PropTypes.number,
|
||||
numImageFrames: PropTypes.number,
|
||||
modality: PropTypes.string.isRequired,
|
||||
Modality: PropTypes.string.isRequired,
|
||||
images: PropTypes.arrayOf(
|
||||
PropTypes.shape({
|
||||
getImageId: PropTypes.func.isRequired,
|
||||
@@ -42,7 +42,7 @@ class Viewer extends Component {
|
||||
),
|
||||
})
|
||||
),
|
||||
studyInstanceUids: PropTypes.array,
|
||||
studyInstanceUIDs: PropTypes.array,
|
||||
activeServer: PropTypes.shape({
|
||||
type: PropTypes.string,
|
||||
wadoRoot: PropTypes.string,
|
||||
@@ -105,12 +105,12 @@ class Viewer extends Component {
|
||||
if (this.props.studies) {
|
||||
latestDate = new Date('1000-01-01').toISOString();
|
||||
this.props.studies.forEach(study => {
|
||||
const studyDate = moment(study.studyDate, 'YYYYMMDD').toISOString();
|
||||
if (studyDate < earliestDate) {
|
||||
earliestDate = studyDate;
|
||||
const StudyDate = moment(study.StudyDate, 'YYYYMMDD').toISOString();
|
||||
if (StudyDate < earliestDate) {
|
||||
earliestDate = StudyDate;
|
||||
}
|
||||
if (studyDate > latestDate) {
|
||||
latestDate = studyDate;
|
||||
if (StudyDate > latestDate) {
|
||||
latestDate = StudyDate;
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -120,8 +120,8 @@ class Viewer extends Component {
|
||||
{
|
||||
timepointType: 'baseline',
|
||||
timepointId: 'TimepointId',
|
||||
studyInstanceUids: this.props.studyInstanceUids,
|
||||
patientId: filter.patientId,
|
||||
studyInstanceUIDs: this.props.studyInstanceUIDs,
|
||||
PatientID: filter.PatientID,
|
||||
earliestDate,
|
||||
latestDate,
|
||||
isLocked: false,
|
||||
@@ -144,7 +144,7 @@ class Viewer extends Component {
|
||||
return Promise.resolve();
|
||||
};
|
||||
|
||||
disassociateStudy = (timepointIds, studyInstanceUid) => {
|
||||
disassociateStudy = (timepointIds, StudyInstanceUID) => {
|
||||
OHIF.log.info('disassociateStudy');
|
||||
return Promise.resolve();
|
||||
};
|
||||
@@ -179,11 +179,11 @@ class Viewer extends Component {
|
||||
this.measurementApi = measurementApi;
|
||||
|
||||
if (studies) {
|
||||
const patientId = studies[0] && studies[0].patientId;
|
||||
const PatientID = studies[0] && studies[0].PatientID;
|
||||
|
||||
timepointApi.retrieveTimepoints({ patientId });
|
||||
timepointApi.retrieveTimepoints({ PatientID });
|
||||
if (isStudyLoaded) {
|
||||
this.measurementApi.retrieveMeasurements(patientId, [
|
||||
this.measurementApi.retrieveMeasurements(PatientID, [
|
||||
currentTimepointId,
|
||||
]);
|
||||
}
|
||||
@@ -201,11 +201,11 @@ class Viewer extends Component {
|
||||
});
|
||||
}
|
||||
if (isStudyLoaded && isStudyLoaded !== prevProps.isStudyLoaded) {
|
||||
const patientId = studies[0] && studies[0].patientId;
|
||||
const PatientID = studies[0] && studies[0].PatientID;
|
||||
const { currentTimepointId } = this;
|
||||
|
||||
this.timepointApi.retrieveTimepoints({ patientId });
|
||||
this.measurementApi.retrieveMeasurements(patientId, [currentTimepointId]);
|
||||
this.timepointApi.retrieveTimepoints({ PatientID });
|
||||
this.measurementApi.retrieveMeasurements(PatientID, [currentTimepointId]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -331,21 +331,21 @@ export default withDialog(Viewer);
|
||||
*/
|
||||
const _mapStudiesToThumbnails = function(studies) {
|
||||
return studies.map(study => {
|
||||
const { studyInstanceUid } = study;
|
||||
const { StudyInstanceUID } = study;
|
||||
|
||||
const thumbnails = study.displaySets.map(displaySet => {
|
||||
const {
|
||||
displaySetInstanceUid,
|
||||
seriesDescription,
|
||||
seriesNumber,
|
||||
instanceNumber,
|
||||
displaySetInstanceUID,
|
||||
SeriesDescription,
|
||||
SeriesNumber,
|
||||
InstanceNumber,
|
||||
numImageFrames,
|
||||
} = displaySet;
|
||||
|
||||
let imageId;
|
||||
let altImageText;
|
||||
|
||||
if (displaySet.modality && displaySet.modality === 'SEG') {
|
||||
if (displaySet.Modality && displaySet.Modality === 'SEG') {
|
||||
// TODO: We want to replace this with a thumbnail showing
|
||||
// the segmentation map on the image, but this is easier
|
||||
// and better than what we have right now.
|
||||
@@ -355,22 +355,22 @@ const _mapStudiesToThumbnails = function(studies) {
|
||||
|
||||
imageId = displaySet.images[imageIndex].getImageId();
|
||||
} else {
|
||||
altImageText = displaySet.modality ? displaySet.modality : 'UN';
|
||||
altImageText = displaySet.Modality ? displaySet.Modality : 'UN';
|
||||
}
|
||||
|
||||
return {
|
||||
imageId,
|
||||
altImageText,
|
||||
displaySetInstanceUid,
|
||||
seriesDescription,
|
||||
seriesNumber,
|
||||
instanceNumber,
|
||||
displaySetInstanceUID,
|
||||
SeriesDescription,
|
||||
SeriesNumber,
|
||||
InstanceNumber,
|
||||
numImageFrames,
|
||||
};
|
||||
});
|
||||
|
||||
return {
|
||||
studyInstanceUid,
|
||||
StudyInstanceUID,
|
||||
thumbnails,
|
||||
};
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user