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