AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
August 17, 2021 10:14AM
Dear all,

I set up my own AFNI_proc.py to preprocess fMRI data of one subject. The problem is that the outcome of the preprocessed data, which was preprocessed by AFNI_proc, produces a faulty/strangely misaligned brain as you can see on the screenshot below. This problem does not exclusively appear for one single subject only, but for all subjects of the dataset that I tried to process.

This is my AFNI_proc.py setup (the whole Regress part is not shown here, as the problem already occurs very early in the processing pipeline. There is also only one run to reduce the processing time for fixing this problem – don't be surprised). Where does the problem occur? -despike and -tshift seem to work fine; when I open the corresponding files via AFNI to inspect them visually, the brain is perfectly normal in its shape and position. However, in the subsequent file, that is, "pb03.Subject_1.r01.volreg+tlrc", what you see is the brain in the here provided screenshot. The brain is misaligned/rotated on all planes.

My AFNI_proc.py setup:

# Set directories
directory_subjects=/users/philipp/desktop/fmri/dataset/subjects/subj2_exp1
directory_fMRIruns=$directory_subjects/raw
directory_anatomical=$directory_subjects/raw
directory_stimulionsets=/users/philipp/desktop/fmri/dataset/info
cd $directory_subjects


# Correct Dataset Centers (@Align_Centers) for Preprocessing
cd $directory_subjects/raw
@Align_Centers -base MNI152_2009_template.nii.gz \
-dset $directory_anatomical/3dto3d+orig -prefix centered_3dto3d
@Align_Centers -base MNI152_2009_template.nii.gz \
-dset $directory_fMRIruns/run1to3d+orig -prefix centered_run1to3d


# AFNI_proc.py
afni_proc.py \
-subj_id Subject_1 \
-out_dir $directory_subjects/Preprocessing \
-dsets \
$directory_fMRIruns/centered_run1to3d+orig \
-blocks despike tshift align tlrc volreg mask blur scale regress \
-copy_anat $directory_anatomical/centered_3dto3d+orig \
-tcat_remove_first_trs 4 \
-align_opts_aea -cost lpc+ZZ -giant_move \
-tlrc_base MNI152_2009_template.nii.gz \
-tlrc_NL_warp \
-volreg_align_e2a \
-volreg_align_to MIN_OUTLIER \
-volreg_tlrc_warp \
-volreg_post_vr_allin yes \
-volreg_pvra_base_index MIN_OUTLIER \
-blur_size 4.0 \

Do you have an idea where the problem could be? Is there something wrong within my code for AFNI_proc.py itself? I used "Align_Centers" just before running AFNI_proc.py. However, that did also not help to solve the problem.

Thanks,

Philipp
Attachments:
open | download - Brain.png (184.5 KB)
Subject Author Posted

AFNI_proc.py - A faulty warped brain Attachments

Philipp August 17, 2021 10:14AM

Re: AFNI_proc.py - A faulty warped brain

ptaylor August 17, 2021 01:48PM

Re: AFNI_proc.py - A faulty warped brain

Philipp August 18, 2021 05:51AM

Re: AFNI_proc.py - A faulty warped brain

rick reynolds August 18, 2021 10:39AM

Re: AFNI_proc.py - A faulty warped brain Attachments

ptaylor August 18, 2021 07:59PM

Re: AFNI_proc.py - A faulty warped brain

ptaylor August 18, 2021 08:20PM

Re: AFNI_proc.py - A faulty warped brain

Philipp August 19, 2021 08:41AM

Re: AFNI_proc.py - A faulty warped brain

rick reynolds August 19, 2021 09:05AM

Re: AFNI_proc.py - A faulty warped brain Attachments

Philipp August 20, 2021 11:26AM

Re: AFNI_proc.py - A faulty warped brain

rick reynolds August 20, 2021 02:58PM

Re: AFNI_proc.py - A faulty warped brain

ptaylor August 20, 2021 03:19PM

Re: AFNI_proc.py - A faulty warped brain

Philipp August 21, 2021 03:24AM

Re: AFNI_proc.py - A faulty warped brain

rick reynolds August 21, 2021 06:59PM