PreibischLab / BigStitcher

ImgLib2/BDV implementation of Stitching for large datasets
GNU General Public License v2.0
68 stars 15 forks source link

Image registration export as tiff #138

Open sophietheis opened 6 months ago

sophietheis commented 6 months ago

Hello,

Is it possible to export as tiff the registered image generate with BigStitcher ?

We have 3D+T images that have been converted into hdf5 format using BigStitcher. In BigStitcher we implement two sequential registration steps (Fast descriptor based registration followed by Assign closest point with ICP) to time register each movie. We have then used semi-automated tracking in Mastodon to track the movement of cells of interest.

Now, we want to spatially register all the movies to have a common reference frame. So I need to work from the register image generate by BigStitcher as the tracking is based on it. We have tried to implement the registration matrixes from the xmls on the raw tiff images in Python and superimpose the tracks from Mastodon, but the correspondence between tracks and image is completely off, and the registered images is moving much more than the original. Our xmls files look like this : image

The workflow we tried is : 1- reslice the z-slice using calibration → pixel size is the same in x, y and z 2- apply affine transformation → matrix “AffineModel3D regularized with an RigidModel3D” 3- apply affine transformation → matrix “AffineModel3D”

We tried changing the order of the matrices, using inverted matrices, inverting the x and z axes, and the correspondence between tracks and image is still off. Maybe we haven’t used the right combination. Is anyone already tried to apply registration matrices from xml on the raw tiff image in Python (or imageJ) in order to save it as tiff? Otherwise, we wondered if there is a way to directly export the registered image into tiff from BigStitcher.

Thanks, Sophie