Viewers
Viewers copied to clipboard
[Feature Request] Study prefetching service and progress bar for display sets
Request
- Display a progress bar close to each thumbnail and also in the scrollbar so the user knows which frame is cached
- Have a configurable study prefetcher service with options to retrieve images similar to v2
studyPrefetcher: {
enabled: true,
order: 'closest', // top-bottom or bottom-up or outwards
displaySetCount: 3, // amount of displaySets up or down
maxNumPrefetchRequests: 100,
displayProgressBar: true,
},
Context
The status of series loading is missing. Frame fetching/caching behavior is unclear - even though I scroll through a series several times, the scrolling remains jumpy, and the “Loading…” message keeps showing up. How can I know when the entire series is actually loaded?
v2 Port Redesign:
@dan-rukas add design here when finalized
- New icons: loading, completed, incomplete
Same as #883 , pending since long time
Similar to issue #883, this pending task has been awaiting completion for an extended duration.
Me also facing the same issue. Needs to get fixed ASAP. Same as #883
Same here, eagerly await this feature!
- Need better user story for thumbnail. Could we discuss @igoroctaviano so @dan-rukas can document design
- Dan to do preliminary sketch and we will meet for feedback
- 2nd part is scrollbar - we have idea of how to move forward for that
@dan-rukas any updates on this one?
Someone from community commented they would like to have a load time for the study which makes sense in this prefetcher
We will investigate and design during upcoming UI redesign
@james-hanks any updates on this?
@fedorov this in our queue for next major release (3.8). We are currently in design review phase. We will update the ticket with design when it is finalized - please feel free to take a look and comment at that time
- some large use cases will de-cache and potentially reset the visual indicator which will be confusing for users
- might make sense to replicate the UI in thumbnail and viewport
Is this feature being worked on actively? Maybe someone knows a branch with corresponding changes ongoing work/drafts?
Any update on this?
Not exactly a prefetching service as requested by this ticket but something I figured could be used for custom preloading of certain images (like all from specific displaySet) and potentially adapted to load all display sets in a background.
import { DisplaySet } from '@ohif/core';
import { getConfiguration as getCoreConfiguration, imageLoader } from '@cornerstonejs/core';
import { extensionManager } from '../../../App';
const preloadDisplaySet = async (displaySet: DisplaySet) => {
const dataSource = extensionManager.getActiveDataSource()[0];
const imageIds = dataSource.getImageIdsForDisplaySet(displaySet);
const { useNorm16Texture } = getCoreConfiguration().rendering;
const options = {
targetBuffer: {
type: useNorm16Texture ? undefined : 'Float32Array',
},
preScale: {
enabled: true,
},
requestType: 'prefetch',
priority: 0,
};
return Promise.all(imageLoader.loadAndCacheImages(imageIds, options));
};
No update, but this will come for next release
@sedghi When we can expect next release ?
@PatrykLuszcz-1 official release will be somewhere in September probably, but the feature will get merged into master branch (dev) sooner
see our branching logic https://docs.ohif.org/development/getting-started/#branches
@lscoder will start on this this week. We will target the top-bottom for now
Any updates on this? I tried to run @lscoder PR to test it, but didn't get what's changed and how it should work. In my project, we want to download all images before showing OHIF UI, but I don't understand how the project do the requests to download the images. If someone could help me or give me some guidance to achieve this, I'd be so grateful 🙏🏾
@chriszao you should wait for Leo's PR to get merged first
Any updates on this? I tried to run @lscoder PR to test it, but didn't get what's changed and how it should work. In my project, we want to download all images before showing OHIF UI, but I don't understand how the project do the requests to download the images. If someone could help me or give me some guidance to achieve this, I'd be so grateful 🙏🏾
@chriszao The changes are merged and you need to enable the service first because it is disabled by default. You need to add something like this to your config file:
studyPrefetcher: {
enabled: true,
displaySetCount: 2,
maxNumPrefetchRequests: 10,
order: 'closest',
},
You can set the order to "closest", "downward" or "upward".
@lscoder You saved my life with that PR hahaha! 🎉.
Just a small doubt. Is there a way to download all studies? Because from what I understand, it downloads the amount defined in displaySetCount
, based on the selected study, right? It would be great if the application was able to download all the studies in the background, doing something similar to what you implemented. But, for example, it downloads every 5 studies (could be a configurable variable), until it downloads them all.
@lscoder You saved my life with that PR hahaha! 🎉. Just a small doubt. Is there a way to download all studies? Because from what I understand, it downloads the amount defined in
displaySetCount
, based on the selected study, right? It would be great if the application was able to download all the studies in the background, doing something similar to what you implemented. But, for example, it downloads every 5 studies (could be a configurable variable), until it downloads them all.
@chriszao Good to hear that lol It downloads any displaySet
returned by displaySetService.getActiveDisplaySets()
that can be from the primary studies (StudyInstanceUIDs url parameter) or any related study. The only problem is that the displaySets from related studies are added to the displaySetService only after switching to All
tab and clicking on one of the related studies to expand it to show the displaySets. After expanding a related study the study prefetcher can also load the displaySets from it as shown below.
https://github.com/OHIF/Viewers/assets/931820/e3c6304a-9c67-4555-9761-ae2f9dec49d7
Loading all the displaySets from related studies would not be a major change but it would require changing how the prefetcher works because it does not load studies but displaySets from any study.