Skip to content

Instantly share code, notes, and snippets.

@stowler
Created April 16, 2013 17:16
Show Gist options
  • Save stowler/5397713 to your computer and use it in GitHub Desktop.
Save stowler/5397713 to your computer and use it in GitHub Desktop.
mm->vox integers per AFNI 3dmaskdump INPUT
AFNI 3dmaskdump INPUT
------------------------------------------------
Appears to use system rounding rint() to convert coordinate floats to integers:
If user inputs mm coordinates as 3dmaskdump argument, 3dmaskdump converts them to
integer "index coordinates" using serial calls to three functions:
1) THD_dicomm_to_3dmm() (from thd_coords.c)
2) THD_3dmm_to_3dfind() (from thd_coords.c)
3) rint() (from system's buit-in c math, or from faked version in mri_free.c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment