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:
1 parent
365ba2fa72
commit
cae54b0779
78 files changed
+1678
-1263
No files matched your search
@@ -361,8 +361,11 @@ function _getOneBasedImageIdIndex(displaySets, SOPInstanceUID) {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {*} points
|
||||
* @param {*} measurement
|
||||
* @param {*} pixelSpacing
|
||||
* @param {*} seriesNumber
|
||||
* @param {*} instanceNumber
|
||||
* @param {*} types
|
||||
*/
|
||||
function _getDisplayText(
|
||||
measurement,
|
||||
|
||||
+28
-17
@@ -1,7 +1,12 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { utils } from '@ohif/core';
|
||||
import { StudyBrowser, useImageViewer, useViewportGrid, Dialog } from '@ohif/ui';
|
||||
import {
|
||||
StudyBrowser,
|
||||
useImageViewer,
|
||||
useViewportGrid,
|
||||
Dialog,
|
||||
} from '@ohif/ui';
|
||||
import { useTrackedMeasurements } from '../../getContextModule';
|
||||
|
||||
const { formatDate } = utils;
|
||||
@@ -63,6 +68,7 @@ function PanelStudyBrowserTracking({
|
||||
referenceStudyUID: StudyInstanceUID,
|
||||
} = measurement;
|
||||
|
||||
sendTrackedMeasurementsEvent('SET_DIRTY', { SeriesInstanceUID });
|
||||
sendTrackedMeasurementsEvent('TRACK_SERIES', {
|
||||
viewportIndex: activeViewportIndex,
|
||||
StudyInstanceUID,
|
||||
@@ -238,10 +244,10 @@ function PanelStudyBrowserTracking({
|
||||
);
|
||||
const updatedExpandedStudyInstanceUIDs = shouldCollapseStudy
|
||||
? [
|
||||
...expandedStudyInstanceUIDs.filter(
|
||||
stdyUid => stdyUid !== StudyInstanceUID
|
||||
),
|
||||
]
|
||||
...expandedStudyInstanceUIDs.filter(
|
||||
stdyUid => stdyUid !== StudyInstanceUID
|
||||
),
|
||||
]
|
||||
: [...expandedStudyInstanceUIDs, StudyInstanceUID];
|
||||
|
||||
setExpandedStudyInstanceUIDs(updatedExpandedStudyInstanceUIDs);
|
||||
@@ -315,7 +321,7 @@ function PanelStudyBrowserTracking({
|
||||
SeriesInstanceUID: displaySet.SeriesInstanceUID,
|
||||
});
|
||||
}}
|
||||
onClickThumbnail={() => { }}
|
||||
onClickThumbnail={() => {}}
|
||||
onDoubleClickThumbnail={onDoubleClickThumbnailHandler}
|
||||
activeDisplaySetInstanceUID={activeDisplaySetInstanceUID}
|
||||
/>
|
||||
@@ -385,11 +391,11 @@ function _mapDisplaySets(
|
||||
const viewportIdentificator = isSingleViewport
|
||||
? []
|
||||
: viewports.reduce((acc, viewportData, index) => {
|
||||
if (viewportData.displaySetInstanceUID === ds.displaySetInstanceUID) {
|
||||
acc.push(_viewportLabels[index]);
|
||||
}
|
||||
return acc;
|
||||
}, []);
|
||||
if (viewportData.displaySetInstanceUID === ds.displaySetInstanceUID) {
|
||||
acc.push(_viewportLabels[index]);
|
||||
}
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
const array =
|
||||
componentType === 'thumbnailTracked'
|
||||
@@ -430,7 +436,7 @@ function _mapDisplaySets(
|
||||
contentProps: {
|
||||
title: 'Reject Report',
|
||||
body: () => (
|
||||
<div className="p-4 bg-primary-dark text-white">
|
||||
<div className="p-4 text-white bg-primary-dark">
|
||||
<p>This is a destructive action.</p>
|
||||
<p>Are you sure you want to continue?</p>
|
||||
</div>
|
||||
@@ -444,7 +450,10 @@ function _mapDisplaySets(
|
||||
switch (action.id) {
|
||||
case 'save':
|
||||
try {
|
||||
await dataSource.reject.series(ds.StudyInstanceUID, ds.SeriesInstanceUID);
|
||||
await dataSource.reject.series(
|
||||
ds.StudyInstanceUID,
|
||||
ds.SeriesInstanceUID
|
||||
);
|
||||
DisplaySetService.deleteDisplaySet(displaySetInstanceUID);
|
||||
UIDialogService.dismiss({ id: 'ds-reject-sr' });
|
||||
UINotificationService.show({
|
||||
@@ -525,9 +534,11 @@ function _createStudyBrowserTabs(
|
||||
const displaySetsForStudy = displaySets.filter(
|
||||
ds => ds.StudyInstanceUID === study.studyInstanceUid
|
||||
);
|
||||
|
||||
// Sort them
|
||||
const sortedDisplaySetsForStudy = utils.sortBySeriesDate(displaySetsForStudy);
|
||||
|
||||
// Sort them
|
||||
const sortedDisplaySetsForStudy = utils.sortBySeriesDate(
|
||||
displaySetsForStudy
|
||||
);
|
||||
|
||||
/* Sort by series number, then by series date
|
||||
displaySetsForStudy.sort((a, b) => {
|
||||
@@ -541,7 +552,7 @@ function _createStudyBrowserTabs(
|
||||
return seriesDateA - seriesDateB;
|
||||
});
|
||||
*/
|
||||
|
||||
|
||||
// Map the study to it's tab/view representation
|
||||
const tabStudy = Object.assign({}, study, {
|
||||
displaySets: displaySetsForStudy,
|
||||
|
||||
Reference in new issue
Block a user