juglab / n2v

This is the implementation of Noise2Void training.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

5D data is not loaded correctly

oliviervenzin opened this issue · comments

Trying to load 5D data, the dimensions are interpreted wrong.
The dimensions in my tif file are ordered: TCZYX
I run:
`imgs = datagen.load_imgs_from_directory(directory = "E:/PROJECTS/Olivier/n2v images/Training", dims='TCZYX')

Let's look at the shape of the image

print(imgs[0].shape)
and get(5, 2, 2048, 2048, 301)`
which corresponds to TCYXZ
It should be:
TZYXC

Thanks.

Hello Oliver,
Thanks for reporting. I was however not able to reproduce this behaviour (see below).
Could it be that the order of axis in the file was not correct? Fiji, is e.g. giving a order of axis that is different from what you get when you open it with tifffile in python.
image

I think that the way axes are handled currently is a little confusing. We are working on imporving this in the next release.