[MINC-development] MI_ICV_DO_DIM_CONV and slice dimension

Peter NEELIN minc-development@bic.mni.mcgill.ca
Thu, 3 Apr 2003 21:36:44 -0500


On Thu, 3 Apr 2003, Rick Hoge wrote:

> I've been working with the minc ICV functions, and have noticed what to
> me seemed counterintuitive behaviour associated with the
> MI_ICV_DO_DIM_CONV parameter.  My understanding from the documentation
> is that a value of TRUE should flip any dimensions that have a negative
> step size.  However I have noticed that while in-plane dimensions are
> flipped to put the posterior-left corner of a transverse slice at the
> beginning of the buffer, slices are not flipped.

>From the Programmer's Guide:

  It can sometimes be useful for a program to perform dimension
  conversions on three (or perhaps more) dimensions, not just the two
  standard image dimensions. To perform dimension flipping and/or resizing
  on dimensions beyond the usual two, the property MI_ICV_NUM_IMGDIMS can
  be set to an integer value between one and MI_MAX_IMGDIMS.

Note that I really wrote this dimension conversion code for pre-MINC
programs that were not aware that one could store images in more than one
way. At the time, the emphasis was on helping in the MINC transition for
existing 2D programs. I did add the pseudo-N-dimensional stuff, and put
some support in mincreshape to allow command-line access to this
functionality, but now I'm rather inclined to believe that it is broken in
some cases (at least where N>2) and rather regret putting the options in
mincreshape.  Furthermore, that particular bit of code tries to be too
clever and just ends up being unmaintainable. But feel free to use it if
you find that it works (!).

            Peter
----
            Peter Neelin (neelin@bic.mni.mcgill.ca)