fMRI Tutorial:FSL处理功能核磁共振数据

第一步:下载数据
任务:the Flanker task
数据来源:Openneuro

第二步:描述the Flanker task
认知心理学的经典实验,作用为评估忽略干扰刺激的认知能力。
被试的任务:用按键指出图片中最中间的箭头的方向。图片分为两类:
一类是中间箭头方向与左右不一致(Incongruent);一类是中间箭头方向与左右两边一致(Congruent)。
在这里插入图片描述
如果想自己体验这个认知实验,可以访问cognitive fun
任务设计:
在这里插入图片描述
任务之间的间隔时间为8s-14s中随机一个比如10s。
目标:得到两种条件下的Bold信号,并计算它们之间的差异。contrast
即为:Incongruent-congruent,congruent-incongruent。

第三步:预处理数据 ,将所有操作保存为design_run1.rsf文件。
1.提取大脑皮层部分(结构像)
2 头动校正
3 层间时间校正
4 配准和标准化
5 检查预处理的效果

FSL可以直接利用GUI界面完成fmri预处理步骤。
*.

提取大脑皮层部分(结构像)*

1 点击BET brain extraction
2 Fractional intensity设置为0.2
点击Go

这里输入为结构像

头动校正、层间时间校正、配准和标准化

将所有操作保存为design_run1.rsf文件。
1点击 FEAT FMRI analysis
在Data界面输入数据;Output directory设为run1
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
按下done,则有:
在这里插入图片描述
将所有操作保存为design_run1,然后利用for循环可对所有被试进行同样的数据处理。

#!/bin/bash

# Generate the subject list to make modifying this script
# to run just a subset of subjects easier.

for id in `seq -w 1 26` ; do
    subj="sub-$id"
    echo "===> Starting processing of $subj"
    echo
    cd $subj

        # If the brain mask doesn’t exist, create it
        if [ ! -f anat/${subj}_T1w_brain_f02.nii.gz ]; then
        echo "Skull-stripped brain not found, using bet with a fractional intensity threshold of 0.2" 
            bet2 anat/${subj}_T1w.nii.gz anat/${subj}_T1w_brain_f02.nii.gz -f 0.2 #Note: This fractional intensity appears to work well for most of the subjects in the Flanker dataset. You may want to change it if you modify this script for your own study.
        fi

        # Copy the design files into the subject directory, and then
        # change “sub-08” to the current subject number
        cp ../design_run1.fsf .
        cp ../design_run2.fsf .

        # Note that we are using the | character to delimit the patterns
        # instead of the usual / character because there are / characters
        # in the pattern.
        sed -i "s|sub-08|${subj}|g" design_run1.fsf
        sed -i "s|sub-08|${subj}|g" design_run2.fsf

        # Now everything is set up to run feat
        echo "===> Starting feat for run 1"
        feat design_run1.fsf
        echo "===> Starting feat for run 2"
        feat design_run2.fsf
                echo

    # Go back to the directory containing all of the subjects, and repeat the loop
    cd ..
done

echo

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值