fmi-basel / gfriedri-em-alignment

Alignment tools used in the Friedrich lab.
Apache License 2.0
3 stars 0 forks source link

3D Tile Alignment #1

Open tibuch opened 2 years ago

tibuch commented 2 years ago

Add 3D tile alignment script.

aloejhb commented 2 years ago

Since the full 3D alignment pipeline is still on its way, could we write a script to roughly align the sections and put them into a volumetric file for exploring? This will help with data quality inspection and rough region of interest selection.

aloejhb commented 2 years ago

I added a minimum working example of rendering a roughly aligned multiscale 3D volume with TensorStore.

aloejhb commented 2 years ago

For roughly aligning sections, this script scripts/run_roughly_align_sections.py on the bo-dev branch can be a starting example. There is an issue though. I crop a small region in the center of each section for computing cross-correlation, with size specified here. However, for large shifts caused by changes in sections size, e.g adding a new row of tiles, the crop_size can be too small. It would be nice to have a smart way, to first try with the small crop size, and if the offset is too large, increase the crop_size until a proper offset is found. In that way, most sections can be aligned with small cropped region with fast speed, and a few sections with large cropped region to accommodate big shifts.

ganctom commented 1 year ago

The registration procedure with diffident crop sizes is a good approach, however due to the imaging issues and deformation of stitched tiles the final shift vector should be computed from shift vectors computed from multiple regions on the section pairs. The precision of rough alignment will be better.

tibuch commented 1 year ago

The following should work:

  1. Compute coarse alignment (via the down-scaling approach) between section pairs. This can run in parallel.
  2. Aggregate transformations to obtain transformation w.r.t. the first section.