nvladimus / npy2bdv

Fast writing of numpy 3d-arrays into HDF5 Fiji/BigDataViewer files.
GNU General Public License v3.0
34 stars 11 forks source link

Read affine transform from XML #6

Closed dpshepherd closed 3 years ago

dpshepherd commented 3 years ago

Hi Nikita!

For our OPM post-processing, it will be useful to read the affine transform that contains the stage coordinates back out for the tiled acquisition. Right now we write using the virtual stack with no downsampling and write the stage coordinates to the affine translation column.

For post-processing, we read each big strip scan (~100,000x1600x256) back in to deconvolve, deskew, and split it into smaller blocks. We then write a new H5 with downsampling for stitching. We need to transform the stage coordinates after the deskew and splitting for each new tile.

I took a quick look at the new BdvEditor class and I think this should be simple to implement. We will take a shot at it implementing it and do a pull request, but I I wanted to let you know in case you have any input before we get started on it.

Thanks, Doug

nvladimus commented 3 years ago

Hi, Doug, Yes, this should be quite straightforward to implement, let me know if you need any help. If you have time, please also consider writing a quick test for it, e.g. by adding a function similar to test_view_properties(), to make sure it works as intended. Thanks!

dpshepherd commented 3 years ago

Will do! Thanks!

nvladimus commented 3 years ago

Hi, Doug, I added .read_affine(...) method to both classes BdvWriter() and BdvReader(). Also, appending an affine transform is possible now in both classes. See e.g. unit test here and docs here. I hope this is useful!

dpshepherd commented 3 years ago

Hi Nikita,

Shoot, we wrote the functions but hadn't had time to write the tests. Sorry for being so slow! Things got busy again with the semester starting and I forgot to keep track of this.

Thank you!!

On Mon, Jan 25, 2021 at 7:48 AM Nikita Vladimirov notifications@github.com wrote:

Closed #6 https://github.com/nvladimus/npy2bdv/issues/6.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nvladimus/npy2bdv/issues/6#event-4245974829, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGMK4VTU6NTMDRFJU767SCTS3WADTANCNFSM4UMN33UQ .

nvladimus commented 3 years ago

You are welcome!