juglab / n2v

This is the implementation of Noise2Void training.
Other
392 stars 107 forks source link

5D data is not loaded correctly #48

Closed oliviervenzin closed 4 years ago

oliviervenzin commented 4 years ago

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.

alex-krull commented 4 years ago

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

alex-krull commented 4 years ago

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