Fix/update branch cherry pick (#2039)

* Update all the icons

* Turn off global tool sync; watch as the world burns

* Shift a bunch of things around so we can start tracking/setting per element

* ToolBarService to initiate one of three different calls; callback passed to all button types

* SplitButton and Toolbar Button to use new `onInteraction` prop and new toolbar state

* Changes to toolbar button interface and config

* Fix broken layout selector

* Update SR viewport to activate tools in viewport component

* Duplicate activation logic in measurement tracking extension

* Add alternative/dashed variants for SR Viewport

* pass through "setToolActive" commands for other viewport types

* fix small overlay bugs (no wwwc or scale info)

* Show SpacingBetweenSlices instead of PixelSpacing in patient information dialog

* Fix prop-types

* Update tracked viewport to have alternative tracked styling

* alt styling for SR viewports

* Update to support isLocked + isRehydratable

* fix broken logic

* fix broken logic

* switch icon style

* fix icon styles

* hover and click to start flow

* expedited workflow when data is not dirty (just after SR hydration)

* fix: setting elliptical roi tool

* fix arrow annotate dialog

* fix: do not show learn more button for now

* remove dead code

* simpler cache invalidation

* simpler cache invalidation part 2

* Fix for unable to spand study cards on separate pages
This commit is contained in:
Danny Brown authored and GitHub committed 2020-09-14 21:18:46 -04:00
1 parent 365ba2fa72
commit cae54b0779
78 files changed
+1678 -1263

No files matched your search

@@ -141,7 +141,7 @@ function TrackedMeasurementsContextProvider(
if (
displaySet.SOPClassHandlerId ===
'org.ohif.dicom-sr.sopClassHandlerModule.dicom-sr' &&
!displaySet.isLocked
displaySet.isRehydratable === true
) {
console.log('sending event...', trackedMeasurements);
sendTrackedMeasurementsEvent('PROMPT_HYDRATE_SR', {
@@ -21,6 +21,8 @@ const machineConfiguration = {
prevTrackedStudy: '',
prevTrackedSeries: [],
prevIgnoredSeries: [],
//
isDirty: false,
},
states: {
off: {
@@ -33,7 +35,7 @@ const machineConfiguration = {
SET_TRACKED_SERIES: [
{
target: 'tracking',
actions: ['setTrackedStudyAndMultipleSeries'],
actions: ['setTrackedStudyAndMultipleSeries', 'setIsDirtyToClean'],
},
],
PROMPT_HYDRATE_SR: 'promptHydrateStructuredReport',
@@ -90,6 +92,16 @@ const machineConfiguration = {
},
],
SAVE_REPORT: 'promptSaveReport',
SET_DIRTY: [
{
target: 'tracking',
actions: ['setIsDirty'],
cond: 'shouldSetDirty',
},
{
target: 'tracking',
},
],
},
},
promptTrackNewSeries: {
@@ -98,7 +110,7 @@ const machineConfiguration = {
onDone: [
{
target: 'tracking',
actions: ['addTrackedSeries'],
actions: ['addTrackedSeries', 'setIsDirty'],
cond: 'shouldAddSeries',
},
{
@@ -106,6 +118,7 @@ const machineConfiguration = {
actions: [
'discardPreviouslyTrackedMeasurements',
'setTrackedStudyAndSeries',
'setIsDirty',
],
cond: 'shouldSetStudyAndSeries',
},
@@ -131,6 +144,7 @@ const machineConfiguration = {
actions: [
'discardPreviouslyTrackedMeasurements',
'setTrackedStudyAndSeries',
'setIsDirty',
],
cond: 'shouldSetStudyAndSeries',
},
@@ -197,6 +211,7 @@ const machineConfiguration = {
actions: [
'setTrackedStudyAndMultipleSeries',
'showSeriesInActiveViewport',
'setIsDirtyToClean',
],
cond: 'shouldHydrateStructuredReport',
},
@@ -274,6 +289,15 @@ const defaultOptions = {
ignoredSeries: [],
};
}),
setIsDirtyToClean: assign((ctx, evt) => ({
isDirty: false,
})),
setIsDirty: assign((ctx, evt) => {
debugger;
return {
isDirty: true,
};
}),
ignoreSeries: assign((ctx, evt) => ({
prevIgnoredSeries: [...ctx.ignoredSeries],
ignoredSeries: [...ctx.ignoredSeries, evt.data.SeriesInstanceUID],
@@ -292,6 +316,13 @@ const defaultOptions = {
})),
},
guards: {
shouldSetDirty: (ctx, evt) => {
debugger;
return (
evt.SeriesInstanceUID === undefined ||
ctx.trackedSeries.includes(evt.SeriesInstanceUID)
);
},
shouldKillMachine: (ctx, evt) =>
evt.data && evt.data.userResponse === RESPONSE.NO_NEVER,
shouldAddSeries: (ctx, evt) =>
@@ -17,11 +17,13 @@ function promptUser({ servicesManager, extensionManager }, ctx, evt) {
viewportIndex
);
if (promptResult === RESPONSE.CREATE_REPORT) {
if (ctx.isDirty && promptResult === RESPONSE.CREATE_REPORT) {
promptResult = await _askSaveDiscardOrCancel(
UIViewportDialogService,
viewportIndex
);
} else {
promptResult = RESPONSE.SET_STUDY_AND_SERIES;
}
resolve({
@@ -17,11 +17,13 @@ function promptUser({ servicesManager, extensionManager }, ctx, evt) {
viewportIndex
);
if (promptResult === RESPONSE.SET_STUDY_AND_SERIES) {
if (ctx.isDirty && promptResult === RESPONSE.SET_STUDY_AND_SERIES) {
promptResult = await _askSaveDiscardOrCancel(
UIViewportDialogService,
viewportIndex
);
} else {
promptResult = RESPONSE.SET_STUDY_AND_SERIES;
}
resolve({