From b0075278d281985b592b994973c1d02659f86675 Mon Sep 17 00:00:00 2001
From: Stephen Smith <steve@fmrib.ox.ac.uk>
Date: Wed, 1 Aug 2007 10:06:22 +0000
Subject: [PATCH] *** empty log message ***

---
 melodic.tcl | 48 +++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 45 insertions(+), 3 deletions(-)

diff --git a/melodic.tcl b/melodic.tcl
index 7394f04..4f1582d 100644
--- a/melodic.tcl
+++ b/melodic.tcl
@@ -10,6 +10,23 @@
 source [ file dirname [ info script ] ]/fslstart.tcl
 set VARS(history) {}
 
+#{{{ melodic:updatelevel
+
+proc melodic:updatelevel { w } {
+
+    global fmri
+
+    feat5:updatereg $w
+
+    pack forget $fmri(poststatsf).models.subject_mat $fmri(poststatsf).models.subject_con
+    if { $fmri(icaopt) > 1 } {
+	pack $fmri(poststatsf).models.subject_mat $fmri(poststatsf).models.subject_con -in $fmri(poststatsf).models -after $fmri(poststatsf).models.ts_con -anchor w -side top
+    }
+
+    $w.nb compute_size
+}
+
+#}}}
 #{{{ melodic:updatedim
 
 proc melodic:updatedim { w } {
@@ -153,7 +170,7 @@ LabelSpinBox $f.dim.n -label "Output components" -textvariable fmri(dim) -range
 #}}}
 #{{{ ICA level
 
-optionMenu2 $f.icaopt fmri(icaopt) -command "feat5:updatereg $w" 1 "Single-session ICA" 2 "Multi-session temporal concatenation" 3 "Multi-session tensor ICA"
+optionMenu2 $f.icaopt fmri(icaopt) -command "melodic:updatelevel $w" 1 "Single-session ICA" 2 "Multi-session temporal concatenation" 3 "Multi-session tensor ICA"
 
 balloonhelp_for $f.icaopt "
 
@@ -222,7 +239,7 @@ exceeds the probability of the voxel belonging to the background
 noise Gaussian."
 
 set fmri(mmthresh) 0.5
-LabelSpinBox  $f.thresh.n -label "" -textvariable fmri(mmthresh) -range {0.0 1 0.1 } -width 3
+entry $f.thresh.n -textvariable fmri(mmthresh) -width 10
 
 pack $f.thresh.yn $f.thresh.n -in $f.thresh -side left
 
@@ -232,7 +249,7 @@ pack $f.thresh.yn $f.thresh.n -in $f.thresh -side left
 frame $f.bgimage
 
 label $f.bgimage.label -text "Background image "
-optionMenu2 $f.bgimage.menu fmri(bgimage) 1 "Mean highres" 2 "First highres" 3 "Mean functional" 4 "First functional" 5 "Standard space template"
+optionMenu2 $f.bgimage.menu fmri(bgimage) 1 "Mean highres" 3 "Mean functional" 5 "Standard space template"
 
 pack $f.bgimage.label $f.bgimage.menu -in $f.bgimage -side top -side left
 
@@ -259,9 +276,34 @@ maps and the probability maps inside a folder \/stats.
 This will substantially increase the amount of space used, 
 so only switch this on if you intend to use these maps."
 
+#}}}
+#{{{ model
+
+frame $f.models
+
+FileEntry $f.models.ts_mat      -textvariable fmri(ts_model_mat)      -label " Timeseries model                 " -title "Timeseries design.mat model" -width 35 -filedialog directory -filetypes *.mat
+FileEntry $f.models.ts_con      -textvariable fmri(ts_model_con)      -label " Timeseries contrasts           " -title "Timeseries design.con contrasts" -width 35 -filedialog directory -filetypes *.con
+FileEntry $f.models.subject_mat -textvariable fmri(subject_model_mat) -label " Session/subjects model       " -title "Session/subjects design.mat model" -width 35 -filedialog directory -filetypes *.mat
+FileEntry $f.models.subject_con -textvariable fmri(subject_model_con) -label " Session/subjects contrasts " -title "Session/subjects design.con contrasts" -width 35 -filedialog directory -filetypes *.con
+
+balloonhelp_for $f.models "If you select a timeseries \"design.mat\" model and \"design.con\"
+contrast file (e.g. as used in a first-level FEAT model-based FMRI
+analysis), these will be used by MELODIC in ordering the ICA
+components, and in providing richer timeseries reporting information.
+
+If you are doing multi-session/multi-subjects ICA, you can also
+optionally select a subject \"design.mat\" model and \"design.con\"
+contrast file (e.g. as used in a higher-level FEAT model-based FMRI
+analysis). These will be used by MELODIC in ordering the ICA
+components, and in providing richer reporting information about the
+multiple sessions/subjects."
+
+pack $f.models.ts_mat $f.models.ts_con -in $f.models -anchor w -side top
+
 #}}}
 
 pack $f.thresh $f.bgimage $f.ostats -in $f -anchor w -side top
+pack $f.models -in $f -anchor w -side top -pady 20
 
 #}}}
 #{{{ Registration
-- 
GitLab