[MINC-users] mincbbox

Alex Zijdenbos zijdenbos at gmail.com
Mon Jan 9 10:29:18 EST 2017


Hello,

What is the answer to the conceptual question though - should mincbbox
report a bounding box to the voxel centers, or voxel edges (0.5 step larger
on each end of a dimension)? From the way it is implemented I would say the
original intent was the latter. Or, perhaps it would make sense to add an
option an option for the user to choose, making sure the default behaviour
(on 1mm isotropic volumes) doesn't change?

-- A

On Mon, Jan 9, 2017 at 9:50 AM, Vladimir S. Fonov <vladimir.fonov at gmail.com>
wrote:

> 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
>>
>>
> _______________________________________________
> 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