Fix: Google cloud config and tooltips (#2471)

* fix: google cloud config and tooltips

* fix: version number

* fix: cine player commandOptions
This commit is contained in:
Alireza 2021-07-16 13:32:51 -04:00 committed by GitHub
parent 3a53479bb7
commit 042dbb13b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 135 additions and 42 deletions

View File

@ -266,6 +266,10 @@ function createDicomWebApi(dicomWebConfig, UserAuthenticationService) {
study.isLoaded = true; study.isLoaded = true;
} }
// Google Cloud Healthcare doesn't return StudyInstanceUID, so we need to add
// it manually here
seriesSummaryMetadata.forEach(aSeries => { aSeries.StudyInstanceUID = StudyInstanceUID })
DicomMetadataStore.addSeriesMetadata(seriesSummaryMetadata, madeInClient); DicomMetadataStore.addSeriesMetadata(seriesSummaryMetadata, madeInClient);
const numberOfSeries = seriesPromises.length; const numberOfSeries = seriesPromises.length;

View File

@ -15,14 +15,15 @@ const { windowLevelPresets } = defaults;
* @param {*} icon * @param {*} icon
* @param {*} label * @param {*} label
*/ */
function _createButton(type, id, icon, label, commandName, commandOptions) { function _createButton(type, id, icon, label, commandName, commandOptions, tooltip) {
return { return {
id, id,
icon, icon,
label, label,
type, type,
commandName, commandName,
commandOptions commandOptions,
tooltip,
}; };
} }
@ -56,9 +57,14 @@ export default [
groupId: 'MeasurementTools', groupId: 'MeasurementTools',
isRadio: true, // ? isRadio: true, // ?
// Switch? // Switch?
primary: _createToolButton('Length', 'tool-length', 'Length', undefined, { primary: _createToolButton(
toolName: 'Length', 'Length',
}), 'tool-length',
'Length',
undefined,
{ toolName: 'Length' },
'Length'
),
secondary: { secondary: {
icon: 'chevron-down', icon: 'chevron-down',
label: '', label: '',
@ -66,22 +72,29 @@ export default [
tooltip: 'More Measure Tools', tooltip: 'More Measure Tools',
}, },
items: [ items: [
_createToolButton('Length', 'tool-length', 'Length', undefined, { _createToolButton(
toolName: 'Length', 'Length',
}), 'tool-length',
'Length',
undefined,
{ toolName: 'Length' },
'Length Tool'
),
_createToolButton( _createToolButton(
'Bidirectional', 'Bidirectional',
'tool-bidirectional', 'tool-bidirectional',
'Bidirectional', 'Bidirectional',
undefined, undefined,
{ toolName: 'Bidirectional' } { toolName: 'Bidirectional' },
'Bidirectional Tool'
), ),
_createToolButton( _createToolButton(
'ArrowAnnotate', 'ArrowAnnotate',
'tool-annotate', 'tool-annotate',
'Annotation', 'Annotation',
undefined, undefined,
{ toolName: 'ArrowAnnotate' } { toolName: 'ArrowAnnotate' },
'Arrow Annotate'
), ),
_createToolButton( _createToolButton(
'EllipticalRoi', 'EllipticalRoi',
@ -90,7 +103,8 @@ export default [
undefined, undefined,
{ {
toolName: 'EllipticalRoi', toolName: 'EllipticalRoi',
} },
'Ellipse Tool'
), ),
], ],
}, },
@ -117,7 +131,8 @@ export default [
'tool-window-level', 'tool-window-level',
'Window Level', 'Window Level',
undefined, undefined,
{ toolName: 'Wwwc' } { toolName: 'Wwwc' },
'Window Level'
), ),
secondary: { secondary: {
icon: 'chevron-down', icon: 'chevron-down',
@ -172,7 +187,9 @@ export default [
'Reset', 'Reset',
'tool-reset', 'tool-reset',
'Reset View', 'Reset View',
'resetViewport' 'resetViewport',
undefined,
'Reset'
), ),
secondary: { secondary: {
icon: 'chevron-down', icon: 'chevron-down',
@ -185,49 +202,81 @@ export default [
'Reset', 'Reset',
'tool-reset', 'tool-reset',
'Reset View', 'Reset View',
'resetViewport' 'resetViewport',
undefined,
'Reset'
), ),
_createActionButton( _createActionButton(
'rotate-right', 'rotate-right',
'tool-rotate-right', 'tool-rotate-right',
'Rotate Right', 'Rotate Right',
'rotateViewportCW' 'rotateViewportCW',
undefined,
'Rotate +90'
), ),
_createActionButton( _createActionButton(
'flip-horizontal', 'flip-horizontal',
'tool-flip-horizontal', 'tool-flip-horizontal',
'Flip Horizontally', 'Flip Horizontally',
'flipViewportHorizontal' 'flipViewportHorizontal',
undefined,
'Flip Horizontal'
), ),
_createToolButton( _createToolButton(
'StackScroll', 'StackScroll',
'tool-stack-scroll', 'tool-stack-scroll',
'Stack Scroll', 'Stack Scroll',
undefined, undefined,
{ toolName: 'StackScroll' } { toolName: 'StackScroll' },
'Stack Scroll'
),
_createToolButton(
'Magnify',
'tool-magnify',
'Magnify',
undefined,
{ toolName: 'Magnify' },
'Magnify'
), ),
_createToolButton('Magnify', 'tool-magnify', 'Magnify', undefined, {
toolName: 'Magnify',
}),
_createActionButton( _createActionButton(
'invert', 'invert',
'tool-invert', 'tool-invert',
'Invert', 'Invert',
'invertViewport' 'invertViewport',
undefined,
'Invert Colors'
),
_createToggleButton(
'cine',
'tool-cine',
'Cine',
'toggleCine',
undefined,
'Cine'
),
_createToolButton(
'Angle',
'tool-angle',
'Angle',
undefined,
{ toolName: 'Angle' },
'Angle'
),
_createToolButton(
'DragProbe',
'tool-probe',
'Probe',
undefined,
{ toolName: 'DragProbe' },
'Probe'
), ),
_createToggleButton('cine', 'tool-cine', 'Cine', 'toggleCine'),
_createToolButton('Angle', 'tool-angle', 'Angle', undefined, {
toolName: 'Angle',
}),
_createToolButton('DragProbe', 'tool-probe', 'Probe', undefined, {
toolName: 'DragProbe',
}),
_createToolButton( _createToolButton(
'Rectangle', 'Rectangle',
'tool-rectangle', 'tool-rectangle',
'Rectangle', 'Rectangle',
undefined, undefined,
{ toolName: 'RectangleRoi' } { toolName: 'RectangleRoi' },
'Rectangle'
), ),
], ],
}, },

