3dmaskdump to 3dmaskdump to 3dUndump

I am running a searchlight RSA analysis.

  1. I use 3dmaskdump to get the coordinates of every voxel in the brain mask. My understanding is that this outputs the coordinates in RAI orientation.

3dmaskdump -overwrite -mask /Users/lynna3/Documents/Projects/EF_Math/ref/mask/BN_atlas_group_HaskinsPeds_2.5_mask_RAI+tlrc.HEAD \
-noijk -xyz \
-o /Users/lynna3/Documents/Projects/EF_Math/Processed_Data/EF2001/Y1/proc/EF2001_NUM_Y1.results/RSA/tmp.n_voxel_coord_searchlight \

  1. I then loop through every voxel (e.g., -23.75 -2.5 -41) and use 3dmaskdump again to extract the data for the briks of interest in a 4mm sphere centered on the voxel of interest.

3dmaskdump -overwrite -quiet -nozero -noijk \
-mask /Users/lynna3/Documents/Projects/EF_Math/ref/mask/BN_atlas_group_HaskinsPeds_2.5_mask_RAI+tlrc.HEAD \
-xball -23.75 -2.5 -41 4 \
-o /Users/lynna3/Documents/Projects/EF_Math/Processed_Data/EF2001/Y1/proc/EF2001_NUM_Y1.results/RSA/tmp.roi_1 \

  1. After fitting the model, I then use 3dUndump to write the model fit to the voxel of interest

3dUndump -overwrite -xyz -datum float \
-prefix /Users/lynna3/Documents/Projects/EF_Math/Processed_Data/EF2001/Y1/proc/EF2001_NUM_Y1.results/RSA/RSA_EF2001_Y1_Ratio_searchlight_4_tau_RAI \
-master /Users/lynna3/Documents/Projects/EF_Math/ref/mask/BN_atlas_group_HaskinsPeds_2.5_mask_RAI+tlrc.HEAD \

Here are a few questions I have to make sure I’m doing this correctly:
[li] What is the unit of measure for the radius parameter? Is this in mm or voxels?
[/li][li] Which “-*ball” option should I use when feeding coordinates extracted in 3dmaskdump to 3dmaskdump? I’ve been using -xball because I passed the -xyz in the original 3dmaskdump, but I’m not sure if this is correct.

Thanks in advance for your help,


Based on the names of your datasets, you have used RAI oriented dataset. The xyz coordinates that are in the output are always in RAI. The input to the various box and ball input options allow you to choose whichever is more convenient. The dball and the xball will be equivalent with RAI input, so that’s fine either way. If they weren’t you can force RAI coordinates with -dball. RAI here mean increasing Right-to-left, Anterior-to-posterior, Inferior-to-superior coordinates. 3dUndump only takes the coordinates for input in RAI for now, so using RAI oriented datasets is less confusing anyway.

The radius is in mm, and the input cannot be negative here.