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

Stitching 3-channel 3d Tiffs #50

Open PhilipRuthig opened 5 years ago

PhilipRuthig commented 5 years ago

Hello, first of all thank you very much for providing such a reliable and fantastic tool for the scientific community! I achieved some stunning preliminary results while stitching 3d (single-channel) tiffs. However, I came across an error in the Alignment step (Error: Unable to determine error's type) when trying to stitch multi-channel 3d Tiffs with the GUI version of Terastitcher (1.10.16) on Windows 10. The procedure works fine when using single channels of the same data (z,y,x) and stitch them seperately - which however produces a slight misalignment between channels and takes more time to process. The shape of my images is 459,2560,2160,3 (z,y,x,c), I also tried (c,z,y,x) instead.

More info that might be relevant: I am trying to stitch 3x8 tiles (rows,columns). I stacked the microscopy output images (2d) to 3d tiffs and ordered them according to the two-folder hierarchy specified in the tutorial and used Terastitchers Import function ("000000\000000_000000\000000.tif" for the first 3d multi-channel tiff). For the import, I used the tiff3d option (since there is no multi-channel 3d tiff option)

iannellog commented 5 years ago

I am sorry, but I cannot understand what you have exactly done. Have you read the TeraTools documentation that can be downloaded from the site (panel on the right of the wiki page), and in particular section 1.8? If no, you may perhaps find there useful suggestions. If you do not solve this way, please send me a precise description of how is structured your initial dataset (especially if channels are stored in separate files or in RGB TIFFs). If you have completed the import step without error, please send me the xml_import.xml and the mdata.bin files that have been generated.

-- Giulio

Il giorno gio 27 giu 2019 alle ore 11:12 Philip Ruthig < notifications@github.com> ha scritto:

Hello, first of all thank you very much for providing such a reliable and fantastic tool for the scientific community! I achieved some stunning preliminary results while stitching 3d (single-channel) tiffs. However, I came across an error in the Alignment step (Error: Unable to determine error's type) when trying to stitch multi-channel 3d Tiffs with the GUI version of Terastitcher (1.10.16) on Windows 10. The procedure works fine when using single channels of the same data (z,y,x) and stitch them seperately - which however produces a slight misalignment between channels and takes more time to process. The shape of my images is 459,2560,2160,3 (z,y,x,c), I also tried (c,z,y,x) instead.

More info that might be relevant: I am trying to stitch 3x8 tiles (rows,columns). I stacked the microscopy output images (2d) to 3d tiffs and ordered them according to the two-folder hierarchy specified in the tutorial and used Terastitchers Import function ("000000\000000_000000\000000.tif" for the first 3d multi-channel tiff).

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/abria/TeraStitcher/issues/50?email_source=notifications&email_token=ACDW7VT7XVTACAQXM75XUTLP4R75ZA5CNFSM4H3Z3YRKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G4ASUYQ, or mute the thread https://github.com/notifications/unsubscribe-auth/ACDW7VVYKFGKF5ZSMWMT763P4R75ZANCNFSM4H3Z3YRA .

--


Giulio Iannello Preside della Facolta' Dipartimentale di Ingegneria Universita' Campus Bio-Medico di Roma v. Alvaro del Portillo, 21 00128 Roma, Italy

Tel: +39-06-22541-9602 E-mail: g.iannello@unicampus.it Fax: +39-06-22541-9609 URL: https://scholar.google.it/citations?user=L-UJxIgAAAAJ


PhilipRuthig commented 5 years ago

Sorry for the unclear description. On second read, I know what you are talking about. What I am trying to do is stitch a 3x8 set of RGB co-registered 3d tifs. The channels are all included in a single file for each of the positions. The import works fine, I attached the respective .xml and .bin files. Generation of stitched test slices also works for all three channels. The error I mentioned above (Error: Unable to determine error's type) occurs when trying to continue with the second step (Align).

PhilipRuthig.zip

iannellog commented 5 years ago

Philip, I had a look to the xml file. All seems ok. The only thing that looks weird is that you have 3 channles and 2 bytes per channel, which is not standard RGB in my experience. Are your channels interleaved or stored in separate planes in the TIFF file (the second option is not supported by the current version of our software)?

What is also weird is that the message you get does not seem related with any file format problem.

Other question: have you selected one single channel before launching the Align step (although you should get a different error message in that case, I ask this just to exclude this possibility). Consider that stitching RGB images (3 channels, 1 byte per channel) had been repeatedly tested and it should be done without problems.

One more thing. Since the message you get is raised by the GUI code, try to use the command line alternative:

terastitcher -2 --projin="your xml_import.xml file" --imin_channel=G

Instead of the green channel (G) you may specify R (red) or B (blue) according to which channel is more informative.

As a final suggestion, if you can, let me download somehow one of your tile: I can do some testing even with just one tile.

Best.

-- Giulio

Il giorno gio 27 giu 2019 alle ore 15:22 Philip Ruthig < notifications@github.com> ha scritto:

Sorry for the unclear description. On second read, I know what you are talking about. What I am trying to do is stitch a 3x8 set of RGB co-registered 3d tifs. The channels are all included in single files. The import works fine, I attached the respective .xml and .bin files. Generation of stitched test slices also works for all three channels. The error I mentioned above (Error: Unable to determine error's type) occurs when trying to continue with the second step (Align).

PhilipRuthig.zip https://github.com/abria/TeraStitcher/files/3334742/PhilipRuthig.zip

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/abria/TeraStitcher/issues/50?email_source=notifications&email_token=ACDW7VX4SUF43MRO5M37J33P4S5HRA5CNFSM4H3Z3YRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYXDAWY#issuecomment-506343515, or mute the thread https://github.com/notifications/unsubscribe-auth/ACDW7VSAGIMH5YLKVZXD33LP4S5HRANCNFSM4H3Z3YRA .

--


Giulio Iannello Preside della Facolta' Dipartimentale di Ingegneria Universita' Campus Bio-Medico di Roma v. Alvaro del Portillo, 21 00128 Roma, Italy

Tel: +39-06-22541-9602 E-mail: g.iannello@unicampus.it Fax: +39-06-22541-9609 URL: https://scholar.google.it/citations?user=L-UJxIgAAAAJ


PhilipRuthig commented 5 years ago

Hi Giulio, I selected a single channel before launching the alignment step (However not selecting one still produces the same error). I also tried the command line version, which however cancels in the initialization step without producing an error, see attached screenshot.

I am unclear on what you mean with interleaved data. The Python script I used for preprocessing the raw data into the two-folder hierarchy uses the tifffile library to save the respective files. For the save function there's a keyword to specify if data is saved interleaved or in seperate planes. Is this what you mean? If yes, that is already set to the interleaved setting.

planarconfig : {'CONTIG', 'SEPARATE'} Specifies if samples are stored interleaved or in separate planes. By default, this setting is inferred from the data shape. If this parameter is set, extra samples are used to store grayscale images.

I also uploaded a single stack of my data and will send you a download link via mail (g.iannello@unicampus.it) so you can have a look at it.

Regards Philip

cmd_or3fRMKC5P