Hi!
Describe Your Question
I’m currently customizing the segmentation mode/extension within OHIF in an environment with very slow I/O. Radiologists sometimes “finish” their segmentation work before all the image frames for a CT study have fully loaded, which leads to errors due to incomplete data when producing the DICOM SEG.
To prevent this, I’m trying to implement a loading indicator that will only disappear once all the image data has been successfully loaded into the viewer.
I’ve found an event that triggers when series metadata has been loaded (DicomMetadataStore.EVENTS.SERIES_ADDED
as shown in the snippet below). I’m looking for a similar event, but for when the image data for all frames within a series/study has been completely loaded and available. Does this event exists?
function CustomLoadingIndicator() {
const [progressDone, setProgressDone] = useState(false);
useEffect(() => {
// TODO: Find the correct pub/sub service and event.
const { unsubscribe: seriesAddedUnsubscribe } = DicomMetadataStore.subscribe(
DicomMetadataStore.EVENTS.SERIES_ADDED,
() => { setProgressDone(true); }
);
return () => {
seriesAddedUnsubscribe();
};
}, []);
if (progressDone) {
return null;
}
return (
<div className={classNames('flex flex-col items-center justify-center space-y-5')}>
<Icons.LoadingOHIFMark className="h-12 w-12 text-white" />
<div className="w-48">
<ProgressLoadingBar />
</div>
</div>
);
}
export default CustomLoadingIndicator;
Thanks in advance!