I am trying to use the SciFIO library to import image data in one of my projects, i.e. I try to use the library to get access to pixel data of planes. What leads to trouble is the assignment of planes in N-dimensional space. One can get the axes and axes lengths from the ImageMetadata (using the
getAxesLengths() member function), and one can get the position on the various axes of a plane from the
FormatTools.rasterPosition(int imageIndex, int planeIndex, Metadata md) utility function. This works for some file formats (notably tiff and jpeg), however, for others (so far I found avi in this category) there is no match between the
long rasterPosition returned by
FormatTools.rasterPosition and the
Axes information returned by
getAxesLengths(), i.e. the
rasterPostion has only one index whereas there are 4 axes, so how does one discover which axis that single
rasterPosition belongs to?
In general, I am surprised about the feebleness of this design. It seems imperative for anyone working with N-dimensional images to easily discover the indices into these dimensions. As it stands, I can only find easily breakable approaches. Am I missing something or is this really how it should work and am I dealing with a bug in the avi importer?