abria / TeraStitcher

A tool for fast automatic 3D-stitching of teravoxel-sized microscopy images
http://abria.github.io/TeraStitcher/
Other
78 stars 32 forks source link

Disable subsampling for Z axis + --isotropic problem #81

Open richardbeare opened 3 years ago

richardbeare commented 3 years ago

Hi, I am working with data from a Dragonfly that is typically stitched with Fusion stitcher. However we want to do some processing for each block before stitching. I've successfully generated an xml import file that leads to teraconverter assembling the correct tile ordering (currently I am not doing the autoalignment step, just testing the xml structure at present). The images are all imaris/hdf5, with tiles 2048x2048x112. The result stitched by Fusion creates a multiresolution image which only subsamples x and y, leaving the z constant. Is it possible to achieve the same with teraconverter?

voxel size is 1.62x1.62x6.01

I thought the --isotropic option may be close enough, but it doesn't seem to be working. If I request a resolution of 4, I end up with 6 slices, close to the 7 predicted by 112/16. The same result happens both with and without --isotropic.

My command line looks like

teraconverter -s=${DEST}/Tera/xml_import.xml -d=${DEST}/Tera/stitched.ims --imin_plugin=IMS_HDF5 --sfmt="TIFF (unstitched, 3D)" --dfmt="HDF5 (Imaris IMS)" --isotropic --resolutions=01234 --mdata_fname="./slice 8_F00.ims"

I am using TeraStitcher-portable-1.11.10-Linux.

Any suggestions?

iannellog commented 3 years ago

You are right. The effect of --isotropic option has been disabled for generation of Imaris IMS files (it works for other output formats). I do not remember why this was done and I have to check if re-enabling the code does not introduce some bug. I am not sure I can do these checks in the next days, but I will try. Tell me if you want completely disable merging along Z or simply generate approximately isotropic images (i.e. merge of Z planes is disabled only until the voxel become approximately isotropic) Let me also know if pushing the modified code to GitHub is enough for you (in other words you can recompile the executables) or you need that I generate a new binary distribution.

richardbeare commented 3 years ago

Thanks for the quick response. I'd like to experiment with both options, but will be happy with whatever you can provide first. I am happy to attempt compiling (had problems on a cluster but will probably be OK on a local host).

Also, a second option will be to use another tool to create the reduced resolution layers in IMS files. Are you aware of any such tool?