[MINC-users] mincbbox

Vladimir S. Fonov vladimir.fonov at gmail.com
Mon Jan 9 09:50:44 EST 2017


Hello,

thank you for the bug report, Gabriel included this in the list of 
issues : https://github.com/BIC-MNI/mni_autoreg/issues

Let's see who has time to fix this.

On 2017-01-06 04:49 PM, Jean-Philippe Coutu wrote:
> 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
> _______________________________________________
> 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