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;
}
// 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);
const numberOfSeries = seriesPromises.length;

View File

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

View File

@ -17,6 +17,7 @@
"cm": "npx git-cz",
"build": "lerna run build:viewer --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:demo": "lerna run build:viewer:demo --stream",
"dev": "lerna run dev:viewer --stream",

View File

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

View File

@ -18,6 +18,7 @@
"proxy": "http://localhost:8042",
"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: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: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",

View File

@ -1,19 +1,15 @@
window.config = {
routerBasename: '/',
enableGoogleCloudAdapter: true,
healthcareApiEndpoint: 'https://healthcare.googleapis.com/v1beta1',
servers: {
// This is an array, but we'll only use the first entry for now
dicomWeb: [],
},
enableGoogleCloudAdapter: false,
// This is an array, but we'll only use the first entry for now
oidc: [
{
// ~ REQUIRED
// Authorization Server URL
authority: 'https://accounts.google.com',
client_id: 'YOURCLIENTID.apps.googleusercontent.com',
redirect_uri: '/callback', // `OHIFStandaloneViewer.js`
client_id:
'723928408739-k9k9r3i44j32rhu69vlnibipmmk9i57p.apps.googleusercontent.com',
redirect_uri: '/callback',
response_type: 'id_token token',
scope:
'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,
},
],
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',
};