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

Stack.read() Raises "Starfish does not support tiles that are not identical in shape" When using a Z-stack #24

Open
EyalFisher-zz opened this issue Aug 10, 2018 · 3 comments

Comments

@EyalFisher-zz
Copy link

I tried using starfish on a MERFISH image with Z = 4, C = 2 (4 depth planes and 2 fluorophore channels).
First I used the function write_experiment_json(), to seperate the image to 8 different images and create the relevant JSON. The JSON states the shapes corretly to be (2048, 2048).

Next, when running Stack.from_experiment_json() and pointing to experiment.json, I get the error
"ValueError: Starfish does not support tiles that are not identical in shape".
The size of tile.tile_shape is (2048, 2048), but the size of self._tile_shape (coming from slicedimage) is (8, 2048, 2048).

I'm attaching the resulted hybridisation
hybridization-fov_000.txt

JSON, and happy to supply any other needed information.
Many thanks,
Eyal.

@ttung
Copy link
Collaborator

ttung commented Aug 10, 2018

Hi Eyal,

Thanks for the bug report! I had to use synthetic data since I don't have your images, but I could get this to work with your hybridization-fov_000.txt. My guess, based on the code, is that one of your TIFF files is actually shaped (8, 2048, 2048). Unfortunately, we do not validate that the image file shape matches what the json file dictates, and we implicitly trust the image file shape over what the json file dictates. If you don't mind sharing your images, I can diagnose this further. Otherwise, please verify that the tiles are actually shaped (2048, 2048).

@EyalFisher-zz
Copy link
Author

Hi Tony,
Unfortunately I cannot share the images, but I did verify that all of the generated images (hybridization-fov_000-Z0-H0-C0.tiff, etc.) are valid (2048, 2048) images. Overall there are 8 of them. I can also share my screen and let you take over if that's helpful.

Many thanks,
Eyal.

@dganguli
Copy link

Hi Eyal, thanks for pointing out this bug! It's hard for me to intuit what's going on here without looking at the data. Is it possible for you to send us a version of the data that's the same shape and size, but zero-ed out, permuted, has added nosie, or something like that? Additionally, can you send the piece of code that loads this data and re-produces the error? Thanks!

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

3 participants