Merge branch 'feat/v2-main' into feat/v2-main-docusaurus-netlify-monorepo
This commit is contained in:
commit
7a9f113b91
@ -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;
|
||||
|
||||
@ -175,7 +175,8 @@ function PanelStudyBrowser({
|
||||
setExpandedStudyInstanceUIDs(updatedExpandedStudyInstanceUIDs);
|
||||
|
||||
if (!shouldCollapseStudy) {
|
||||
requestDisplaySetCreationForStudy(DisplaySetService, StudyInstanceUID);
|
||||
const madeInClient = true
|
||||
requestDisplaySetCreationForStudy(DisplaySetService, StudyInstanceUID, madeInClient);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
function requestDisplaySetCreationForStudy(
|
||||
dataSource,
|
||||
DisplaySetService,
|
||||
StudyInstanceUID
|
||||
StudyInstanceUID,
|
||||
madeInClient,
|
||||
) {
|
||||
// TODO: is this already short-circuited by the map of Retrieve promises?
|
||||
if (
|
||||
@ -12,7 +13,7 @@ function requestDisplaySetCreationForStudy(
|
||||
return;
|
||||
}
|
||||
|
||||
dataSource.retrieveSeriesMetadata({ StudyInstanceUID });
|
||||
dataSource.retrieveSeriesMetadata({ StudyInstanceUID, madeInClient });
|
||||
}
|
||||
|
||||
export default requestDisplaySetCreationForStudy;
|
||||
|
||||
@ -377,7 +377,7 @@ function OHIFCornerstoneSRViewport({
|
||||
evt.preventDefault();
|
||||
}}
|
||||
onPillClick={() => {
|
||||
sendTrackedMeasurementsEvent('PROMPT_HYDRATE_SR', {
|
||||
sendTrackedMeasurementsEvent('RESTORE_PROMPT_HYDRATE_SR', {
|
||||
displaySetInstanceUID: displaySet.displaySetInstanceUID,
|
||||
viewportIndex,
|
||||
});
|
||||
|
||||
@ -164,6 +164,7 @@ function TrackedMeasurementsContextProvider(
|
||||
console.log('sending event...', trackedMeasurements);
|
||||
sendTrackedMeasurementsEvent('PROMPT_HYDRATE_SR', {
|
||||
displaySetInstanceUID: displaySet.displaySetInstanceUID,
|
||||
SeriesInstanceUID: displaySet.SeriesInstanceUID,
|
||||
viewportIndex: activeViewportIndex,
|
||||
});
|
||||
}
|
||||
|
||||
@ -22,6 +22,7 @@ const machineConfiguration = {
|
||||
prevTrackedSeries: [],
|
||||
prevIgnoredSeries: [],
|
||||
//
|
||||
ignoredSRSeriesForHydration: [],
|
||||
isDirty: false,
|
||||
},
|
||||
states: {
|
||||
@ -39,7 +40,11 @@ const machineConfiguration = {
|
||||
actions: ['setTrackedStudyAndMultipleSeries', 'setIsDirtyToClean'],
|
||||
},
|
||||
],
|
||||
PROMPT_HYDRATE_SR: 'promptHydrateStructuredReport',
|
||||
PROMPT_HYDRATE_SR: {
|
||||
target: 'promptHydrateStructuredReport',
|
||||
cond: 'hasNotIgnoredSRSeriesForHydration',
|
||||
},
|
||||
RESTORE_PROMPT_HYDRATE_SR: 'promptHydrateStructuredReport'
|
||||
},
|
||||
},
|
||||
promptBeginTracking: {
|
||||
@ -218,6 +223,8 @@ const machineConfiguration = {
|
||||
},
|
||||
{
|
||||
target: 'idle',
|
||||
actions: ['ignoreHydrationForSRSeries'],
|
||||
cond: 'shouldIgnoreHydrationForSR'
|
||||
},
|
||||
],
|
||||
onError: {
|
||||
@ -300,6 +307,9 @@ const defaultOptions = {
|
||||
prevIgnoredSeries: [...ctx.ignoredSeries],
|
||||
ignoredSeries: [...ctx.ignoredSeries, evt.data.SeriesInstanceUID],
|
||||
})),
|
||||
ignoreHydrationForSRSeries: assign((ctx, evt) => ({
|
||||
ignoredSRSeriesForHydration: [...ctx.ignoredSRSeriesForHydration, evt.data.srSeriesInstanceUID],
|
||||
})),
|
||||
addTrackedSeries: assign((ctx, evt) => ({
|
||||
prevTrackedSeries: [...ctx.trackedSeries],
|
||||
trackedSeries: [...ctx.trackedSeries, evt.data.SeriesInstanceUID],
|
||||
@ -348,6 +358,8 @@ const defaultOptions = {
|
||||
evt.data && evt.data.userResponse === RESPONSE.NO_NOT_FOR_SERIES,
|
||||
shouldPromptSaveReport: (ctx, evt) =>
|
||||
evt.data && evt.data.userResponse === RESPONSE.CREATE_REPORT,
|
||||
shouldIgnoreHydrationForSR: (ctx, evt) =>
|
||||
evt.data && evt.data.userResponse === RESPONSE.CANCEL,
|
||||
shouldSaveAndContinueWithSameReport: (ctx, evt) =>
|
||||
evt.data &&
|
||||
evt.data.userResponse === RESPONSE.CREATE_REPORT &&
|
||||
@ -363,6 +375,9 @@ const defaultOptions = {
|
||||
hasRemainingTrackedSeries: (ctx, evt) =>
|
||||
ctx.trackedSeries.length > 1 ||
|
||||
!ctx.trackedSeries.includes(evt.SeriesInstanceUID),
|
||||
hasNotIgnoredSRSeriesForHydration: (ctx, evt) => {
|
||||
return !ctx.ignoredSRSeriesForHydration.includes(evt.SeriesInstanceUID)
|
||||
},
|
||||
isNewStudy: (ctx, evt) =>
|
||||
!ctx.ignoredSeries.includes(evt.SeriesInstanceUID) &&
|
||||
ctx.trackedStudy !== evt.StudyInstanceUID,
|
||||
|
||||
@ -11,8 +11,9 @@ const RESPONSE = {
|
||||
};
|
||||
|
||||
function promptUser({ servicesManager, extensionManager }, ctx, evt) {
|
||||
const { UIViewportDialogService } = servicesManager.services;
|
||||
const { UIViewportDialogService, DisplaySetService } = servicesManager.services;
|
||||
const { viewportIndex, displaySetInstanceUID } = evt;
|
||||
const srDisplaySet = DisplaySetService.getDisplaySetByUID(displaySetInstanceUID)
|
||||
|
||||
return new Promise(async function(resolve, reject) {
|
||||
const promptResult = await _askTrackMeasurements(
|
||||
@ -37,6 +38,7 @@ function promptUser({ servicesManager, extensionManager }, ctx, evt) {
|
||||
resolve({
|
||||
userResponse: promptResult,
|
||||
displaySetInstanceUID: evt.displaySetInstanceUID,
|
||||
srSeriesInstanceUID: srDisplaySet.SeriesInstanceUID,
|
||||
viewportIndex,
|
||||
StudyInstanceUID,
|
||||
SeriesInstanceUIDs,
|
||||
|
||||
@ -260,7 +260,8 @@ function PanelStudyBrowserTracking({
|
||||
setExpandedStudyInstanceUIDs(updatedExpandedStudyInstanceUIDs);
|
||||
|
||||
if (!shouldCollapseStudy) {
|
||||
requestDisplaySetCreationForStudy(DisplaySetService, StudyInstanceUID);
|
||||
const madeInClient = true
|
||||
requestDisplaySetCreationForStudy(DisplaySetService, StudyInstanceUID, madeInClient);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
function requestDisplaySetCreationForStudy(
|
||||
dataSource,
|
||||
DisplaySetService,
|
||||
StudyInstanceUID
|
||||
StudyInstanceUID,
|
||||
madeInClient,
|
||||
) {
|
||||
if (
|
||||
DisplaySetService.activeDisplaySets.some(
|
||||
@ -11,7 +12,7 @@ function requestDisplaySetCreationForStudy(
|
||||
return;
|
||||
}
|
||||
|
||||
dataSource.retrieveSeriesMetadata({ StudyInstanceUID });
|
||||
dataSource.retrieveSeriesMetadata({ StudyInstanceUID, madeInClient });
|
||||
}
|
||||
|
||||
export default requestDisplaySetCreationForStudy;
|
||||
|
||||
@ -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'
|
||||
),
|
||||
],
|
||||
},
|
||||
|
||||
@ -20,6 +20,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",
|
||||
|
||||
@ -71,7 +71,7 @@ class HangingProtocolService {
|
||||
this.customAttributeRetrievalCallbacks
|
||||
);
|
||||
|
||||
// if there is no pre-defiend protocol
|
||||
// if there is no pre-defined protocol
|
||||
if (!protocol || protocol.id === undefined) {
|
||||
const matchedProtocol = this.ProtocolEngine.run(metaData);
|
||||
this._setProtocol(matchedProtocol);
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
@ -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>
|
||||
}
|
||||
>
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
"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:ci": "cross-env NODE_ENV=production PUBLIC_URL=/ 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: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: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 serve --config .webpack/webpack.pwa.js",
|
||||
"dev:orthanc": "cross-env NODE_ENV=development PROXY_TARGET=/dicom-web PROXY_DOMAIN=http://localhost:8042 APP_CONFIG=config/docker_nginx-orthanc.js webpack serve --config .webpack/webpack.pwa.js",
|
||||
|
||||
@ -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',
|
||||
};
|
||||
|
||||
@ -39,9 +39,11 @@ async function defaultRouteInit({
|
||||
|
||||
const { unsubscribe: seriesAddedUnsubscribe } = DicomMetadataStore.subscribe(
|
||||
DicomMetadataStore.EVENTS.SERIES_ADDED,
|
||||
({ StudyInstanceUID }) => {
|
||||
({ StudyInstanceUID, madeInClient }) => {
|
||||
const studyMetadata = DicomMetadataStore.getStudy(StudyInstanceUID);
|
||||
HangingProtocolService.run(studyMetadata);
|
||||
if (!madeInClient) {
|
||||
HangingProtocolService.run(studyMetadata);
|
||||
}
|
||||
}
|
||||
);
|
||||
unsubscriptions.push(seriesAddedUnsubscribe);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user