View File

@ -17,6 +17,7 @@
"cm": "npx git-cz", "cm": "npx git-cz",
"build": "lerna run build:viewer --stream", "build": "lerna run build:viewer --stream",
"build:ci": "lerna run build:viewer:ci --stream", "build:ci": "lerna run build:viewer:ci --stream",
"build:qa": "lerna run build:viewer:qa --stream",
"build:ui:deploy-preview": "lerna run build:ui:deploy-preview --stream", "build:ui:deploy-preview": "lerna run build:ui:deploy-preview --stream",
"build:demo": "lerna run build:viewer:demo --stream", "build:demo": "lerna run build:viewer:demo --stream",
"dev": "lerna run dev:viewer --stream", "dev": "lerna run dev:viewer --stream",

View File

@ -70,7 +70,10 @@ const ThumbnailTracked = ({
position="right" position="right"
content={ content={
<div className="flex flex-row flex-1"> <div className="flex flex-row flex-1">
<div className="flex flex-col flex-1 pr-4"> <div className="flex items-center justify-center pr-4 flex-2">
<Icon name="info-link" className="text-primary-active" />
</div>
<div className="flex flex-col flex-1">
<span> <span>
Series is Series is
<span className="text-white"> <span className="text-white">
@ -86,9 +89,7 @@ const ThumbnailTracked = ({
</span> </span>
)} )}
</div> </div>
<div className="flex items-center justify-center flex-2">
<Icon name="info-link" className="text-primary-active" />
</div>
</div> </div>
} }
> >

View File

