Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with organization of files and giving TeraSitcher the correct parameters #13

Closed
puifais opened this issue Mar 15, 2017 · 15 comments
Closed

Comments

@puifais
Copy link

puifais commented Mar 15, 2017

Hello,

I am looking for help with the organization of my files and how to give TeraStitcher GUI the correct parameters. The images I'm testing this on has 1 row, 2 columns, and 5 slices each. (I made a little drawing so it's easy to understand)

fullsizerender

I renamed the files so that I end up with a folder called "rootIm". Inside this folder, there is 1 folder called "000001". Inside this folder, there are 2 more folders called "000001_000001" and "000001_000002." Please see attached drawing.

fullsizerender 1

And inside this folder, I renamed the files (see pic).

fullsizerender 2

I selected tiff2D and TiledXY|2D series option

terastitcher selection

and generated the preview slice but the result is backward (i.e. left and right are switched). I also notice that the resulting image size is 1300x1300 instead of 1300-pixel in y and 2470-pixel in x since the overlap is 10%.

switched

Here are the full left image:

full left

And the full right image:

full right

What am I doing wrong? I also guessed that perhaps I needed to tell TeraStitcher that my overlap is only 10% which is 130 pixels. But the "Tile overlap (voxels):" under the Importing tab did not allow me to edit the value.

Here are other information about the images:
1300x1300 pixels
x pixel = 1.01 um
y pixel = 1.01 um
z step = 4.64 um
8-bit
gray scale, 1 color

@pawlowska
Copy link

my understanding is that the folder names have to reflect starting XY positions, like here: https://github.com/abria/TeraStitcher/wiki/Supported-volume-formats#two-level-hierarchy-of-folders

so basically, the first folder can be called 000000, and then, if you moved the stage by 1234 micrometers, the second is named 012340 and the third 024680.

@puifais
Copy link
Author

puifais commented Mar 16, 2017

Thank you! I renamed the files as you suggested and got the orientation and overlap correctly now.

correct orientation

When I got to the aligning step, I clicked start without changing any options and this is the error I receive:

aligning error

If I change the Number of slices per layer to 5 since I only have 5 slices total in this test image, this is the error I receive. Note, I did not change any Advanced options. I just clicked it to show you guys the settings.

aligning error5

Why is this?

(Thank you so much for your help. I'll do a write-up summary when this all works so that it'll help other people learning how to use this stitcher!)

@pawlowska
Copy link

Ok, this is harder, but: I think the "number of slices per layer" doesn't matter (it will matter when you have more slices, for defining how big the sub-z-stacks should be), but try changing the search region size, where it says "20(Z)", to a smaller number. If this doesn't help, we need the experts: @abria or @iannellog :)

BTW: if this is indeed the error, is it possible to make the error more clear, or to automatically limit the search region?

@puifais
Copy link
Author

puifais commented Mar 16, 2017

Unfortunately 20 is the minimum allowed in X, Y, and Z. May be I should try this with 30 slices instead of 5 slices? I'll go try it out and let you know. Meanwhile, if @abria or @iannellog has suggestions, please let me know!

@iannellog
Copy link
Collaborator

iannellog commented Mar 17, 2017 via email

@pawlowska
Copy link

pawlowska commented Mar 17, 2017

@puifais I am able to decrease Z search region (and start the alignment) in version 1.9.63 to 10 without problem.

temp

@abria
Copy link
Owner

abria commented Mar 17, 2017

The latest error "images in stack have not the same dimensions" may be a more serious concern. Do all your image files have the same X and Y dimensions, in each stack?

@abria
Copy link
Owner

abria commented Mar 17, 2017

Following what @iannellog said, I made available for you the latest (untested) GUI version v1.9.67, which allows you to set the Search Region to 0 along Z. Please try this one and let us know.

https://www.dropbox.com/s/zkcm0dkb4i51e3b/TeraStitcher-Qt5-standalone-1.9.67-win64.exe?dl=1

@puifais
Copy link
Author

puifais commented Mar 18, 2017

@abria, yes all the image files have the same X and Y dimensions as well as Z steps. I will try out the latest GUI version. I'm also writing a little python script to reorganize files into acceptable format for TeraStitcher. Not done yet but I'll finish it soon. Any ideas on why it'd think that the files are of different dimensions?

@iannellog, I'm trying to come up with a simple solution for the people who use the Salk's Biophotonics core and it'd be a lot easier for the majority of the users here who may not even know what command line is. My plan is to make a simple instructions available to all users who acquire light sheet images (e.g. which orientations to acquire, export the image with the exact same options every time, run the script to change file organization, then use TeraStitch). Or at least that's the plan for now :)

@iannellog
Copy link
Collaborator

iannellog commented Mar 20, 2017 via email

@pawlowska
Copy link

@abria I installed the 1.9.67 version on my machine (Win7), but unfortunately it doesn't even start. I get the unspecific Windows error message "the program stopped working".

@abria
Copy link
Owner

abria commented Mar 20, 2017

Please re-download the installer from the same LINK. Now it should work. I have also added some more details in the images in stack have not the same dimensions error. In case it occurs, it will also print the expected vs. the actual image dimensions.

@pawlowska
Copy link

@abria works now and smaller search region also works, see screenshot. If @puifais can confirm that, then I suppose you can include the new version in the download section.
przechwytywanie

@puifais
Copy link
Author

puifais commented Mar 20, 2017

It works! I redownloaded 1.9.67 and it stitched the files just fine after decreasing the search region to 5x5x5 voxels! Thank you. I checked the resulting image and it looks pretty good. There is a slight mismatch and I wonder if I did something wrong. I left all parameters to default settings this time with the exception of the search region. Here are my raw data and xml file from the importing step in case you have suggestions. I traveling for a workshop this week but will do a little write-up and share it when I get back in case it's helpful to others who want to use this algorithm. Thank you so much!

@puifais
Copy link
Author

puifais commented Mar 28, 2017

Also, in case it's helpful to anyone, here's a script I wrote to reorganize and rename files acquired with Zeiss Lightsheet Z.1. Here's the instruction. I hope it's easy to understand. I'll be updating these as issues arise :)

@puifais puifais closed this as completed Mar 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants