3dUndump with floats

AFNI version info (afni -ver): Version AFNI_25.0.07 'Severus Alexander'

3dUndump -prefix test_undump_afni_eval11 -master P112_undump_mask.nii -datum float  bt_P132.txt 

Hello,

I am trying to create a 3d dataset based on the results of my RSA analysis. I create a text file with 4 columns: the first 3 columns are the i,j,k coordinates, and the 4th column is a correlational value. These are very small values, for example between 0 and .06.

When I try to use 3dUndump, I get either nothing (presumably a BRIK full of 0s) or something where all the values are 1. I re-read the help file for 3dUndump and wondered if the data type was a problem. I know before I put the data into the text file it is in float. So I tried adding -datum float but that made things worse. Instead of 1s or 0s in my expected voxels, I got a pattern of streaks.

Please let me know what I am missing. I am sure it must be fairly straightforward to use 3dUndump in this way--I have used it before to make spheres.

Howdy-

Hmm, nothing there sounds bad. I did the following as a test:

  • I made this text file "text_list.txt" of IJK (that is, integer index) locations and float values:
    1 1 1 0.01
    2 2 2 0.02
    3 3 3 0.03
    4 4 4 0.04
    5 5 5 0.05
    
  • then I ran this command, using one of the datasets in the AFNI Bootcamp data:
     3dUndump                           \
         -prefix  test_undump.nii      \
         -master  FT_anat+orig.HEAD    \
         -datum   float                \
         text_list.txt
    

The resulting dataset "test_undump.nii" came out as expected. The correct floating point values were at each location. I tested this by:

  • opening the dset as an underlay in the AFNI GUI
  • clicking "Define Overlay ->" in the GUI controller, so I can see coordinate location values in the expanded bottom/right part of the full GUI panel
  • right-clicking in an image window and selecting "Jump to (ijk UL)"
  • entering in an IJK-format coordinate location like where I had data, like 1 1 1
  • and checking the "ULay" (=underlay) value in the bottom right of the full GUI controller.

For each point I tried this with, things worked fine.

What does your text file look like, perhaps?

--pt

Thanks very much for your reply. I had looked at my text files but apparently not closely enough, and I found the error and fixed it.

Great, glad to hear things are working.

--pt