vedo icon indicating copy to clipboard operation
vedo copied to clipboard

Axes order of numpy array

Open snownontrace opened this issue 1 year ago • 2 comments

Hi Marco,

I noticed that vedo.Volume uses the xyz order instead of conventionally used zyx. For example, when loading an image with vedo.load(image), the array order is xyz, but the io.imread(image) from skimage and tifffile etc. returns zyx. I am swapping x and z for now, but it might be the best to use zyx order by default.

Thanks! Shaohe

snownontrace avatar Aug 24 '24 16:08 snownontrace

Hi! You are right and this is quite annoying.. vedo always assumes real world coordinates and I'm afraid it is too late to change convention on this one.. But I understand it can be a source of confusion. I can add some documentation and maybe a keyword option , something like Volume(..., assume_zyx=True) is maybe helpful?

marcomusy avatar Aug 25 '24 16:08 marcomusy

Yes, that would be very helpful! If more vedo users process scientific image data, it might be worth making assume_zyx=True by default.

snownontrace avatar Aug 25 '24 21:08 snownontrace