create ROI from a 'voxel coordinate x-y-z' text file

Hello all,

I have a text file with voxel coordinates ordered in 3 columns: x y z

For example:
20 60 106
21 60 106
22 60 108
23 60 108
24 60 110

where each column refers to a different spacial coordinate, and I would like to create an ROI from this text file, i.e. an image in NIFTI format which I can open in AFNI or other programs able to read NIFTI files.

Do you know how I can achieve that with command lines or in any other way?

Thanks in advance to anyone who can help !!!

Sounds like 3dundump is your friend for this:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/programs/3dUndump_sphx.html#ahelp-3dundump

–pt

Thanks a lot ptaylor!!!
That was exactly the command that I was looking for! You help me a lot with this (tu):slight_smile: