Skip to content

Commit

Permalink
changes to support Gen3 and MIDRC environment
Browse files Browse the repository at this point in the history
Co-authored-by: Fantix King <[email protected]>
Co-authored-by: Pauline Ribeyre <[email protected]>
Co-authored-by: Hara Prasad <[email protected]>
Co-authored-by: rnerella92 <[email protected]>
Co-authored-by: Andrew Prokhorenkov <[email protected]>
Co-authored-by: cmlsn <[email protected]>
  • Loading branch information
6 people committed Apr 26, 2023
1 parent 238a30c commit 071cea6
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 29 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ RUN yarn install --verbose

ENV PATH /usr/src/app/node_modules/.bin:$PATH
ENV QUICK_BUILD true
ENV PUBLIC_URL /dicom-viewer/
# ENV GENERATE_SOURCEMAP=false
# ENV REACT_APP_CONFIG=config/default.js

Expand Down
4 changes: 2 additions & 2 deletions extensions/cornerstone/src/toolbarModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ const definitions = [
commandName: 'setToolActive',
commandOptions: { toolName: 'Bidirectional' },
},
{
/*{
id: 'Download',
label: 'Download',
icon: 'create-screen-capture',
Expand All @@ -225,7 +225,7 @@ const definitions = [
behavior: TOOLBAR_BUTTON_BEHAVIORS.DOWNLOAD_SCREEN_SHOT,
togglable: true,
},
},
},*/
],
},
{
Expand Down
8 changes: 4 additions & 4 deletions platform/viewer/public/assets/browserconfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="/assets/mstile-70x70.png"/>
<square150x150logo src="/assets/mstile-150x150.png"/>
<wide310x150logo src="/assets/mstile-310x150.png"/>
<square310x310logo src="/assets/mstile-310x310.png"/>
<square70x70logo src="/dicom-viewer/assets/mstile-70x70.png"/>
<square150x150logo src="/dicom-viewer/assets/mstile-150x150.png"/>
<wide310x150logo src="/dicom-viewer/assets/mstile-310x150.png"/>
<square310x310logo src="/dicom-viewer/assets/mstile-310x310.png"/>
<TileColor>#fff</TileColor>
</tile>
</msapplication>
Expand Down
Binary file modified platform/viewer/public/assets/favicon.ico
Binary file not shown.
6 changes: 3 additions & 3 deletions platform/viewer/public/assets/manifest.webapp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"name": "OHIF Viewer",
"description": "OHIF Viewer",
"icons": {
"60": "/assets/firefox_app_60x60.png",
"128": "/assets/firefox_app_128x128.png",
"512": "/assets/firefox_app_512x512.png"
"60": "/dicom-viewer/assets/firefox_app_60x60.png",
"128": "/dicom-viewer/assets/firefox_app_128x128.png",
"512": "/dicom-viewer/assets/firefox_app_512x512.png"
},
"developer": {
"name": "OHIF Contributors",
Expand Down
Binary file added platform/viewer/public/assets/midrc-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion platform/viewer/public/assets/yandex-browser-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"version": "2.2.1",
"api_version": 1,
"layout": {
"logo": "/assets/yandex-browser-50x50.png",
"logo": "/dicom-viewer/assets/yandex-browser-50x50.png",
"color": "#fff",
"show_title": true
}
Expand Down
37 changes: 30 additions & 7 deletions platform/viewer/public/config/default.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
window.config = {
// default: '/'
routerBasename: '/',
routerBasename: '/dicom-viewer/',
extensions: [],
showStudyList: true,
showStudyList: false,
filterQueryParam: false,
disableServersCache: false,
disableServersCache: true,
studyPrefetcher: {
enabled: true,
order: 'closest',
Expand All @@ -15,21 +15,44 @@ window.config = {
displayProgress: true,
includeActiveDisplaySet: true,
},
disableMeasurementPanel: false,
servers: {
dicomWeb: [
{
name: 'DCM4CHEE',
wadoUriRoot: 'https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/wado',
qidoRoot: 'https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs',
wadoRoot: 'https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs',
name: 'dicom-web',
wadoUriRoot: '/dicom-server/wado',
qidoRoot: '/dicom-server/dicom-web',
wadoRoot: '/dicom-server/dicom-web',
qidoSupportsIncludeField: true,
imageRendering: 'wadors',
thumbnailRendering: 'wadors',
enableStudyLazyLoad: true,
StudiesMetadata: 'MainDicomTags',
SeriesMetadata: "Full",
supportsFuzzyMatching: true,

},
],
},
// update the logo to the MIDRC logo
whiteLabeling: {
createLogoComponentFn: function (React) {
return React.createElement('a', {
target: '_self',
rel: 'noopener noreferrer',
className: 'header-brand',
href: 'https://data.midrc.org',
style: {
display: 'block',
textIndent: '-9999px',
background: 'url(../assets/midrc-logo.png)',
backgroundSize: 'contain',
backgroundRepeat: 'no-repeat',
width: '200px',
},
});
},
},

// Extensions should be able to suggest default values for these?
// Or we can require that these be explicitly set
Expand Down
18 changes: 9 additions & 9 deletions platform/viewer/public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,47 @@
"orientation": "any",
"icons": [
{
"src": "/assets/android-chrome-36x36.png",
"src": "/dicom-viewer/assets/android-chrome-36x36.png",
"sizes": "36x36",
"type": "image/png"
},
{
"src": "/assets/android-chrome-48x48.png",
"src": "/dicom-viewer/assets/android-chrome-48x48.png",
"sizes": "48x48",
"type": "image/png"
},
{
"src": "/assets/android-chrome-72x72.png",
"src": "/dicom-viewer/assets/android-chrome-72x72.png",
"sizes": "72x72",
"type": "image/png"
},
{
"src": "/assets/android-chrome-96x96.png",
"src": "/dicom-viewer/assets/android-chrome-96x96.png",
"sizes": "96x96",
"type": "image/png"
},
{
"src": "/assets/android-chrome-144x144.png",
"src": "/dicom-viewer/assets/android-chrome-144x144.png",
"sizes": "144x144",
"type": "image/png"
},
{
"src": "/assets/android-chrome-192x192.png",
"src": "/dicom-viewer/assets/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/assets/android-chrome-256x256.png",
"src": "/dicom-viewer/assets/android-chrome-256x256.png",
"sizes": "256x256",
"type": "image/png"
},
{
"src": "/assets/android-chrome-384x384.png",
"src": "/dicom-viewer/assets/android-chrome-384x384.png",
"sizes": "384x384",
"type": "image/png"
},
{
"src": "/assets/android-chrome-512x512.png",
"src": "/dicom-viewer/assets/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,10 +416,14 @@ function ViewerRetrieveStudyData({

if (error) {
const content = JSON.stringify(error);
if (content.includes('404') || content.includes('NOT_FOUND')) {
if (error.status == 404 || content.includes('404') || content.includes('NOT_FOUND')) {
return <NotFound />;
}

if (error.status == 403) {
return <NotFound message="You do not have access to this data" />;
}

return <NotFound message="Failed to retrieve study data" />;
}

Expand Down
4 changes: 2 additions & 2 deletions platform/viewer/src/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
//

// Embedded version
importScripts('/third_party/workbox/workbox-v5.1.4/workbox-sw.js');
importScripts('/dicom-viewer/third_party/workbox/workbox-v5.1.4/workbox-sw.js');

workbox.setConfig({
modulePathPrefix: '/third_party/workbox/workbox-v5.1.4/',
modulePathPrefix: '/dicom-viewer/third_party/workbox/workbox-v5.1.4/',
});

// Internet version
Expand Down

0 comments on commit 071cea6

Please sign in to comment.