[MINC-users] mincbbox

Jean-Philippe Coutu jp at biospective.com
Fri Jan 6 16:49:22 EST 2017


Dear MINC users,

There seems to be a few problems with the current implementation of
mincbbox (
https://github.com/BIC-MNI/mni_autoreg/blob/develop/mincbbox/mincbbox.c).
Right now, it seems to work only on volumes with a step of 1mm.

1) The first issue is with the option -mincresample, where it will print a
step of 1.0 regardless of the actual step of the volume:

print ("-step 1.0 1.0 1.0 -start %f %f %f -nelements %d %d %d\n",
minx, miny, minz, VIO_ROUND(maxx-minx)+1, VIO_ROUND(maxy-miny)+1,
VIO_ROUND(maxz-minz)+1);

The step should probably be
(max{x,y,z}-min{x,y,z})/(v_max{x,y,z}-v_min{x,y,z}).

2) Also, it seems to report the wrong -nelements (should probably be
v_max{x,y,z}-v_min{x,y,z}+1 like above for -mincreshape).

3) Another issue is that it returns by default the wrong extent if the step
is not 1mm:

if (two_lines)
print ("%f %f %f\n%f %f %f\n",minx, miny, minz, maxx-minx+1, maxy-miny+1,
maxz-minz+1);
else
print ("%f %f %f %f %f %f\n",minx, miny, minz, maxx-minx+1, maxy-miny+1,
maxz-minz+1);

"max{x,y,z}-min{x,y,z}+1" should probably be replaced by
"max{x,y,z}-min{x,y,z}+step{x,y,z}" to report the extent of the voxel
dimensions (edge to edge) in world coordinates as I think is intended or
simply "max{x,y,z}-min{x,y,z}" to report the extent between the voxel
centers.

I am unclear on which one is intended to be returned for this one though,
thoughts?

Best regards,
JP


More information about the MINC-users mailing list