2024-05-24 12:21:09 -04:00
/** @type {AppTypes.Config} */
2024-06-20 16:58:59 -04:00
window . config = {
2019-04-29 13:29:37 -04:00
routerBasename : '/' ,
2023-02-03 23:28:05 +08:00
// whiteLabeling: {},
2020-05-12 21:41:11 +02:00
extensions : [],
2020-05-07 11:53:13 -03:00
modes : [],
2023-09-22 10:23:44 -04:00
customizationService : {},
2019-07-08 16:29:59 -03:00
showStudyList : true ,
2023-02-03 09:33:28 -05:00
// some windows systems have issues with more than 3 web workers
maxNumberOfWebWorkers : 3 ,
2022-11-04 09:01:34 -04:00
// below flag is for performance reasons, but it might not work for all servers
2023-02-17 15:04:07 -05:00
showWarningMessageForCrossOrigin : true ,
showCPUFallbackMessage : true ,
2022-11-16 14:19:52 -05:00
showLoadingIndicator : true ,
2024-06-21 10:04:02 -04:00
experimentalStudyBrowserSort : false ,
2023-03-31 23:21:16 -03:00
strictZSpacingForVolumeViewport : true ,
2024-03-18 20:27:12 -04:00
groupEnabledModesFirst : true ,
2022-07-27 16:39:04 +00:00
maxNumRequests : {
interaction : 100 ,
thumbnail : 75 ,
2023-03-29 09:40:22 -04:00
// Prefetch number is dependent on the http protocol. For http 2 or
// above, the number of requests can be go a lot higher.
prefetch : 25 ,
2022-07-27 16:39:04 +00:00
},
2020-05-07 10:58:02 -03:00
// filterQueryParam: false,
2023-05-08 15:49:28 -04:00
defaultDataSourceName : 'dicomweb' ,
2023-05-16 00:22:48 +05:30
/* Dynamic config allows user to pass "configUrl" query string this allows to load config without recompiling application. The regex will ensure valid configuration source */
// dangerouslyUseDynamicConfig: {
// enabled: true,
// // regex will ensure valid configuration source and default is /.*/ which matches any character. To use this, setup your own regex to choose a specific source of configuration only.
// // Example 1, to allow numbers and letters in an absolute or sub-path only.
// // regex: /(0-9A-Za-z.]+)(\/[0-9A-Za-z.]+)*/
// // Example 2, to restricts to either hosptial.com or othersite.com.
// // regex: /(https:\/\/hospital.com(\/[0-9A-Za-z.]+)*)|(https:\/\/othersite.com(\/[0-9A-Za-z.]+)*)/
// regex: /.*/,
// },
2020-05-07 10:58:02 -03:00
dataSources : [
{
2022-04-06 13:28:42 -04:00
namespace : '@ohif/extension-default.dataSourcesModule.dicomweb' ,
2020-05-11 18:56:46 +02:00
sourceName : 'dicomweb' ,
2020-05-07 10:58:02 -03:00
configuration : {
2023-09-21 07:30:01 -04:00
friendlyName : 'AWS S3 Static wado server' ,
2022-11-16 14:19:52 -05:00
name : 'aws' ,
2024-09-19 00:23:28 -04:00
wadoUriRoot : 'https://d14fa38qiwhyfd.cloudfront.net/dicomweb' ,
qidoRoot : 'https://d14fa38qiwhyfd.cloudfront.net/dicomweb' ,
wadoRoot : 'https://d14fa38qiwhyfd.cloudfront.net/dicomweb' ,
2022-11-16 14:19:52 -05:00
qidoSupportsIncludeField : false ,
2019-04-29 13:29:37 -04:00
imageRendering : 'wadors' ,
thumbnailRendering : 'wadors' ,
2019-10-03 04:51:29 -03:00
enableStudyLazyLoad : true ,
2022-11-16 14:19:52 -05:00
supportsFuzzyMatching : false ,
2020-08-19 21:27:34 +02:00
supportsWildcard : true ,
2022-11-16 14:19:52 -05:00
staticWado : true ,
2023-05-29 09:04:49 -04:00
singlepart : 'bulkdata,video' ,
// whether the data source should use retrieveBulkData to grab metadata,
// and in case of relative path, what would it be relative to, options
// are in the series level or study level (some servers like series some study)
bulkDataURI : {
enabled : true ,
relativeResolution : 'studies' ,
2024-08-15 14:36:53 -04:00
transform : url => url . replace ( '/pixeldata.mp4' , '/rendered' ),
2023-09-21 07:30:01 -04:00
},
omitQuotationForMultipartRequest : true ,
},
},
2024-06-17 22:36:03 -04:00
2023-09-21 07:30:01 -04:00
{
namespace : '@ohif/extension-default.dataSourcesModule.dicomweb' ,
2024-06-17 22:36:03 -04:00
sourceName : 'ohif2' ,
2023-09-21 07:30:01 -04:00
configuration : {
friendlyName : 'AWS S3 Static wado secondary server' ,
name : 'aws' ,
2024-09-19 00:23:28 -04:00
wadoUriRoot : 'https://dd14fa38qiwhyfd.cloudfront.net/dicomweb' ,
qidoRoot : 'https://dd14fa38qiwhyfd.cloudfront.net/dicomweb' ,
wadoRoot : 'https://dd14fa38qiwhyfd.cloudfront.net/dicomweb' ,
2023-09-21 07:30:01 -04:00
qidoSupportsIncludeField : false ,
supportsReject : false ,
imageRendering : 'wadors' ,
thumbnailRendering : 'wadors' ,
enableStudyLazyLoad : true ,
supportsFuzzyMatching : false ,
supportsWildcard : true ,
staticWado : true ,
singlepart : 'bulkdata,video' ,
// whether the data source should use retrieveBulkData to grab metadata,
// and in case of relative path, what would it be relative to, options
// are in the series level or study level (some servers like series some study)
bulkDataURI : {
enabled : true ,
relativeResolution : 'studies' ,
2023-05-29 09:04:49 -04:00
},
2023-06-22 21:26:26 +02:00
omitQuotationForMultipartRequest : true ,
2019-04-29 13:29:37 -04:00
},
2020-02-20 18:25:26 -03:00
},
2024-06-17 22:36:03 -04:00
{
namespace : '@ohif/extension-default.dataSourcesModule.dicomweb' ,
sourceName : 'ohif3' ,
configuration : {
friendlyName : 'AWS S3 Static wado secondary server' ,
name : 'aws' ,
wadoUriRoot : 'https://d3t6nz73ql33tx.cloudfront.net/dicomweb' ,
qidoRoot : 'https://d3t6nz73ql33tx.cloudfront.net/dicomweb' ,
wadoRoot : 'https://d3t6nz73ql33tx.cloudfront.net/dicomweb' ,
qidoSupportsIncludeField : false ,
supportsReject : false ,
imageRendering : 'wadors' ,
thumbnailRendering : 'wadors' ,
enableStudyLazyLoad : true ,
supportsFuzzyMatching : false ,
supportsWildcard : true ,
staticWado : true ,
singlepart : 'bulkdata,video' ,
// whether the data source should use retrieveBulkData to grab metadata,
// and in case of relative path, what would it be relative to, options
// are in the series level or study level (some servers like series some study)
bulkDataURI : {
enabled : true ,
relativeResolution : 'studies' ,
},
omitQuotationForMultipartRequest : true ,
},
},
{
namespace : '@ohif/extension-default.dataSourcesModule.dicomweb' ,
sourceName : 'local5000' ,
configuration : {
friendlyName : 'Static WADO Local Data' ,
name : 'DCM4CHEE' ,
qidoRoot : 'http://localhost:5000/dicomweb' ,
wadoRoot : 'http://localhost:5000/dicomweb' ,
qidoSupportsIncludeField : false ,
supportsReject : true ,
supportsStow : true ,
imageRendering : 'wadors' ,
thumbnailRendering : 'wadors' ,
enableStudyLazyLoad : true ,
supportsFuzzyMatching : false ,
supportsWildcard : true ,
staticWado : true ,
singlepart : 'video' ,
bulkDataURI : {
enabled : true ,
relativeResolution : 'studies' ,
},
},
},
2023-05-01 12:58:53 -04:00
{
namespace : '@ohif/extension-default.dataSourcesModule.dicomwebproxy' ,
sourceName : 'dicomwebproxy' ,
configuration : {
2023-07-20 11:43:05 -04:00
friendlyName : 'dicomweb delegating proxy' ,
2023-05-01 12:58:53 -04:00
name : 'dicomwebproxy' ,
},
},
2021-06-15 10:19:45 -04:00
{
2022-04-06 13:28:42 -04:00
namespace : '@ohif/extension-default.dataSourcesModule.dicomjson' ,
2021-06-15 10:19:45 -04:00
sourceName : 'dicomjson' ,
configuration : {
2023-07-20 11:43:05 -04:00
friendlyName : 'dicom json' ,
2021-06-15 10:19:45 -04:00
name : 'json' ,
},
},
{
2022-04-06 13:28:42 -04:00
namespace : '@ohif/extension-default.dataSourcesModule.dicomlocal' ,
2021-06-15 10:19:45 -04:00
sourceName : 'dicomlocal' ,
2023-07-20 11:43:05 -04:00
configuration : {
friendlyName : 'dicom local' ,
},
2021-06-15 10:19:45 -04:00
},
2019-06-08 21:23:00 -04:00
],
2021-06-24 12:30:38 -04:00
httpErrorHandler : error => {
// This is 429 when rejected from the public idc sandbox too often.
console . warn ( error . status );
// Could use services manager here to bring up a dialog/modal if needed.
console . warn ( 'test, navigate to https://ohif.org/' );
},
2021-05-28 14:32:48 -04:00
// whiteLabeling: {
// /* Optional: Should return a React component to be rendered in the "Logo" section of the application's Top Navigation bar */
// createLogoComponentFn: function (React) {
// return React.createElement(
// 'a',
// {
// target: '_self',
// rel: 'noopener noreferrer',
// className: 'text-purple-600 line-through',
// href: '/',
// },
// React.createElement('img',
// {
2023-05-08 15:49:28 -04:00
// src: './assets/customLogo.svg',
2021-05-28 14:32:48 -04:00
// className: 'w-8 h-8',
// }
// ))
// },
// },
2021-07-29 21:57:58 +02:00
hotkeys : [
{
commandName : 'incrementActiveViewport' ,
label : 'Next Viewport' ,
keys : [ 'right' ],
},
{
commandName : 'decrementActiveViewport' ,
label : 'Previous Viewport' ,
keys : [ 'left' ],
},
{ commandName : 'rotateViewportCW' , label : 'Rotate Right' , keys : [ 'r' ] },
{ commandName : 'rotateViewportCCW' , label : 'Rotate Left' , keys : [ 'l' ] },
{ commandName : 'invertViewport' , label : 'Invert' , keys : [ 'i' ] },
{
2022-07-27 16:39:04 +00:00
commandName : 'flipViewportHorizontal' ,
2021-07-29 21:57:58 +02:00
label : 'Flip Horizontally' ,
keys : [ 'h' ],
},
{
2022-07-27 16:39:04 +00:00
commandName : 'flipViewportVertical' ,
2021-07-29 21:57:58 +02:00
label : 'Flip Vertically' ,
keys : [ 'v' ],
},
{ commandName : 'scaleUpViewport' , label : 'Zoom In' , keys : [ '+' ] },
{ commandName : 'scaleDownViewport' , label : 'Zoom Out' , keys : [ '-' ] },
{ commandName : 'fitViewportToWindow' , label : 'Zoom to Fit' , keys : [ '=' ] },
{ commandName : 'resetViewport' , label : 'Reset' , keys : [ 'space' ] },
{ commandName : 'nextImage' , label : 'Next Image' , keys : [ 'down' ] },
{ commandName : 'previousImage' , label : 'Previous Image' , keys : [ 'up' ] },
2022-09-08 22:02:20 -04:00
// {
// commandName: 'previousViewportDisplaySet',
// label: 'Previous Series',
// keys: ['pagedown'],
// },
// {
// commandName: 'nextViewportDisplaySet',
// label: 'Next Series',
// keys: ['pageup'],
// },
{
commandName : 'setToolActive' ,
commandOptions : { toolName : 'Zoom' },
label : 'Zoom' ,
keys : [ 'z' ],
2021-07-29 21:57:58 +02:00
},
// ~ Window level presets
{
commandName : 'windowLevelPreset1' ,
label : 'W/L Preset 1' ,
keys : [ '1' ],
},
{
commandName : 'windowLevelPreset2' ,
label : 'W/L Preset 2' ,
keys : [ '2' ],
},
{
commandName : 'windowLevelPreset3' ,
label : 'W/L Preset 3' ,
keys : [ '3' ],
},
{
commandName : 'windowLevelPreset4' ,
label : 'W/L Preset 4' ,
keys : [ '4' ],
},
{
commandName : 'windowLevelPreset5' ,
label : 'W/L Preset 5' ,
keys : [ '5' ],
},
{
commandName : 'windowLevelPreset6' ,
label : 'W/L Preset 6' ,
keys : [ '6' ],
},
{
commandName : 'windowLevelPreset7' ,
label : 'W/L Preset 7' ,
keys : [ '7' ],
},
{
commandName : 'windowLevelPreset8' ,
label : 'W/L Preset 8' ,
keys : [ '8' ],
},
{
commandName : 'windowLevelPreset9' ,
label : 'W/L Preset 9' ,
keys : [ '9' ],
},
],
2024-09-22 20:41:12 -04:00
tours : [
{
id : 'basicViewerTour' ,
route : '/viewer' ,
steps : [
{
id : 'scroll' ,
2024-10-04 08:27:40 -04:00
title : 'Scrolling Through Images' ,
2024-09-27 12:58:39 -04:00
text : 'You can scroll through the images using the mouse wheel or scrollbar.' ,
2024-09-22 20:41:12 -04:00
attachTo : {
2024-09-27 16:14:14 -04:00
element : '.viewport-element' ,
on : 'top' ,
2024-09-22 20:41:12 -04:00
},
2024-09-27 12:58:39 -04:00
advanceOn : {
selector : '.cornerstone-viewport-element' ,
2024-09-27 12:58:48 -04:00
event : 'CORNERSTONE_TOOLS_MOUSE_WHEEL' ,
2024-09-27 12:58:39 -04:00
},
2024-09-27 16:27:23 -04:00
beforeShowPromise : () => waitForElement ( '.viewport-element' ),
2024-10-04 08:27:40 -04:00
},
{
id : 'zoom' ,
title : 'Zooming In and Out' ,
text : 'You can zoom the images using the right click.' ,
attachTo : {
element : '.viewport-element' ,
2024-10-04 12:27:43 -04:00
on : 'left' ,
2024-10-04 08:27:40 -04:00
},
2024-09-27 12:58:39 -04:00
advanceOn : {
selector : '.cornerstone-viewport-element' ,
2024-09-27 15:44:01 -04:00
event : 'CORNERSTONE_TOOLS_MOUSE_UP' ,
2024-09-27 12:58:39 -04:00
},
2024-09-27 16:27:23 -04:00
beforeShowPromise : () => waitForElement ( '.viewport-element' ),
2024-09-22 20:41:12 -04:00
},
{
id : 'pan' ,
2024-10-04 08:27:40 -04:00
title : 'Panning the Image' ,
2024-09-22 20:41:12 -04:00
text : 'You can pan the images using the middle click.' ,
attachTo : {
element : '.viewport-element' ,
2024-09-27 16:14:14 -04:00
on : 'top' ,
2024-09-22 20:41:12 -04:00
},
2024-09-27 12:58:39 -04:00
advanceOn : {
selector : '.cornerstone-viewport-element' ,
2024-09-27 15:44:01 -04:00
event : 'CORNERSTONE_TOOLS_MOUSE_UP' ,
2024-09-27 12:58:39 -04:00
},
2024-09-27 16:27:23 -04:00
beforeShowPromise : () => waitForElement ( '.viewport-element' ),
2024-09-22 20:41:12 -04:00
},
{
id : 'windowing' ,
2024-10-04 08:27:40 -04:00
title : 'Adjusting Window Level' ,
2024-09-22 20:41:12 -04:00
text : 'You can modify the window level using the left click.' ,
attachTo : {
element : '.viewport-element' ,
2024-10-04 12:27:43 -04:00
on : 'left' ,
2024-09-22 20:41:12 -04:00
},
2024-09-27 15:44:01 -04:00
advanceOn : {
selector : '.cornerstone-viewport-element' ,
event : 'CORNERSTONE_TOOLS_MOUSE_UP' ,
},
2024-09-27 16:27:23 -04:00
beforeShowPromise : () => waitForElement ( '.viewport-element' ),
2024-09-22 20:41:12 -04:00
},
{
id : 'length' ,
2024-10-04 08:27:40 -04:00
title : 'Using the Measurement Tools' ,
2024-09-22 20:41:12 -04:00
text : 'You can measure the length of a region using the Length tool.' ,
attachTo : {
2024-09-27 12:58:39 -04:00
element : '[data-cy="MeasurementTools-split-button-primary"]' ,
2024-09-22 20:41:12 -04:00
on : 'bottom' ,
},
2024-09-27 15:44:01 -04:00
advanceOn : {
selector : '[data-cy="MeasurementTools-split-button-primary"]' ,
event : 'click' ,
},
2024-09-27 16:27:23 -04:00
beforeShowPromise : () =>
waitForElement ( '[data-cy="MeasurementTools-split-button-primary]' ),
2024-09-22 20:41:12 -04:00
},
{
id : 'drawAnnotation' ,
2024-10-04 08:27:40 -04:00
title : 'Drawing Length Annotations' ,
2024-09-22 20:41:12 -04:00
text : 'Use the length tool on the viewport to measure the length of a region.' ,
attachTo : {
element : '.viewport-element' ,
2024-10-04 12:27:43 -04:00
on : 'right' ,
2024-09-22 20:41:12 -04:00
},
2024-09-27 15:44:01 -04:00
advanceOn : {
selector : 'body' ,
event : 'event::measurement_added' ,
},
2024-09-27 16:27:23 -04:00
beforeShowPromise : () => waitForElement ( '.viewport-element' ),
2024-09-22 20:41:12 -04:00
},
{
id : 'trackMeasurement' ,
2024-10-04 08:27:40 -04:00
title : 'Tracking Measurements in the Panel' ,
2024-09-22 20:41:12 -04:00
text : 'Click yes to track the measurements in the measurement panel.' ,
attachTo : {
element : '[data-cy="prompt-begin-tracking-yes-btn"]' ,
on : 'bottom' ,
},
2024-09-27 15:44:01 -04:00
advanceOn : {
selector : '[data-cy="prompt-begin-tracking-yes-btn"]' ,
event : 'click' ,
},
2024-09-27 16:38:07 -04:00
beforeShowPromise : () => waitForElement ( '[data-cy="prompt-begin-tracking-yes-btn"]' ),
2024-09-22 20:41:12 -04:00
},
{
id : 'openMeasurementPanel' ,
2024-10-04 08:27:40 -04:00
title : 'Opening the Measurements Panel' ,
2024-09-22 20:41:12 -04:00
text : 'Click the measurements button to open the measurements panel.' ,
attachTo : {
element : '#trackedMeasurements-btn' ,
on : 'left-start' ,
},
2024-09-27 15:44:01 -04:00
advanceOn : {
selector : '#trackedMeasurements-btn' ,
event : 'click' ,
},
2024-09-27 16:27:23 -04:00
beforeShowPromise : () => waitForElement ( '#trackedMeasurements-btn' ),
2024-09-22 20:41:12 -04:00
},
{
id : 'scrollAwayFromMeasurement' ,
2024-10-04 08:27:40 -04:00
title : 'Scrolling Away from a Measurement' ,
2024-09-22 20:41:12 -04:00
text : 'Scroll the images using the mouse wheel away from the measurement.' ,
attachTo : {
2024-09-27 16:14:14 -04:00
element : '.viewport-element' ,
2024-10-04 12:27:43 -04:00
on : 'left' ,
2024-09-22 20:41:12 -04:00
},
2024-09-27 15:44:01 -04:00
advanceOn : {
selector : '.cornerstone-viewport-element' ,
event : 'CORNERSTONE_TOOLS_MOUSE_WHEEL' ,
},
2024-09-27 16:27:23 -04:00
beforeShowPromise : () => waitForElement ( '.viewport-element' ),
2024-09-22 20:41:12 -04:00
},
{
id : 'jumpToMeasurement' ,
2024-10-04 08:27:40 -04:00
title : 'Jumping to Measurements in the Panel' ,
2024-09-22 20:41:12 -04:00
text : 'Click the measurement in the measurement panel to jump to it.' ,
attachTo : {
2024-11-06 07:15:27 -05:00
element : '[data-cy="data-row"]' ,
2024-09-22 20:41:12 -04:00
on : 'left-start' ,
},
2024-09-27 15:44:01 -04:00
advanceOn : {
2024-11-06 07:15:27 -05:00
selector : '[data-cy="data-row"]' ,
2024-09-27 15:44:01 -04:00
event : 'click' ,
},
2024-11-06 07:15:27 -05:00
beforeShowPromise : () => waitForElement ( '[data-cy="data-row"]' ),
2024-09-22 20:41:12 -04:00
},
{
id : 'changeLayout' ,
2024-10-04 08:27:40 -04:00
title : 'Changing Layout' ,
2024-09-22 20:41:12 -04:00
text : 'You can change the layout of the viewer using the layout button.' ,
attachTo : {
element : '[data-cy="Layout"]' ,
on : 'bottom' ,
},
2024-09-27 15:44:01 -04:00
advanceOn : {
selector : '[data-cy="Layout"]' ,
event : 'click' ,
},
2024-09-27 16:27:23 -04:00
beforeShowPromise : () => waitForElement ( '[data-cy="Layout"]' ),
2024-09-22 20:41:12 -04:00
},
{
id : 'selectLayout' ,
2024-10-04 08:27:40 -04:00
title : 'Selecting the MPR Layout' ,
2024-09-22 20:41:12 -04:00
text : 'Select the MPR layout to view the images in MPR mode.' ,
attachTo : {
element : '[data-cy="MPR"]' ,
on : 'left-start' ,
},
2024-09-27 15:44:01 -04:00
advanceOn : {
selector : '[data-cy="MPR"]' ,
event : 'click' ,
},
2024-09-27 16:27:23 -04:00
beforeShowPromise : () => waitForElement ( '[data-cy="MPR"]' ),
2024-09-22 20:41:12 -04:00
},
],
2024-09-27 16:14:14 -04:00
tourOptions : {
useModalOverlay : true ,
2024-10-04 10:03:20 -04:00
defaultStepOptions : {
buttons : [
{
text : 'Skip all' ,
action () {
this . complete ();
},
secondary : true ,
},
],
},
2024-09-27 16:14:14 -04:00
},
2024-09-22 20:41:12 -04:00
},
],
2019-06-02 15:44:01 -04:00
};
2024-10-04 12:16:56 -04:00
function waitForElement ( selector , maxAttempts = 20 , interval = 25 ) {
return new Promise ( resolve => {
let attempts = 0 ;
const checkForElement = setInterval (() => {
const element = document . querySelector ( selector );
if ( element || attempts >= maxAttempts ) {
clearInterval ( checkForElement );
resolve ();
}
attempts ++ ;
}, interval );
});
}