[MINC-users] minc2 API - miget_space_name yields unexpected results

EJ Nikelski nikelski at bic.mni.mcgill.ca
Fri Aug 7 11:54:45 EDT 2009


Hi All,

   Andrew, thanks for the explanation.  So, I'm correct in assuming
that the API call *should* be returning the space type that is
generally attached to each dimension.  So, if you look at some sample
minc header output ...

        double zspace ;
                zspace:length = 181 ;
                zspace:varid = "MINC standard variable" ;
                zspace:vartype = "dimension____" ;
                zspace:version = "MINC Version    1.0" ;
                zspace:comments = "Z increases from patient inferior
to superior" ;
                zspace:spacing = "regular__" ;
                zspace:alignment = "centre" ;
                zspace:step = 1. ;
                zspace:start = -72. ;
                zspace:units = "mm" ;
                zspace:spacetype = "talairach_" ;

... miget_space_name *should* be returning the attribute stored under
"zspace:spacetype"="talairach_", correct?  Pls let me know if I'm
looking at the wrong field.  On the other hand, if I am looking at the
correct attribute, then I'd like to suggest:

(1) If the API call does not work, it should either be fixed or removed.

(2) The failure of the call could be indicative of another error.
Specifically, I believe that I ran into this problem approximately a
year ago, and found that the failure was due to an error in the
attribute search function which is called by miget_space_name.  I may
be mis-remembering this, but I'm pretty certain.  I dunno whether this
general attribute search problem was fixed in minc 2.0.16 or not.

(3) Although you suggest that this field is not heavily used, I've (1)
usually seen that it *is* set in the volumes that I'm processing, and
(2) I've never seen it set incorrectly.  As such, it should permit one
to do a quick check to see whether a given volume is in stereotactic
space or not -- which is certainly useful (or can be).

Cheers,

-Jim

On Fri, Aug 7, 2009 at 10:54 AM, Andrew Janke<a.janke at gmail.com> wrote:
> Hi Jim,
>
>>   A quick question for the minc2 users out there.  I'm calling
>> miget_space_name in order to get the space type (tal, native, etc),
>> but am always getting "native____" returned (even for Tal volumes).
>> The doc states that MI_NATIVE is returned if type is not found, so it
>> would seem as if the space type is not being found.
>
> Correct.
>
>> Ok. So where is it looking for the space type attribute?
>
> Attached to each dimension.
>
>>  So, only the volume is passed.  Question is, where is it looking for
>> the space type? Is it looking at each dimension and grabbing the first
>> one where it finds the space type?
>
> In general the spacetype will be set the same for all the (image)
> dimensions. In any case as per:
>
> http://en.wikibooks.org/wiki/MINC/Reference/MINC1-programmers-reference
>
> You will note that the spacetype really only defines if the MINC
> file's co-ordinate system is WRT a scanner (MI_NATIVE) or some other
> space (MI_TALAIRACH for example). In short while the convention may
> have been a good thing to think about when MINC was implemented it is
> not used much (at all). minctracc at one stage set this variable IIRC.
>
> The only program that I know that uses this value is mnc2nii in an
> attempt to set the S-form and Q-Form matrices in some sensical form.
>
> So my advice is to just ignore it unless of course you have a (real
> good!) reason as very few other MINC programs will take notice of this
> variable.
>
>
> --
> Andrew Janke
> (a.janke at gmail.com || http://a.janke.googlepages.com/)
> Canberra->Australia    +61 (402) 700 883
>
> _______________________________________________
> MINC-users at bic.mni.mcgill.ca
> http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>



-- 
=================================
Jim Nikelski, Ph.D.
Postdoctoral Research Fellow
Bloomfield Centre for Research in Aging
Lady Davis Institute for Medical Research
Sir Mortimer B. Davis - Jewish General Hospital
McGill University



More information about the MINC-users mailing list