2019-08-13 15:36:46 -04:00
|
|
|
import { MODULE_TYPES, utils } from '@ohif/core';
|
2019-04-16 12:00:06 -04:00
|
|
|
|
|
|
|
|
// TODO: Should probably use dcmjs for this
|
|
|
|
|
const SOP_CLASS_UIDS = {
|
2019-08-13 15:36:46 -04:00
|
|
|
ENCAPSULATED_PDF: '1.2.840.10008.5.1.4.1.1.104.1',
|
2019-04-16 12:00:06 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const OHIFDicomPDFSopClassHandler = {
|
|
|
|
|
id: 'OHIFDicomPDFSopClassHandlerPlugin',
|
2019-06-12 16:09:35 -04:00
|
|
|
type: MODULE_TYPES.SOP_CLASS_HANDLER,
|
|
|
|
|
sopClassUids: [SOP_CLASS_UIDS.ENCAPSULATED_PDF],
|
2019-04-16 12:00:06 -04:00
|
|
|
getDisplaySetFromSeries(series, study, dicomWebClient, authorizationHeaders) {
|
|
|
|
|
const instance = series.getFirstInstance();
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
plugin: 'pdf',
|
2019-07-19 17:54:25 +02:00
|
|
|
modality: 'DOC',
|
2019-04-16 12:00:06 -04:00
|
|
|
displaySetInstanceUid: utils.guid(),
|
|
|
|
|
wadoRoot: study.getData().wadoRoot,
|
|
|
|
|
wadoUri: instance.getData().wadouri,
|
|
|
|
|
sopInstanceUid: instance.getSOPInstanceUID(),
|
|
|
|
|
seriesInstanceUid: series.getSeriesInstanceUID(),
|
|
|
|
|
studyInstanceUid: study.getStudyInstanceUID(),
|
2019-08-13 15:36:46 -04:00
|
|
|
authorizationHeaders: authorizationHeaders,
|
2019-04-16 12:00:06 -04:00
|
|
|
};
|
2019-08-13 15:36:46 -04:00
|
|
|
},
|
2019-06-12 16:09:35 -04:00
|
|
|
};
|
2019-04-16 12:00:06 -04:00
|
|
|
|
|
|
|
|
export default OHIFDicomPDFSopClassHandler;
|