Files
ohif-viewer/extensions/dicom-html/src/OHIFDicomHtmlSopClassHandler.js
T

38 lines
1.3 KiB
JavaScript
Raw Normal View History

2019-08-06 23:56:44 -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-06 23:56:44 -04:00
BASIC_TEXT_SR: "1.2.840.10008.5.1.4.1.1.88.11",
ENHANCED_SR: "1.2.840.10008.5.1.4.1.1.88.22",
COMPREHENSIVE_SR: "1.2.840.10008.5.1.4.1.1.88.33",
PROCEDURE_LOG_STORAGE: "1.2.840.10008.5.1.4.1.1.88.40",
MAMMOGRAPHY_CAD_SR: "1.2.840.10008.5.1.4.1.1.88.50",
CHEST_CAD_SR: "1.2.840.10008.5.1.4.1.1.88.65",
X_RAY_RADIATION_DOSE_SR: "1.2.840.10008.5.1.4.1.1.88.67"
2019-04-16 12:00:06 -04:00
};
const sopClassUids = Object.values(SOP_CLASS_UIDS);
// TODO: Handle the case where there is more than one SOP Class Handler for the
// same SOP Class
const OHIFDicomHtmlSopClassHandler = {
2019-08-06 23:56:44 -04:00
id: "OHIFDicomHtmlSopClassHandler",
2019-06-12 16:09:35 -04:00
type: MODULE_TYPES.SOP_CLASS_HANDLER,
2019-04-16 12:00:06 -04:00
sopClassUids,
getDisplaySetFromSeries(series, study, dicomWebClient, authorizationHeaders) {
const instance = series.getFirstInstance();
return {
2019-08-06 23:56:44 -04:00
plugin: "html",
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(),
authorizationHeaders
};
}
};
export default OHIFDicomHtmlSopClassHandler;