2019-01-30 10:34:55 +01:00
|
|
|
import OHIF from "ohif-core";
|
|
|
|
|
|
|
|
|
|
const { plugins, utils } = OHIF;
|
|
|
|
|
const { PLUGIN_TYPES } = plugins;
|
|
|
|
|
|
|
|
|
|
// TODO: Should probably use dcmjs for this
|
|
|
|
|
const SOP_CLASS_UIDS = {
|
|
|
|
|
ENCAPSULATED_PDF: '1.2.840.10008.5.1.4.1.1.104.1'
|
|
|
|
|
};
|
|
|
|
|
|
2019-02-02 12:10:56 +01:00
|
|
|
const OHIFDicomPDFSopClassHandler = {
|
2019-01-30 10:34:55 +01:00
|
|
|
id: 'OHIFDicomPDFSopClassHandlerPlugin',
|
|
|
|
|
type: PLUGIN_TYPES.SOP_CLASS_HANDLER,
|
|
|
|
|
sopClassUids: [
|
|
|
|
|
SOP_CLASS_UIDS.ENCAPSULATED_PDF
|
|
|
|
|
],
|
2019-02-02 12:10:56 +01:00
|
|
|
getDisplaySetFromSeries(series, study, dicomWebClient, authorizationHeaders) {
|
|
|
|
|
debugger;
|
2019-01-30 10:34:55 +01:00
|
|
|
const instance = series.getFirstInstance();
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
plugin: 'pdf',
|
|
|
|
|
displaySetInstanceUid: utils.guid(),
|
|
|
|
|
wadoRoot: study.getData().wadoRoot,
|
|
|
|
|
wadoUri: instance.getData().wadouri,
|
|
|
|
|
sopInstanceUid: instance.getSOPInstanceUID(),
|
|
|
|
|
seriesInstanceUid: series.getSeriesInstanceUID(),
|
2019-02-02 12:10:56 +01:00
|
|
|
studyInstanceUid: study.getStudyInstanceUID(),
|
|
|
|
|
authorizationHeaders: authorizationHeaders
|
2019-01-30 10:34:55 +01:00
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-02-02 12:10:56 +01:00
|
|
|
export default OHIFDicomPDFSopClassHandler;
|