This commit is contained in:
Masroor Ehsan 2025-01-27 11:16:53 +06:00
parent ba0c95f982
commit c81f42d915

View File

@ -1,9 +1,3 @@
/**
* SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium,
* and 2018-2024 Open Health Imaging Foundation
* SPDX-License-Identifier: MIT
*/
window.config = { window.config = {
extensions: [], extensions: [],
modes: [], modes: [],
@ -14,7 +8,7 @@ window.config = {
showStudyList: false, showStudyList: false,
investigationalUseDialog: { investigationalUseDialog: {
option: 'never', option: "never",
}, },
whiteLabeling: { whiteLabeling: {
@ -38,44 +32,50 @@ window.config = {
customizationService: { customizationService: {
cornerstoneOverlayTopLeft: { cornerstoneOverlayTopLeft: {
id: 'cornerstoneOverlayTopLeft', id: "cornerstoneOverlayTopLeft",
items: [ items: [
{ {
id: 'WindowLevel', id: "WindowLevel",
customizationType: 'ohif.overlayItem.windowLevel', customizationType: "ohif.overlayItem.windowLevel",
}, },
{ {
id: 'PatientName', id: "PatientName",
customizationType: 'ohif.overlayItem', customizationType: "ohif.overlayItem",
label: 'Pt:', label: "Pt:",
color: 'white', color: "white",
condition: ({ instance }) => condition: ({ instance }) =>
instance && instance && instance.PatientName && instance.PatientName.Alphabetic,
instance.PatientName &&
instance.PatientName.Alphabetic,
contentF: ({ instance, formatters: { formatPN } }) => { contentF: ({ instance, formatters: { formatPN } }) => {
if (instance && instance.PatientName && instance.PatientName.Alphabetic) { if (
return formatPN(instance.PatientName.Alphabetic) + ' ' + (instance.PatientSex ? '(' + instance.PatientSex + ')' : ''); instance &&
instance.PatientName &&
instance.PatientName.Alphabetic
) {
return (
formatPN(instance.PatientName.Alphabetic) +
" " +
(instance.PatientSex ? "(" + instance.PatientSex + ")" : "")
);
} else { } else {
return 'N/A'; return "N/A";
} }
}, },
}, },
{ {
id: 'PatientAge', id: "PatientAge",
customizationType: 'ohif.overlayItem', customizationType: "ohif.overlayItem",
label: 'Age:', label: "Age:",
color: 'white', color: "white",
title: "Patient's Age", title: "Patient's Age",
condition: ({ instance }) => instance && instance.PatientAge, condition: ({ instance }) => instance && instance.PatientAge,
contentF: ({ instance }) => instance.PatientAge, contentF: ({ instance }) => instance.PatientAge,
}, },
{ {
id: 'ID', id: "ID",
customizationType: 'ohif.overlayItem', customizationType: "ohif.overlayItem",
label: 'ID:', label: "ID:",
color: 'white', color: "white",
title: 'Patient PID', title: "Patient PID",
condition: ({ instance }) => instance && instance.PatientID, condition: ({ instance }) => instance && instance.PatientID,
contentF: ({ instance }) => instance.PatientID, contentF: ({ instance }) => instance.PatientID,
}, },
@ -99,7 +99,7 @@ window.config = {
prefetch: 25, prefetch: 25,
}, },
// filterQueryParam: false, // filterQueryParam: false,
httpErrorHandler: error => { httpErrorHandler: (error) => {
// This is 429 when rejected from the public idc sandbox too often. // This is 429 when rejected from the public idc sandbox too often.
if (error.status) { if (error.status) {
console.warn(error.status); console.warn(error.status);
@ -109,34 +109,34 @@ window.config = {
}, },
hotkeys: [ hotkeys: [
{ {
commandName: 'incrementActiveViewport', commandName: "incrementActiveViewport",
label: 'Next Viewport', label: "Next Viewport",
keys: ['right'], keys: ["right"],
}, },
{ {
commandName: 'decrementActiveViewport', commandName: "decrementActiveViewport",
label: 'Previous Viewport', label: "Previous Viewport",
keys: ['left'], keys: ["left"],
}, },
{ commandName: 'rotateViewportCW', label: 'Rotate Right', keys: ['r'] }, { commandName: "rotateViewportCW", label: "Rotate Right", keys: ["r"] },
{ commandName: 'rotateViewportCCW', label: 'Rotate Left', keys: ['l'] }, { commandName: "rotateViewportCCW", label: "Rotate Left", keys: ["l"] },
{ commandName: 'invertViewport', label: 'Invert', keys: ['i'] }, { commandName: "invertViewport", label: "Invert", keys: ["i"] },
{ {
commandName: 'flipViewportHorizontal', commandName: "flipViewportHorizontal",
label: 'Flip Horizontally', label: "Flip Horizontally",
keys: ['h'], keys: ["h"],
}, },
{ {
commandName: 'flipViewportVertical', commandName: "flipViewportVertical",
label: 'Flip Vertically', label: "Flip Vertically",
keys: ['v'], keys: ["v"],
}, },
{ commandName: 'scaleUpViewport', label: 'Zoom In', keys: ['+'] }, { commandName: "scaleUpViewport", label: "Zoom In", keys: ["+"] },
{ commandName: 'scaleDownViewport', label: 'Zoom Out', keys: ['-'] }, { commandName: "scaleDownViewport", label: "Zoom Out", keys: ["-"] },
{ commandName: 'fitViewportToWindow', label: 'Zoom to Fit', keys: ['='] }, { commandName: "fitViewportToWindow", label: "Zoom to Fit", keys: ["="] },
{ commandName: 'resetViewport', label: 'Reset', keys: ['space'] }, { commandName: "resetViewport", label: "Reset", keys: ["space"] },
{ commandName: 'nextImage', label: 'Next Image', keys: ['down'] }, { commandName: "nextImage", label: "Next Image", keys: ["down"] },
{ commandName: 'previousImage', label: 'Previous Image', keys: ['up'] }, { commandName: "previousImage", label: "Previous Image", keys: ["up"] },
// { // {
// commandName: 'previousViewportDisplaySet', // commandName: 'previousViewportDisplaySet',
// label: 'Previous Series', // label: 'Previous Series',
@ -148,109 +148,88 @@ window.config = {
// keys: ['pageup'], // keys: ['pageup'],
// }, // },
{ {
commandName: 'setToolActive', commandName: "setToolActive",
commandOptions: { toolName: 'Zoom' }, commandOptions: { toolName: "Zoom" },
label: 'Zoom', label: "Zoom",
keys: ['z'], keys: ["z"],
}, },
// ~ Window level presets // ~ Window level presets
{ {
commandName: 'windowLevelPreset1', commandName: "windowLevelPreset1",
label: 'W/L Preset 1', label: "W/L Preset 1",
keys: ['1'], keys: ["1"],
}, },
{ {
commandName: 'windowLevelPreset2', commandName: "windowLevelPreset2",
label: 'W/L Preset 2', label: "W/L Preset 2",
keys: ['2'], keys: ["2"],
}, },
{ {
commandName: 'windowLevelPreset3', commandName: "windowLevelPreset3",
label: 'W/L Preset 3', label: "W/L Preset 3",
keys: ['3'], keys: ["3"],
}, },
{ {
commandName: 'windowLevelPreset4', commandName: "windowLevelPreset4",
label: 'W/L Preset 4', label: "W/L Preset 4",
keys: ['4'], keys: ["4"],
}, },
{ {
commandName: 'windowLevelPreset5', commandName: "windowLevelPreset5",
label: 'W/L Preset 5', label: "W/L Preset 5",
keys: ['5'], keys: ["5"],
}, },
{ {
commandName: 'windowLevelPreset6', commandName: "windowLevelPreset6",
label: 'W/L Preset 6', label: "W/L Preset 6",
keys: ['6'], keys: ["6"],
}, },
{ {
commandName: 'windowLevelPreset7', commandName: "windowLevelPreset7",
label: 'W/L Preset 7', label: "W/L Preset 7",
keys: ['7'], keys: ["7"],
}, },
{ {
commandName: 'windowLevelPreset8', commandName: "windowLevelPreset8",
label: 'W/L Preset 8', label: "W/L Preset 8",
keys: ['8'], keys: ["8"],
}, },
{ {
commandName: 'windowLevelPreset9', commandName: "windowLevelPreset9",
label: 'W/L Preset 9', label: "W/L Preset 9",
keys: ['9'], keys: ["9"],
}, },
], ],
};
/** routerBasename: "/ohif/",
* SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium,
* and 2018-2024 Open Health Imaging Foundation
* SPDX-License-Identifier: MIT
*/
window.config.routerBasename = '/ohif/'; dataSources: [
if (true) {
window.config.dataSources = [
{ {
friendlyName: 'Orthanc DICOMweb', friendlyName: "BlackFish DICOMweb",
namespace: '@ohif/extension-default.dataSourcesModule.dicomweb', namespace: "@ohif/extension-default.dataSourcesModule.dicomweb",
sourceName: 'dicomweb', sourceName: "dicomweb",
configuration: { configuration: {
name: 'orthanc', name: "orthanc",
wadoUriRoot: '../dicom-web', wadoUriRoot: "../dicom-web",
qidoRoot: '../dicom-web', qidoRoot: "../dicom-web",
wadoRoot: '../dicom-web', wadoRoot: "../dicom-web",
qidoSupportsIncludeField: false, qidoSupportsIncludeField: false,
supportsReject: false, supportsReject: false,
imageRendering: 'wadors', imageRendering: "wadors",
thumbnailRendering: 'wadors', thumbnailRendering: "wadors",
enableStudyLazyLoad: true, enableStudyLazyLoad: true,
supportsFuzzyMatching: false, supportsFuzzyMatching: false,
supportsWildcard: true, supportsWildcard: true,
staticWado: true, staticWado: true,
singlepart: 'bulkdata,pdf,video', singlepart: "bulkdata,pdf,video",
acceptHeader: ['multipart/related; type=application/octet-stream; transfer-syntax=*'] acceptHeader: [
} "multipart/related; type=application/octet-stream; transfer-syntax=*",
} ],
];
window.config.defaultDataSourceName = 'dicomweb';
} else {
window.config.showStudyList = false;
window.config.dataSources = [
{
friendlyName: 'Orthanc DICOM JSON',
namespace: '@ohif/extension-default.dataSourcesModule.dicomjson',
sourceName: 'dicomjson',
configuration: {
name: 'json',
}, },
} },
]; ],
window.config.defaultDataSourceName = 'dicomjson'; defaultDataSourceName: "dicomweb",
} };