Open tibuch opened 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.
I added a minimum working example of rendering a roughly aligned multiscale 3D volume with TensorStore.
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.
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.
The following should work:
Add 3D tile alignment script.