[MINC-users] mincaverage error

Alex Zijdenbos zijdenbos at gmail.com
Sat Mar 5 20:10:44 EST 2011


Hi Lisa,

It looks like your files are not all sampled the same way; they
certainly have different coordinate axes it seems. Are they basically
native images, or did they all go through a mincresample step with the
same target (-like option)? Were they registered? mincaverage does  a
voxel-by-voxel averaging, meaning that the voxels do need to line up
across all volumes. You could check this using mincinfo; for the
averaging to work the output of mincinfo in terms of dimension
specifications should be the same across all volumes.

If this is indeed the problem, then I do wonder why mincaverage didn't
give a more meaningful error message.

If your images were not previously registered and resampled to the
same space, there wouldn't be much point in averaging them, as you
would average across the orientation and positional variability you
would have across sites/acquisitions. You'd probably end up with a
fuzzy/funny blob.

If you do want to register them without prior registration, you could
still get this to work by simply resampling all volumes to one of
them, e.g.,

mincresample -like <file1.mnc> <file2.mnc> <file2_resampled.mnc>

and then average across file1.mnc and all your resampled files. Better
would be to resample like above but with a transformation that maps
each brain to a common target.

-- A

On Sat, Mar 5, 2011 at 7:18 PM, Lisa F. Akiyama <lrisa87 at uw.edu> wrote:
> Andrew,
>
> I tried running the filelists with several different file orders, but
> unfortunately the same error kept on occurring.
>
>
> Claude,
> I set the shell environment as you instructed, and ran a bunch of
> minaverages on different subsets of all the files I have.
> I have two sets of data - one from site S (28 files) and another from site I
> (15 files) (a total of 43 files).
>
> When I mincaveraged site S files one by one (2, 3, 4, 5...), no errors came
> up and output files were created just fine.
> When I mincaveraged site I files one by one (2, 3, 4, 5...), also no errors
> came up and output files were created correctly.
> When I mincaverated all site S files (28) and one file from site I (one of
> the 15 files; tested all 15) (a total of 29 files being averaged), the error
> came up for all trials and the output files were black images when displayed
> in register.
> When I took a few files from both site S and site I so that the total number
> of files was 29, mincaverage gave me that error (I have not tested this for
> all possible pairings).
> But when I mincaveraged a few files from site S and a few from site I (I
> have not tested this for all possible pairings - total number of files used
> was not 29 in all trials), it seems like the output files are created fine
> without any errors.
>
> As far as I can tell, it seems like the site S and site I files have slight
> differences in their headers.
> When I view their headers using MIPAV, all seem to be the same except for
> the 'Begin' values in the variable information section (below is an example
> from a site I file):
>
> Variable information:
>> Name: rootvariable VSize: 4 Type: NC_INT  *Begin: 4512*
>>   Attributes:
>> Name: varid Value: MINC standard variable
>>  Name: vartype Value: group________
>> Name: version Value: MINC Version    1.0
>> Name: parent Value:
>>  Name: children Value: image
>> processing
>>   Variable value: -2147483647
>> Name: xspace VSize: 4 Type: NC_INT  *Begin: 4516*
>>   Attributes:
>> Name: varid Value: MINC standard variable
>> Name: vartype Value: dimension____
>>  Name: version Value: MINC Version    1.0
>> Name: comments Value: X increases from patient left to right
>>  Name: spacing Value: regular__
>> Name: alignment Value: centre
>> Name: step Value: 1.0
>>  Name: start Value: -96.0
>> Name: direction_cosines Value: 1.0 0.0 0.0
>> Name: units Value: mm
>>  Name: spacetype Value: native____
>>   Variable value: 0
>> Name: yspace VSize: 4 Type: NC_INT  *Begin: 4520*
>>   Attributes:
>> Name: varid Value: MINC standard variable
>> Name: vartype Value: dimension____
>>  Name: version Value: MINC Version    1.0
>> Name: comments Value: Y increases from patient posterior to anterior
>>  Name: spacing Value: regular__
>> Name: alignment Value: centre
>> Name: step Value: 1.0
>>  Name: start Value: -134.0
>> Name: direction_cosines Value: 0.0 1.0 0.0
>> Name: units Value: mm
>>  Name: spacetype Value: native____
>>   Variable value: 0
>
>
> I'm not sure if all I've written above makes any sense at all or if it even
> helps in trying to debug this odd error that I am seeing.
> Please let me know if I should test all possible pairings for all of the
> functions that I've carried out if that helps.
>
> Thank you.
>
>
> Best,
> Lisa
>
>
> On Sat, Mar 5, 2011 at 8:37 AM, Claude LEPAGE <claude at bic.mni.mcgill.ca>wrote:
>
>> Andrew,
>>
>> > I think this bug might be related to one I have seen as of late (only
>> > on Ubuntu Maverick and the latest Debian release). In combination with
>> > various phases of the moon you get this self same error. Even
>> > something as simple as changing the input files order can make it go
>> > away. I have noticed it more with register than anything else but
>> > still haven't seen anything all that consistent yet to track it down.
>> > :(
>>
>> That's the Coriolis force effect. Why don't you try to run your
>> job on a computer in the northern hemisphere?
>>
>> Lisa: if you can systematically reproduce your bug, then that would
>> be a starting point for us to debug the code. Have you tested mincaverage
>> on a different number of input files, like 2,3,4,..? Just for fun, set
>> the shell environment variable VOLUME_CACHE_THRESHOLD=-1. Caching should
>> have been disabled in minc 2.1.00, but just in case.
>>
>>
>> Claude
>> _______________________________________________
>> MINC-users at bic.mni.mcgill.ca
>> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>>
> _______________________________________________
> MINC-users at bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>
>


More information about the MINC-users mailing list