[MINC-development] mincresample issue/bug at smaller voxel sizes using concatenated transforms

Matthijs van Eede matthijs at phenogenomics.ca
Tue Dec 21 13:50:55 EST 2010


Hi all,

We recently ran into an interesting resampling issue using 60 micron 
data. We have a concatenated transform that uses a few non linear 
transformation grids, and created a equivalent transformation with a 
single transformation grid from it (using minc_displacement written by 
Jason). However, resampling using the concatenated transform gave a 
visually noticeable different result from resampling with the transform 
with a single non linear grid. In many places there was a discrepancy of 
about a voxel. Main note about all this is that (understandably) the 
more transforms are being concatenated, the larger the error in the 
resampling.

Looking at the function grid_inverse_transform_point in 
grid_transforms.c, we found that there is a tolerance variable (ftol at 
line 254) set to 0.05 (defined in mm). Assuming that the default voxel 
size is 1mm, we adjusted the value of ftol to 0.06*0.05=0.003. This 
mostly eliminated the differences between resampling with 
concatenated/single transformation grids. Setting the value smaller 
still, removed any remaining differences.

A fix for this problem would be to have the ftol variable be dependent 
on the voxel size of the input file, i.e., ftol = voxelsize*0.05 (or an 
even smaller value), but the function does not receive any information 
about the volume, so to be able to do that the api would need to be 
changed. Not sure whether that is a desired solution, or whether there 
is an alternative solution.

Any input would be appreciated,
Matthijs




More information about the MINC-development mailing list