PreibischLab / BigStitcher

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

Separate downsampling for XY and Z in fusion #42

Open mpinkert opened 5 years ago

mpinkert commented 5 years ago

In our large microscopy grids at LOCI, we often want to downsample the XY tiles, but there are relatively few slices in Z. It would be very helpful to have the option to downsample at different resolutions.

How feasible is it to separate downsampling in XY with Z during the fusion step?

I've started parsing through the code logic in DownsampleTools/FusionTools, and it looks like there's unused scaling transforms for the image (use) and the bounding box (use) that can do the trick. It would just need to be added to the code/GUI as an option. Am I correct to the difficulty here, or were these functions intended for something else?

We may try to do this fix ourselves, but it would be good to know if it is as simple as it looks. I will probably further investigate myself in a week, once I get back from a trip.

StephanPreibisch commented 5 years ago

Hi, this is already included with the option "Preserve original anisotropy" in the Fusion dialog. Alternatively, just apply a transformation (right click on all views) that scales the image in z before fusion. Does this help?

mpinkert commented 5 years ago

Hello,

The transformation idea helps a lot and can solve the problem in the short term.

The idea of a separate Z downsampling option may still be helpful though. The preserve original anisotropy idea helps in some cases, though there are other cases when it gets clunky. For example, trying to downsample an 0.5/0.5/12.5 micron image. We can't preserve the original anisotropy because downsampling will blur too much of the image in Z. On the other hand, making it isotropic and downsampling by 8x would still involve stitching three times as many layers as we'd actually need.

I may soon try to help test ideas like this out; Kevin and I are talking about ways I could help with your drive to improve BigStitcher for the microscopy stitching applications.

Best, Michael