@ -18,6 +18,7 @@
"proxy": "http://localhost:8042", "proxy": "http://localhost:8042",
"scripts": { "scripts": {
"build:viewer": "cross-env NODE_ENV=production node --max_old_space_size=4096 ./../../node_modules/webpack/bin/webpack.js --config .webpack/webpack.pwa.js --progress", "build:viewer": "cross-env NODE_ENV=production node --max_old_space_size=4096 ./../../node_modules/webpack/bin/webpack.js --config .webpack/webpack.pwa.js --progress",
"build:viewer:qa": "cross-env NODE_ENV=production APP_CONFIG=config/google.js node --max_old_space_size=4096 ./../../node_modules/webpack/bin/webpack.js --config .webpack/webpack.pwa.js --progress",
"build:viewer:ci": "cross-env NODE_ENV=production PUBLIC_URL=/pwa/ APP_CONFIG=config/netlify.js QUICK_BUILD=true node --max_old_space_size=4096 ./../../node_modules/webpack/bin/webpack.js --config .webpack/webpack.pwa.js", "build:viewer:ci": "cross-env NODE_ENV=production PUBLIC_URL=/pwa/ APP_CONFIG=config/netlify.js QUICK_BUILD=true node --max_old_space_size=4096 ./../../node_modules/webpack/bin/webpack.js --config .webpack/webpack.pwa.js",
"build:viewer:demo": "cross-env NODE_ENV=production APP_CONFIG=config/demo.js HTML_TEMPLATE=rollbar.html QUICK_BUILD=true node --max_old_space_size=4096 ./../../node_modules/webpack/bin/webpack.js --progress --config .webpack/webpack.pwa.js", "build:viewer:demo": "cross-env NODE_ENV=production APP_CONFIG=config/demo.js HTML_TEMPLATE=rollbar.html QUICK_BUILD=true node --max_old_space_size=4096 ./../../node_modules/webpack/bin/webpack.js --progress --config .webpack/webpack.pwa.js",
"dev": "cross-env NODE_ENV=development webpack-dev-server --config .webpack/webpack.pwa.js --watch", "dev": "cross-env NODE_ENV=development webpack-dev-server --config .webpack/webpack.pwa.js --watch",

View File

@ -1,19 +1,15 @@
window.config = { window.config = {
routerBasename: '/', routerBasename: '/',
enableGoogleCloudAdapter: true, enableGoogleCloudAdapter: false,
healthcareApiEndpoint: 'https://healthcare.googleapis.com/v1beta1',
servers: {
// This is an array, but we'll only use the first entry for now
dicomWeb: [],
},
// This is an array, but we'll only use the first entry for now // This is an array, but we'll only use the first entry for now
oidc: [ oidc: [
{ {
// ~ REQUIRED // ~ REQUIRED
// Authorization Server URL // Authorization Server URL
authority: 'https://accounts.google.com', authority: 'https://accounts.google.com',
client_id: 'YOURCLIENTID.apps.googleusercontent.com', client_id:
redirect_uri: '/callback', // `OHIFStandaloneViewer.js` '723928408739-k9k9r3i44j32rhu69vlnibipmmk9i57p.apps.googleusercontent.com',
redirect_uri: '/callback',
response_type: 'id_token token', response_type: 'id_token token',
scope: scope:
'email profile openid https://www.googleapis.com/auth/cloudplatformprojects.readonly https://www.googleapis.com/auth/cloud-healthcare', // email profile openid 'email profile openid https://www.googleapis.com/auth/cloudplatformprojects.readonly https://www.googleapis.com/auth/cloud-healthcare', // email profile openid
@ -24,5 +20,46 @@ window.config = {
revokeAccessTokenOnSignout: true, revokeAccessTokenOnSignout: true,
}, },
], ],
studyListFunctionsEnabled: true, // whiteLabelling: {},
extensions: [],
modes: [],
showStudyList: true,
// filterQueryParam: false,
dataSources: [
{
friendlyName: 'dcmjs DICOMWeb Server',
namespace: 'org.ohif.default.dataSourcesModule.dicomweb',
sourceName: 'dicomweb',
configuration: {
name: 'GCP',
wadoUriRoot:
'https://healthcare.googleapis.com/v1/projects/ohif-cloud-healthcare/locations/us-east4/datasets/ohif-qa-dataset/dicomStores/ohif-qa-2/dicomWeb',
qidoRoot:
'https://healthcare.googleapis.com/v1/projects/ohif-cloud-healthcare/locations/us-east4/datasets/ohif-qa-dataset/dicomStores/ohif-qa-2/dicomWeb',
wadoRoot:
'https://healthcare.googleapis.com/v1/projects/ohif-cloud-healthcare/locations/us-east4/datasets/ohif-qa-dataset/dicomStores/ohif-qa-2/dicomWeb',
qidoSupportsIncludeField: true,
imageRendering: 'wadors',
thumbnailRendering: 'wadors',
enableStudyLazyLoad: true,
supportsFuzzyMatching: true,
supportsWildcard: false,
},
},
{
friendlyName: 'dicom json',
namespace: 'org.ohif.default.dataSourcesModule.dicomjson',
sourceName: 'dicomjson',
configuration: {
name: 'json',
},
},
{
friendlyName: 'dicom local',
namespace: 'org.ohif.default.dataSourcesModule.dicomlocal',
sourceName: 'dicomlocal',
configuration: {},
},
],
defaultDataSourceName: 'dicomweb',
}; };