[MINC-development] MI_ICV_DO_DIM_CONV and slice dimension

Rick Hoge minc-development@bic.mni.mcgill.ca
Thu, 3 Apr 2003 21:41:14 -0500


Thanks Peter,

I ended up turning MI_ICV_DO_DIM_CONV off, which made it simpler to 
just base things on step signs in the rest of my code.  It also leads 
to much faster file loading.  The reason this came up is that I was 
looking over some Emma (matlab) stuff, and noticed the behaviour 
described (image bytes were always ordered as if positive steps, but if 
slice dim was negative it still needed adjustment).  Anyone still using 
Emma may find this useful to know.

Cheers,

Rick

On Thursday, April 3, 2003, at 09:36  PM, Peter NEELIN wrote:

> 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)
>
> _______________________________________________
> MINC-development mailing list
> MINC-development@bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-development
>
______________________________________
Richard D. Hoge, Ph.D.
Instructor, HMS Department of Radiology
A. A. Martinos Center for Biomedical Imaging
149 13th St.
Charlestown MA 02129
phone 617-726-6598
fax    617-726-7422
______________________________________