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  

|
July 08, 2019 03:36PM
Thanks Peter ! It takes me some time to figure it out. The method I used below is generally robust and I have tested it for several sessions.
I feel it is helpful to put it here as a reference.

# Before the nudging, two issues here
# 1. If the epi data is too far away from its target position, you might want to use the command below to move its origin (the nudge data plugin seems to clip data...)
#    3drefit -dxorigin 20 -prefix epi_shft.nii.gz epi.nii.gz
# 2. it is generally a  good idea to pad the data
#    !3dZeropad -I 20 -P 30 -A 30 -overwrite -prefix epi_pad.nii.gz epi_shft.nii.gz

# Then you can nudge the data manually, Once you are happy, click 'print' button. NudgeDataset prints out something as below in your terminal.
3drotate -NN -rotate 0.44I -33.99R 3.73A -ashift 1.82S 0.00L 20.30P \
    -prefix tmp.epi.rotated.nii.gz -overwrite epi_pad.nii.gz

# Extract the transform of manual nudge
cat_matvec tmp.epi.rotated.nii.gz::ROTATE_MATVEC_000000 -ONELINE > tmp.init.aff12.1D
# Align the anat to the rotated epi
align_epi_anat.py -anat2epi -anat T1.nii.gz -epi tmp.epi.rotated.nii.gz \
    -epi_base 0 -epi_strip 3dAutomask -tshift off -volreg off -deoblique off \
    -anat_has_skull no -suffix _al -overwrite
# Combine the two transforms and invert
cat_matvec tmp.init.aff12.1D T1_al_mat.aff12.1D -ONELINE > mat.anat2epi.aff12.1D
cat_matvec mat.anat2epi.aff12.1D -I -ONELINE > mat.epi2anat.aff12.1D
# Apply the combined transform, warp epi to anat
3dAllineate -final wsinc5 -base T1.nii.gz \
    -1Dmatrix_apply mat.epi2anat.aff12.1D -input epi_shft.nii.gz \
    -prefix epi_al.nii.gz -overwrite

# Clean up
!rm tmp.* T1_al*



Edited 2 time(s). Last edit at 07/10/2019 11:25PM by ruyuanzhang.
Subject Author Posted

partial coverage alignment Attachments

ruyuanzhang June 17, 2019 12:29PM

Re: partial coverage alignment

ptaylor June 17, 2019 01:33PM

Re: partial coverage alignment

ruyuanzhang June 17, 2019 03:07PM

Re: partial coverage alignment

ptaylor June 17, 2019 07:39PM

Re: partial coverage alignment

Peter Molfese June 20, 2019 05:11PM

Re: partial coverage alignment

ruyuanzhang June 21, 2019 01:29PM

Re: partial coverage alignment

ptaylor June 21, 2019 01:51PM

Re: partial coverage alignment

Peter Molfese June 21, 2019 02:05PM

Re: partial coverage alignment

ruyuanzhang June 21, 2019 03:11PM

Re: partial coverage alignment

ruyuanzhang June 27, 2019 03:40PM

Re: partial coverage alignment

Peter Molfese June 27, 2019 04:07PM

Re: partial coverage alignment

ruyuanzhang June 27, 2019 04:57PM

Re: partial coverage alignment

Peter Molfese July 01, 2019 10:20AM

Re: partial coverage alignment

ruyuanzhang July 08, 2019 03:36PM

Re: partial coverage alignment

paul.hamilton July 03, 2019 03:40PM

Re: partial coverage alignment

Peter Molfese July 04, 2019 10:29AM

Re: partial coverage alignment

paul.hamilton July 13, 2019 08:27AM

Re: partial coverage alignment

Peter Molfese July 15, 2019 02:42PM

Re: partial coverage alignment

paul.hamilton July 17, 2019 11:31AM

Re: partial coverage alignment

Peter Molfese July 18, 2019 03:47PM

Re: partial coverage alignment

paul.hamilton July 23, 2019 09:34AM

Re: partial coverage alignment

paul.hamilton July 23, 2019 10:31AM

Re: partial coverage alignment

Peter Molfese July 23, 2019 10:46AM

Re: partial coverage alignment

paul.hamilton July 24, 2019 03:39PM

Re: partial coverage alignment Attachments

paul.hamilton August 05, 2019 09:10AM