is it possible to know order of dimensions of a loaded image or an image in a collection?
Depending on the image file the results may be:
- 2D grayscale (row, col)
- 2D multichannel (eg. RGB) (row, col, ch)
- 3D grayscale (pln, row, col)
- 3D multichannel (pln, row, col, ch)
naturally 2D multichannel and 3D greyscale have the same number of dimensions and I wonder whether there is a way to distinguish between these types.
The only way I can think of to check the third dimension and if it is larger than, lets say, 5 assume that it is a 3D grayscale image.
Is there a cleaner way?