Skip to content
Snippets Groups Projects
Commit 11af553f authored by Stephen Smith's avatar Stephen Smith
Browse files

changed order of slice timing correction and motion correction. updated...

changed order of slice timing correction and motion correction. updated fsl:exec calls to integrate with new runfsl/SGE stuff
parent 94d85efa
No related branches found
No related tags found
No related merge requests found
......@@ -138,6 +138,26 @@ set fmri(filteringf) [ $w.nb subwidget filtering ]
set fmri(filtering_yn) 1
#{{{ motion correction
frame $w.mc
set fmri(mcf) $w.mc
global fmri(mc)
tixOptionMenu $w.mc.menu -label "Motion correction: " -variable fmri(mc)
$w.mc.menu add command 0 -label "None"
$w.mc.menu add command 1 -label "MCFLIRT"
set fmri(mc) 1
pack $w.mc.menu -in $fmri(mcf) -side top -side left
$w.bhelp bind $w.mc -msg "You will normally want to apply motion correction; this attempts to
remove the effect of subject head motion during the
experiment. MCFLIRT uses FLIRT (FMRIB's Linear Registration Tool)
tuned to the problem of FMRI motion correction, applying rigid-body
transformations."
#}}}
#{{{ slice timing correction
frame $w.st
......@@ -181,26 +201,6 @@ where the first line states which slice was acquired first, the second
line states which slices was acquired second, etc. The first slice is
numbered 1 not 0."
#}}}
#{{{ motion correction
frame $w.mc
set fmri(mcf) $w.mc
global fmri(mc)
tixOptionMenu $w.mc.menu -label "Motion correction: " -variable fmri(mc)
$w.mc.menu add command 0 -label "None"
$w.mc.menu add command 1 -label "MCFLIRT"
set fmri(mc) 1
pack $w.mc.menu -in $fmri(mcf) -side top -side left
$w.bhelp bind $w.mc -msg "You will normally want to apply motion correction; this attempts to
remove the effect of subject head motion during the
experiment. MCFLIRT uses FLIRT (FMRIB's Linear Registration Tool)
tuned to the problem of FMRI motion correction, applying rigid-body
transformations."
#}}}
#{{{ BET brain extraction
......@@ -268,7 +268,7 @@ pack $w.temp.label $w.temp.hplabel $w.temp.hp_yn $w.paradigm_hp -in $w.temp -sid
#}}}
pack $fmri(stf) $fmri(mcf) $w.bet $w.smooth $w.temp -in $fmri(filteringf) -anchor w -pady 1 -padx 5
pack $fmri(mcf) $fmri(stf) $w.bet $w.smooth $w.temp -in $fmri(filteringf) -anchor w -pady 1 -padx 5
#}}}
#{{{ Melodic
......@@ -477,6 +477,14 @@ if { $fmri(ndelete) > 0 } {
set target_vol_number [ expr $total_volumes / 2 ]
fsl:exec "${FSLDIR}/bin/avwroi $INPUT example_func $target_vol_number 1"
#}}}
#{{{ motion correction
if { $fmri(mc) != 0 } {
fsl:exec "${FSLDIR}/bin/mcflirt -in $INPUT -out prefiltered_func_data_mcf -refvol $target_vol_number" -t 15
set INPUT prefiltered_func_data_mcf
}
#}}}
#{{{ slice timing correction
......@@ -500,14 +508,6 @@ if { $fmri(st) > 0 } {
set INPUT prefiltered_func_data_st
}
#}}}
#{{{ motion correction
if { $fmri(mc) != 0 } {
fsl:exec "${FSLDIR}/bin/mcflirt -in $INPUT -out prefiltered_func_data_mcf -refvol $target_vol_number" -r
set INPUT prefiltered_func_data_mcf
}
#}}}
#{{{ BET
......@@ -556,10 +556,17 @@ fsl:exec "rm -rf prefiltered_func_data*"
set thecommand "${FSLDIR}/bin/melodic -i $INPUT -o $OUTPUT -v --nobet --bgthreshold=$fmri(thresh) --tr=$fmri(tr)"
set job_duration 20
if { $fmri(dim_yn) == 1 } {
set thecommand "$thecommand -d 0"
if { $total_volumes > 400 } {
set job_duration 180
}
} else {
set thecommand "$thecommand -d $fmri(dim)"
if { $fmri(dim) > 100 } {
set job_duration 180
}
}
if { $fmri(thresh_yn) == 0 } {
......@@ -581,7 +588,7 @@ if { $fmri(ostats) == 1 } {
}
puts $thecommand
fsl:exec $thecommand
fsl:exec "$thecommand" -t $job_duration
#}}}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment