Paul,
I think that I maybe solved the problem now. The problem was that I extracted the networks’ coordinates with the 3dmaskdump option
-xyz
enabled.
By "networks coordinates" I mean the coordinates of the 7 AFNI Schaefer-Yeo networks that I initially created, plus a combination of all 7 networks together, where I added the 7 single networks together with 3dcalc because I also wanted to investigate the complete cerebral cortex in addition to the 7 individual networks.
Hence, the voxel coordinates were extracted in the radiological convention.
Conversely, when one extracts AFNI preprocessed time-series data with 3dmaskdump _without_ adding the option "-xyz", the extracted voxel coordinates by 3dmaskdump are in the neurological (ijk) convention, and not in the radiological (xyz) convention, correct?
Hence, there is a mismatch between ijk and xyz, or between the functional data extracted by 3dmaskdump and the network coordinates that I extracted with with using -xyz. Thats why adding y = y-1 and all those fuzzy steps were required in Python.
------------------------
Now, when I no longer applied "xyz" in the 3dmaskdump script where I extracted the voxel coordinates from the single 7 networks plus the combination of all 7 sevenworks (labeled "global"), no mismatch, warning messages in 3dUndump, whatsoever occur anymore. Also, I do not have to mirror the x, y, or z axis coordinates in Python.
Furthermore, checking all kinds of files with
3dinfo \
-same_all_grid \
-prefix \
ACW_Awake_Global.nii \ # the new NIFTI file created by 3dUndump
Global.nii # the combination of the 7 individual networks, where the 7 individual networks were combined using 3dcalc
yields no mismatch. Also, a visual inspection of both files (ACW_Awake_Global.nii vs. Global.nii) in AFNI shows that all voxels are 100% aligned in space, that no voxels diverge between the two nifti files, and that everything seems to be exactly in place.
Even though I sort of created those files using a inconvenient way, because I extracted the voxel coordinates from the network files (such as from "Global.nii"), the error or mistake simply was that I initially added the option "-xyz" precisely in this step. And this messed everything up.
Please let me know what you think, even though I understand this thread is hard to follow now, because it all was a big fuzzy mess.
Edited 1 time(s). Last edit at 04/11/2023 04:02AM by Philipp.