I have recently switched our light-sheet microscope control code to Python. Everything is working well, and I am now hoping to use imglyb to visualize the data as the scan progresses. To quickly summarize the workflow of the current code, data is streamed from the camera to a numpy array -> the numpy array is saved to an H5 file with a resolution pyramid -> an XML file is written for the H5 file -> this process is repeated for N imaging tiles and M color channels for N*M total tiles. The tiles are written into the H5/XML files formatted for downstream processing for BigStitcher.
My question are:
Whether it is possible to use imglyb to open and display the H5/XML file during the acquisition as the imaging progresses. And update it after a new image tile is added. This would be ideal, since the XML file already contains all of the affine transformations to deskew and roughly align the tiles.
If not, if it is possible to add multiple image volumes to the same bdv instance with imglyb. And if it is possible to apply a separate affine transformations to each volume? I have found this method util.BdvOptions.options().sourceTransform() but it is not clear to me what the inputs to sourceTransform() are. And it seems to apply the same sourceTransform to all volumes I add to the same bdv instance. Example code snippet below:
bdv = util.BdvFunctions.show(vol1, 'vol1',util.BdvOptions.options().sourceTransform(1.0, 2.0,1.0)) util.BdvFunctions.show(vol2, 'vol2', util.BdvOptions.addTo(bdv))
- Whether imglyb is the correct way to go about this, or if an easier method might be to use pyimagej to open the H5/XML file using the BigDataViewer or BigStitcher plugins as the imaging progresses.