fix(volumeLoad): should not have missing slices when loading (#3287)
* fix(volumeLoad): should not have missing slices when loading * add review comments
This commit is contained in:
1 parent
2f33e42004
commit
4734b3bac6
8 files changed
+81
-60
No files matched your search
@@ -11,7 +11,7 @@ const mpr: Types.HangingProtocol.Protocol = {
|
||||
// Unknown number of priors referenced - so just match any study
|
||||
numberOfPriorsReferenced: 0,
|
||||
protocolMatchingRules: [],
|
||||
// imageLoadStrategy: 'nth',
|
||||
imageLoadStrategy: 'interleaveTopToBottom',
|
||||
callbacks: {
|
||||
// Switches out of MPR mode when the layout change button is used
|
||||
onLayoutChange: [
|
||||
@@ -170,7 +170,7 @@ const mprAnd3DVolumeViewport = {
|
||||
availableTo: {},
|
||||
editableBy: {},
|
||||
protocolMatchingRules: [],
|
||||
imageLoadStrategy: 'interleaveTopToBottom',
|
||||
imageLoadStrategy: 'interleaveCenter',
|
||||
displaySetSelectors: {
|
||||
mprDisplaySet: {
|
||||
seriesMatchingRules: [
|
||||
@@ -184,6 +184,15 @@ const mprAnd3DVolumeViewport = {
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
attribute: 'Modality',
|
||||
constraint: {
|
||||
equals: {
|
||||
value: 'CT',
|
||||
},
|
||||
},
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -167,9 +167,26 @@ export default async function init({
|
||||
viewportId
|
||||
);
|
||||
|
||||
const ohifViewport = cornerstoneViewportService.getViewportInfo(
|
||||
viewportId
|
||||
);
|
||||
|
||||
const {
|
||||
lutPresentationStore,
|
||||
positionPresentationStore,
|
||||
} = stateSyncService.getState();
|
||||
const { presentationIds } = ohifViewport.getViewportOptions();
|
||||
const presentations = {
|
||||
positionPresentation:
|
||||
positionPresentationStore[presentationIds?.positionPresentationId],
|
||||
lutPresentation:
|
||||
lutPresentationStore[presentationIds?.lutPresentationId],
|
||||
};
|
||||
|
||||
cornerstoneViewportService.setVolumesForViewport(
|
||||
viewport,
|
||||
volumeInputArray
|
||||
volumeInputArray,
|
||||
presentations
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -506,19 +506,16 @@ class CornerstoneViewportService extends PubSubService
|
||||
!hangingProtocolService.customImageLoadPerformed
|
||||
) {
|
||||
// delegate the volume loading to the hanging protocol service if it has a custom image load strategy
|
||||
if (
|
||||
hangingProtocolService.runImageLoadStrategy({
|
||||
viewportId: viewport.id,
|
||||
volumeInputArray,
|
||||
})
|
||||
) {
|
||||
// Fallback to the default strategy if the custom one fails
|
||||
return;
|
||||
}
|
||||
return hangingProtocolService.runImageLoadStrategy({
|
||||
viewportId: viewport.id,
|
||||
volumeInputArray,
|
||||
});
|
||||
}
|
||||
|
||||
volumeToLoad.forEach(volume => {
|
||||
volume.load();
|
||||
if (!volume.loadStatus.loaded && !volume.loadStatus.loading) {
|
||||
volume.load();
|
||||
}
|
||||
});
|
||||
|
||||
// This returns the async continuation only
|
||||
|
||||
Reference in new issue
Block a user