I can't quite see the full command, so I'll try to guess. If there is no master dataset, 3dUndump interprets the xyz coordinates in the input file as RAI (Right to left, Anterior to posterior, Inferior to superior). Otherwise, the xyz order matches the master dataset. It might be the text file you are using assumes the order of the master dataset. Instead of using xyz order, if you use the ijk definition for the coordinates (0 to n-1 columns, 0 to m-1 rows, 0 to k-1 slices), the storage order and direction of the master dataset would be assumed. Still 3dUndump may not even be the best way to get your data into an AFNI or NIFTI format. If you have binary data, you could use something like to3d. In any case, if this doesn't work, send some datasets, and Pete Molfese or I will take a look.
Edited 2 time(s). Last edit at 04/19/2022 06:27PM by Daniel Glen.