[MINC-users] minc "make check" error -- not just a Snow Leopard problem

EJ Nikelski nikelski at bic.mni.mcgill.ca
Tue Feb 15 21:15:02 EST 2011


Hi All,

   I started this investigation yesterday, and had a brief exchange of
ideas about it with Andrew.  Now that I understand the problem (I
think, I hope) , I could use some feedback from all of the minc people
who know a lot more than me.

   So, after spending more than a bit of time going over David
MacDonald's code, I think I know what's happening.  Recall that the
problem manifested as a failure of "make check" within volume_io
testing.  Here's what seems to be happening:

(1) Looking at the test volume "t3_grid_0.mnc" we see:

>mincinfo -dimnames t3_grid_0.mnc
vector_dimension zspace yspace xspace

AND

>mincinfo -varnames t3_grid_0.mnc
rootvariable zspace yspace xspace image-min image-max image

Note that the "vector_dimension" dimension does not have a matching
variable of that name, whereas the spatial dimensions do.

(2) Looking at "initialize_minc_input_from_minc_id" within "input_mnc.c" we see:

(a) a loop over the volume's DIMENSIONS (around line 300), in order to
extract matching attributes (dim cosines, mostly)

(b) ncvarid() is used to get the varid, based on the variable name ...
but is being passed a DIMENSION name, not a variable name. So, it
fails with "ncvarid: ncid 4: NetCDF: Variable not found" when passed
the variable name "vector_dimension".

(c) of course, if all dimensions have matching variable names, then
there is no problem. Sadly, our test volume does not.


Solutions:

(1) a quick and easy solution to the current problem would be to
reconstitute volume "t3_grid_0.mnc" so that it has a VARIABLE called
"vector_dimension"

(2) since this affects all of David MacDonald's code, we might
consider implementing a rule that, for minc volumes, all dimension
names *must* have a matching variable onto which one could attach
attributes. This is usually indeed the case, but it might be helpful
to make this explicit.

(3) one could implement code changes to enforce (2), i.e. do not
permit the creation of minc volumes that have dimension names without
matching variable names (David's code already explicitly assumes
this).


What do you think?

-jim



-- 
=================================
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