[MINC-development] micopy_all_var_values dies if non-standard variables are present in MINC files
Rick Hoge
minc-development@bic.mni.mcgill.ca
Fri, 23 Jan 2004 13:12:21 -0500
Thanks for the quick reply! I put an example at the following URL:
http://www.nmr.mgh.harvard.edu/~rhoge/stuff/fileWithNewVariable.mnc
Perhaps I have screwed the file up in some way, but the single
modification of writing the file without any new variable seems to fix
my problems with micopy_all_vars.
Actually, any comments on the validity of this file would be welcome -
building MINC files from scratch (as this was done) has seemed a bit
tricky. One thing you may notice in this sample is that the xspace,
yspace, and zspace lists contain all zeros (what uses these lists? I
guess these are to support non-uniform slice sampling?). Also I was
lazy and wrote the same min and max values for all images:
Rick
P.S. Here's an excerpt of the end of the minc header - how should these
lists be defined?
data:
zspace = 0, 0, 0, 0, 0, 0, 0 ;
yspace = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;
xspace = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;
rootvariable = 0 ;
image-min = -5.20979118347168, -5.20979118347168, -5.20979118347168,
-5.20979118347168, -5.20979118347168, -5.20979118347168,
-5.20979118347168 ;
image-max = 18.2953414916992, 18.2953414916992, 18.2953414916992,
18.2953414916992, 18.2953414916992, 18.2953414916992,
18.2953414916992 ;
MyNewVariable = 0 ;
On Jan 23, 2004, at 12:58 PM, Robert VINCENT wrote:
> Rick,
>
> Yes, it should work, but it wouldn't surprise me if it didn't!
>
> Please send one (or more) of your files and I'll see if I can fix it.
>
> -bert
>
> On Fri, 23 Jan 2004, Rick Hoge wrote:
>
>>
>> Hi -
>>
>> For a while we've been motivated to add 'custom' variables to MINC
>> files to embed information about the experiment or analysis in a
>> convenient way. It seems though that non-standard variables prevent
>> some of the MINC tools from running.
>>
>> The following is an example: the file tmap.mnc has a variable added
>> containing information about the analysis performed, and we are
>> running
>> MINC Version 1.0
>>
>> mincresample -like norm30.mnc tmap.mnc junk2.mnc
>> micopy_all_var_values: MINC package entry point
>>
>> Note that we don't want to use the history variable because we want a
>> specific parameter that can be queried in subsequent analysis steps.
>> I
>> was under the impression the MINC/NetCDF should be extensible in this
>> way without breaking tools that don't know about all the variables
>> present.
>>
>> How should this be handled - does the MINC standard prohibit new
>> variables? Thanks for any advice. I can put such a file on /scratch/
>> if anyone is interested.
>>
>> Rick
>>
>>
>> _______________________________________________
>> MINC-development mailing list
>> MINC-development@bic.mni.mcgill.ca
>> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-development
>>