Visualize image with H5Web when clicking on Dozor plot
In the end, I used H5GroveProvider
from @h5web/app
, so I could fetch the data as ArrayBuffer
, as it was utterly unusable when fetching as JSON with useGetEndpoint
. Obviously, the slow-request issue is still present, so you have to click around a few times before it finally loads an image at a decent speed.
This is a first prototype, there are a couple of things that need to be discussed from here on:
- I have not played with the new popup-based layout. For now, the H5Web visualization appears below the dozor plot. Obviously this isn't great as the screen recording shows. Should the visualization be displayed in a separate popup? Should it remain in the data collection popup but force the popup to expand? ...
- The domain of the color map is currently hard-coded to
[0, 20]
. We could compute the domain from the data, but there's the issue of the "fill" value (detector gaps). I can easily hard-code it in order to exclude it when computing the domain and rendering the visualization, but is the exact value predictable? I could also exclude anything above a certain value. Alternatively, the precomputed domain could be provided as an HDF5 attribute. - All the other visualization settings are H5Web's defaults (linear scale, viridis, grid lines, etc.) Do any of those need to change? Will there be a need for a toolbar so users can change them dynamically? Would the toolbar need to include a domain slider to change the domain of the color map?
- Obviously the current algorithm to find the HDF5 file where the clicked image index is stored is far from ideal. If I understand, the plan is to provide the file name pattern to search for in a parameter of the dozor dataset? If so, could we go a step further and instead store an array with all the HDF5 datafile IDs of the dozor's input dataset? This would save us from having to fetch the target datafile just to get its ID.