2019-08-13 15:36:46 -04:00
|
|
|
import OHIF from '@ohif/core';
|
2019-04-16 12:00:06 -04:00
|
|
|
|
|
|
|
|
const { utils } = OHIF;
|
|
|
|
|
|
|
|
|
|
const SOP_CLASS_UIDS = {
|
2019-06-20 23:22:52 -04:00
|
|
|
VL_WHOLE_SLIDE_MICROSCOPY_IMAGE_STORAGE: '1.2.840.10008.5.1.4.1.1.77.1.6',
|
2019-04-16 12:00:06 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const DicomMicroscopySopClassHandler = {
|
|
|
|
|
id: 'DicomMicroscopySopClassHandlerPlugin',
|
2020-03-09 19:03:23 +00:00
|
|
|
sopClassUIDs: [SOP_CLASS_UIDS.VL_WHOLE_SLIDE_MICROSCOPY_IMAGE_STORAGE],
|
2019-04-16 12:00:06 -04:00
|
|
|
getDisplaySetFromSeries(series, study, dicomWebClient) {
|
|
|
|
|
const instance = series.getFirstInstance();
|
|
|
|
|
|
2020-09-10 12:13:24 +02:00
|
|
|
const metadata = instance.getData().metadata;
|
2020-08-28 17:51:08 +02:00
|
|
|
const {
|
2020-09-10 12:13:24 +02:00
|
|
|
SeriesDescription,
|
|
|
|
|
SeriesNumber,
|
2020-08-28 17:51:08 +02:00
|
|
|
ContentDate,
|
|
|
|
|
ContentTime,
|
2020-09-10 12:13:24 +02:00
|
|
|
} = metadata;
|
2020-08-28 17:51:08 +02:00
|
|
|
|
2019-04-16 12:00:06 -04:00
|
|
|
// Note: We are passing the dicomweb client into each viewport!
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
plugin: 'microscopy',
|
2020-03-09 19:03:23 +00:00
|
|
|
Modality: 'SM',
|
|
|
|
|
displaySetInstanceUID: utils.guid(),
|
2019-04-16 12:00:06 -04:00
|
|
|
dicomWebClient,
|
2020-03-09 19:03:23 +00:00
|
|
|
SOPInstanceUID: instance.getSOPInstanceUID(),
|
|
|
|
|
SeriesInstanceUID: series.getSeriesInstanceUID(),
|
|
|
|
|
StudyInstanceUID: study.getStudyInstanceUID(),
|
2020-09-10 12:13:24 +02:00
|
|
|
SeriesDescription,
|
2020-08-28 17:51:08 +02:00
|
|
|
SeriesDate: ContentDate, // Map ContentDate/Time to SeriesTime for series list sorting.
|
|
|
|
|
SeriesTime: ContentTime,
|
|
|
|
|
SeriesNumber,
|
2020-09-10 12:13:24 +02:00
|
|
|
metadata,
|
2019-04-16 12:00:06 -04:00
|
|
|
};
|
2019-06-20 23:22:52 -04:00
|
|
|
},
|
2019-04-16 12:00:06 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default DicomMicroscopySopClassHandler;
|