Open rozmar opened 2 years ago
Now that I look at the images side by side, it looks transposed not rotated.
Yes, this is because imshow expects y,x and GrayscaleImage is x,y (though this could be clearer in the documentation)
Thanks for the quick response! I didn't spot that in the documentation indeed. I am using scanimage for generating these data and it seems like their standard is also (y,x), although (x,y) would make more sense. Quite confusing. So what is the correct way to use it? Should I transpose all my movies and images before putting in the .nwb file? And when someone reads it, they should transpose it back if they want to use imshow? Could I specify the dimensions instead?
Yes, images are often stored with y first. This is consistent with indexing of an array, but I agree it can be confusing nonetheless. If x vs y is important to you, you should transpose the data before saving it, then users would transpose when reading.
@weiglszonja, do you think you could add to the docval of PyNWB Image types to make this dimension order more clear to users of those classes?
Hi there, This is a minor issue and probably can be fixed easily.
If there is an image in an .nwb file (pynwb.image.GrayscaleImage or pynwb.ophys.TwoPhotonSeries), nwbwidgets.nwb2widget displays it 90 degree rotated to the left. with nwb2widget: with imshow: The images are not too revealing, but the dimensions are obviously not right.