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
@@ -43,10 +43,10 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@cornerstonejs/adapters": "^0.4.1",
|
||||
"@cornerstonejs/core": "^0.36.5",
|
||||
"@cornerstonejs/streaming-image-volume-loader": "^0.15.1",
|
||||
"@cornerstonejs/tools": "^0.55.1",
|
||||
"@cornerstonejs/adapters": "^0.6.0",
|
||||
"@cornerstonejs/core": "^0.38.0",
|
||||
"@cornerstonejs/streaming-image-volume-loader": "^0.15.13",
|
||||
"@cornerstonejs/tools": "^0.58.0",
|
||||
"@kitware/vtk.js": "26.5.6",
|
||||
"html2canvas": "^1.4.1",
|
||||
"lodash.debounce": "4.0.8",
|
||||
|
||||
@@ -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