From 25e4aa1fd87db66133970019d33e846f9812fb70 Mon Sep 17 00:00:00 2001
From: Saad Jbabdi <saad@fmrib.ox.ac.uk>
Date: Tue, 21 Aug 2007 13:40:57 +0000
Subject: [PATCH] meshes in probtrackx

---
 Makefile      | 2 +-
 probtrackx.cc | 3 ++-
 probtrackx.h  | 1 +
 streamlines.h | 2 +-
 tractvolsx.h  | 2 +-
 5 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 23fefc3..10a6f7f 100644
--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,7 @@ VECREG=vecreg
 DTIFITOBJS=dtifit.o dtifitOptions.o
 CCOPSOBJS=ccops.o ccopsOptions.o
 PTOBJS=probtrack.o probtrackOptions.o pt_alltracts.o pt_matrix.o pt_seeds_to_targets.o pt_simple.o pt_twomasks.o pt_matrix_mesh.o
-PTXOBJS=probtrackx.o probtrackxOptions.o streamlines.o ptx_simple.o ptx_seedmask.o ptx_twomasks.o ptx_nmasks.o
+PTXOBJS=probtrackx.o probtrackxOptions.o streamlines.o ptx_simple.o ptx_seedmask.o ptx_twomasks.o ptx_nmasks.o ptx_meshmask.o
 FTBOBJS=find_the_biggest.o
 PJOBJS=proj_thresh.o
 MEDOBJS=medianfilter.o 
diff --git a/probtrackx.cc b/probtrackx.cc
index 816381a..5a49254 100644
--- a/probtrackx.cc
+++ b/probtrackx.cc
@@ -43,7 +43,8 @@ int main ( int argc, char **argv ){
     else{ seedmask(); }
   }
   else if(opts.network.value()){ nmasks(); }
-  else {};
+  else if(opts.meshfile.value()!=""){meshmask();}
+  else {cout << "exit without doing anything"<<endl;return 0;};
 
   //else if(fopen(tmpin.c_str(),"r")!=NULL ){ track();}
 
diff --git a/probtrackx.h b/probtrackx.h
index 8610f9f..41498fe 100644
--- a/probtrackx.h
+++ b/probtrackx.h
@@ -8,3 +8,4 @@
 #include "ptx_seedmask.h"
 #include "ptx_twomasks.h"
 #include "ptx_nmasks.h"
+#include "ptx_meshmask.h"
diff --git a/streamlines.h b/streamlines.h
index 37ce57a..0558f57 100644
--- a/streamlines.h
+++ b/streamlines.h
@@ -69,7 +69,7 @@ namespace TRACT{
 	pop_waymasks();
     }
 
-
+    const Tractvolsx& get_vols() const {return vols;}
     inline int nfibres() const {return vols.nfibres();}
     inline const float get_x_seed() const {return m_x_s_init;}
     inline const float get_y_seed() const {return m_y_s_init;}
diff --git a/tractvolsx.h b/tractvolsx.h
index 5ca4dcb..c8b56a7 100644
--- a/tractvolsx.h
+++ b/tractvolsx.h
@@ -204,7 +204,7 @@ namespace TRACTVOLSX{
 	return th_ph_f;
       }
 
-      ColumnVector dimensions(){
+      ColumnVector dimensions() const{
 	ColumnVector dims(3);
 	dims << (*thsamples[0]).xdim() <<(*thsamples[0]).ydim() << (*thsamples[0]).zdim();
 	return dims;
-- 
GitLab