ohif-viewer/Packages-react/extensions/OHIFDicomPDFExtension/src/OHIFDicomPDFSopClassHandler.js
Sandra b93a677ef3 Refactor extensions interface (#344)
* Added container class for plugins that care for registration of submodules

* Added extensions manager that cares for adding modules to store

* Make extensions require less knowledge of internal extension management

* Reformatting

* Update generateStaticSite to use ohif-viewer, remove old OHIFViewer-react folder

* Add yarn.lock so Netlify knows to use Yarn

* Fix for copying static site folder

* Try to fix netlify build which is stuck uploading

* Try to fix static site deployment

* Try to fix static site deployment again

* Try to fix static site deployment one more time

* Extracted pdf plugin into external package

* Removed some unused dependencies

* Published pdf extension to npm registry

* Added external microscopy extension (work in progress)

* Extraction of microscopy plugin working now

* Added microscopy extension npm package to package.json

* Increase ohif-core version

* update yarn.lock

* Fix error in readme

* Fix authentication error in pdf plugin

* Remove readme, update packages, add redirect for netlify

* netlify test

* netlify test 2

* netlify test 2, forgot to add new redirects file

* Use public dicom server for demo

* Another netlify try

* Another netlify try 2

* Another netlify try 3

* Another netlify try 4
2019-02-02 11:10:56 +00:00

35 lines
978 B
JavaScript

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'
};
const OHIFDicomPDFSopClassHandler = {
id: 'OHIFDicomPDFSopClassHandlerPlugin',
type: PLUGIN_TYPES.SOP_CLASS_HANDLER,
sopClassUids: [
SOP_CLASS_UIDS.ENCAPSULATED_PDF
],
getDisplaySetFromSeries(series, study, dicomWebClient, authorizationHeaders) {
debugger;
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
};
}
}
export default OHIFDicomPDFSopClassHandler;