From 9e2cb75e013cc6699ea025f08819e2e10b544801 Mon Sep 17 00:00:00 2001
From: Tim Behrens <behrens@fmrib.ox.ac.uk>
Date: Tue, 14 Jun 2005 16:21:41 +0000
Subject: [PATCH] *** empty log message ***

---
 post_xfibres | 32 ++++++++++++++++++++++++++++++++
 xfibres.cc   |  4 +---
 2 files changed, 33 insertions(+), 3 deletions(-)
 create mode 100755 post_xfibres

diff --git a/post_xfibres b/post_xfibres
new file mode 100755
index 0000000..37fb484
--- /dev/null
+++ b/post_xfibres
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+if [ $# -lt 1 ];then
+    echo "Usage: post_xfibres <directory> [thresh]"
+    echo ""
+    exit
+fi
+
+
+
+dirname=$1
+if [ $# -gt 1 ];then
+    thresh=$2;
+else
+    thresh=0.05;
+fi
+
+cd $dirname
+numfib=`${FSLDIR}/bin/imglob -oneperimage f*samples |wc -w`
+
+echo "$numfib fibres"
+fib=1;
+avwmaths S0samples -mul 0 numfibs
+while [ $fib -le $numfib ];do
+    echo $fib
+    ${FSLDIR}/bin/avwmaths f${fib}samples -Tmean mean_f${fib}samples
+    ${FSLDIR}/bin/avwmaths mean_f${fib}samples -thr $thresh -bin ${$}bin${fib}
+    ${FSLDIR}/bin/avwmaths numfib -add ${$}bin${fib} numfibs
+    ${FSLDIR}/bin/make_dyadic_vectors th${fib}samples ph${fib}samples dyads${fib}
+    fib=`echo "$fib +1"|bc`;
+done
+rm ${$}bin*
diff --git a/xfibres.cc b/xfibres.cc
index 624e6c0..39f69c7 100644
--- a/xfibres.cc
+++ b/xfibres.cc
@@ -207,7 +207,6 @@ public:
 	ftmp.second=f;
 	sfs.push_back(ftmp);
       }
-      cerr<<sfs.size()<<endl;
       sort(sfs.begin(),sfs.end());
       
       for(int samp=1;samp<=m_dsamples.Nrows();samp++){
@@ -410,8 +409,7 @@ int main(int argc, char *argv[])
     cerr<<"ok2"<<endl;
     cerr<<datam.Ncols()<<endl;
     for(int vox=1;vox<=datam.Ncols();vox++){
-      cerr<<"I'm ok sam"<<endl;
-      cerr <<vox<<"/"<<datam.Ncols()<<endl;;
+      cerr <<vox<<"/"<<datam.Ncols()<<endl;
       xfibresVoxelManager  vm(datam.Column(vox),alpha,beta,bvals,samples,vox);
       vm.initialise(Amat);
       vm.runmcmc();
-- 
GitLab