Consider 3dmaskdump with or without the -xyz option for xyz coordinates. Note this doesn't work for oblique datasets. Instead the xyz coordinates would be shown for the closest cardinal representation. The xyz coordinates are defined by the IJK_TO_DICOM_REAL attribute in the header of AFNI datasets (RAI order)or by the sform_matrix in NIFTI datasets (LPI order). You could do the transformation with the Vecwarp program in either direction (ijk to or from xyz).