fix(ViewportGrid) fill blank viewports with display sets not yet in grid. (#3154)
* fix(ViewportGrid): In ViewportGrid, fill blank viewports with display sets not yet in grid. ViewportGridService now allows off-screen viewports to remain so that so as to maintain continuity if they were filled by the UI/user. * PR feedback: moved getNumViewportPanes into the ViewportGridService API. * PR feedback: - renamed some variables - proper import/export of IDisplaySet - added some comments for clarification - fixed broken e2e tests * Some missed rename of Services.
This commit is contained in:
1 parent
5e66faa45d
commit
f791a4cafb
8 files changed
+138
-33
No files matched your search
+18
-15
@@ -182,7 +182,7 @@ function PanelStudyBrowserTracking({
|
||||
thumbnailImageSrcMap,
|
||||
trackedSeries,
|
||||
viewports,
|
||||
isSingleViewport,
|
||||
viewportGridService,
|
||||
dataSource,
|
||||
displaySetService,
|
||||
uiDialogService,
|
||||
@@ -245,7 +245,7 @@ function PanelStudyBrowserTracking({
|
||||
thumbnailImageSrcMap,
|
||||
trackedSeries,
|
||||
viewports,
|
||||
isSingleViewport,
|
||||
viewportGridService,
|
||||
dataSource,
|
||||
displaySetService,
|
||||
uiDialogService,
|
||||
@@ -412,7 +412,7 @@ function _mapDisplaySets(
|
||||
thumbnailImageSrcMap,
|
||||
trackedSeriesInstanceUIDs,
|
||||
viewports, // TODO: make array of `displaySetInstanceUIDs`?
|
||||
isSingleViewport,
|
||||
viewportGridService,
|
||||
dataSource,
|
||||
displaySetService,
|
||||
uiDialogService,
|
||||
@@ -423,18 +423,21 @@ function _mapDisplaySets(
|
||||
displaySets.forEach(ds => {
|
||||
const imageSrc = thumbnailImageSrcMap[ds.displaySetInstanceUID];
|
||||
const componentType = _getComponentType(ds.Modality);
|
||||
const viewportIdentificator = isSingleViewport
|
||||
? []
|
||||
: viewports.reduce((acc, viewportData, index) => {
|
||||
if (
|
||||
viewportData?.displaySetInstanceUIDs?.includes(
|
||||
ds.displaySetInstanceUID
|
||||
)
|
||||
) {
|
||||
acc.push(viewportData.viewportLabel);
|
||||
}
|
||||
return acc;
|
||||
}, []);
|
||||
const numPanes = viewportGridService.getNumViewportPanes();
|
||||
const viewportIdentificator =
|
||||
numPanes === 1
|
||||
? []
|
||||
: viewports.reduce((acc, viewportData, index) => {
|
||||
if (
|
||||
index < numPanes &&
|
||||
viewportData?.displaySetInstanceUIDs?.includes(
|
||||
ds.displaySetInstanceUID
|
||||
)
|
||||
) {
|
||||
acc.push(viewportData.viewportLabel);
|
||||
}
|
||||
return acc;
|
||||
}, []);
|
||||
|
||||
const array =
|
||||
componentType === 'thumbnailTracked'
|
||||
|
||||
Reference in new issue
Block a user