[MINC-users] mincaverage -avgdim result header
Alex Zijdenbos
zijdenbos at gmail.com
Fri Mar 23 11:15:30 EDT 2012
Hello all,
I just noticed that 'mincaverage -avgdim' leaves lots of header
information in the resulting average for the dimension it averaged
out; which then causes trouble with mincinfo and the like. To me this
looks like a bug in mincaverage, in that when using -avgdim <dim> it
doesn't properly clean up the <dim>-related header attributes.
Specifically:
$ mincaverage -avgdim time test_pet.mnc test_pet_avg.mnc
$ mincinfo test_pet.mnc test_pet_avg.mnc
file: test_pet.mnc
image: signed__ short -32768 to 32767
image dimensions: time zspace yspace xspace
dimension name length step start
-------------- ------ ---- -----
time 4 227.5 150
zspace 90 2 0
yspace 128 -2 -128
xspace 128 -2 128
file: test_pet_avg.mnc
image: signed__ short -32768 to 32767
image dimensions: zspace yspace xspace
dimension name length step start
-------------- ------ ---- -----
zspace 90 2 0
yspace 128 -2 -128
xspace 128 -2 128
So that looks right; we seem to have lost the time dimension. However,
using this mincinfo call:
$ mincinfo -dimnames -dimlength time test_pet_avg.mnc
time xspace yspace zspace
4
Suddenly revives the time dimension. Using mincheader:
$ mincheader test_pet_avg.mnc | grep time
time = 4 ;
int time ;
time:length = 4 ;
acquisition:start_time = "20110207 154039" ;
study:start_time = "154039" ;
double time-width(time) ;
time-width:dimorder = "time" ;
time-width:varid = "MINC standard variable" ;
time-width:vartype = "dim-width____" ;
time-width:version = "MINC Version 1.0" ;
time-width:spacing = "irregular" ;
time-width:filtertype = "square____" ;
"Fri Mar 23 11:07:54 2012>>> mincaverage
-clobber -avgdim time test_pet.mnc test_pet_avg.mnc\n",
time = 0 ;
time-width = 300, 300, 300, 300 ;
I would say that most (if not all) of these time-dimension attributes
should have been removed?
-- Alex
More information about the MINC-users
mailing list