From 0805401d230265ccb48fb489733f0a6bbf30f9ef Mon Sep 17 00:00:00 2001 From: Mark Jenkinson <mark@fmrib.ox.ac.uk> Date: Wed, 19 Dec 2007 17:37:41 +0000 Subject: [PATCH] Made changes for neurological fix - DO NOT MAKE STABLE YET --- ccopsOptions.h | 1 + commonopts.h | 17 +++++++++++++++++ dtifitOptions.h | 2 ++ probtrackOptions.h | 1 + probtrackxOptions.h | 1 + pt_alltracts.cc | 2 +- pt_matrix.cc | 6 +++--- pt_matrix_mesh.cc | 4 ++-- pt_seeds_to_targets.cc | 2 +- pt_simple.cc | 2 +- pt_twomasks.cc | 4 ++-- streamlines.cc | 2 +- tractOptions.h | 1 + vecreg.cc | 2 +- 14 files changed, 35 insertions(+), 12 deletions(-) create mode 100644 commonopts.h diff --git a/ccopsOptions.h b/ccopsOptions.h index 833efdc..9732fcf 100644 --- a/ccopsOptions.h +++ b/ccopsOptions.h @@ -15,6 +15,7 @@ #include <stdlib.h> #include <stdio.h> #include "utils/options.h" +#include "commonopts.h" using namespace Utilities; namespace CCOPS { diff --git a/commonopts.h b/commonopts.h new file mode 100644 index 0000000..beeb06e --- /dev/null +++ b/commonopts.h @@ -0,0 +1,17 @@ +/* commonopts.h + + Mark Jenkinson and Dave Flitney, FMRIB Image Analysis Group + + Copyright (C) 2007 University of Oxford */ + +/* CCOPYRIGHT */ + +#if !defined(commonopts_h) +#define commonopts_h + +using std::string; +using std::cerr; +using std::cout; +using std::endl; + +#endif diff --git a/dtifitOptions.h b/dtifitOptions.h index b29848c..024fc80 100644 --- a/dtifitOptions.h +++ b/dtifitOptions.h @@ -15,7 +15,9 @@ #include <stdlib.h> #include <stdio.h> #include "utils/options.h" +#include "commonopts.h" //#include "newmatall.h" + using namespace Utilities; namespace DTIFIT { diff --git a/probtrackOptions.h b/probtrackOptions.h index 4717d61..4590454 100644 --- a/probtrackOptions.h +++ b/probtrackOptions.h @@ -16,6 +16,7 @@ #include <stdio.h> #include "utils/options.h" #include "utils/log.h" +#include "commonopts.h" //#include "newmatall.h" using namespace Utilities; diff --git a/probtrackxOptions.h b/probtrackxOptions.h index 92a89a0..688d2a2 100644 --- a/probtrackxOptions.h +++ b/probtrackxOptions.h @@ -16,6 +16,7 @@ #include <stdio.h> #include "utils/options.h" #include "utils/log.h" +#include "commonopts.h" //#include "newmatall.h" using namespace Utilities; diff --git a/pt_alltracts.cc b/pt_alltracts.cc index d297f9a..dda056d 100644 --- a/pt_alltracts.cc +++ b/pt_alltracts.cc @@ -65,7 +65,7 @@ void alltracts(){ Matrix Seeds_to_DTI; if(opts.seeds_to_dti.value()!=""){ - read_ascii_matrix(Seeds_to_DTI,opts.seeds_to_dti.value()); + Seeds_to_DTI = read_ascii_matrix(opts.seeds_to_dti.value()); } else{ Seeds_to_DTI=Identity(4); diff --git a/pt_matrix.cc b/pt_matrix.cc index 4c78d25..bdc3b68 100644 --- a/pt_matrix.cc +++ b/pt_matrix.cc @@ -152,7 +152,7 @@ void matrix2(){ Matrix Seeds_to_DTI; if(opts.seeds_to_dti.value()!=""){ - read_ascii_matrix(Seeds_to_DTI,opts.seeds_to_dti.value()); + Seeds_to_DTI = read_ascii_matrix(opts.seeds_to_dti.value()); } else{ Seeds_to_DTI=Identity(4); @@ -386,7 +386,7 @@ void matrix1(){ Matrix Seeds_to_DTI; if(opts.seeds_to_dti.value()!=""){ - read_ascii_matrix(Seeds_to_DTI,opts.seeds_to_dti.value()); + Seeds_to_DTI = read_ascii_matrix(opts.seeds_to_dti.value()); } else{ Seeds_to_DTI=Identity(4); @@ -605,7 +605,7 @@ void maskmatrix(){ Matrix Seeds_to_DTI; if(opts.seeds_to_dti.value()!=""){ - read_ascii_matrix(Seeds_to_DTI,opts.seeds_to_dti.value()); + Seeds_to_DTI = read_ascii_matrix(opts.seeds_to_dti.value()); } else{ Seeds_to_DTI=Identity(4); diff --git a/pt_matrix_mesh.cc b/pt_matrix_mesh.cc index 2220375..fad1423 100644 --- a/pt_matrix_mesh.cc +++ b/pt_matrix_mesh.cc @@ -140,7 +140,7 @@ void mesh_matrix2(){ Matrix Seeds_to_DTI; if(opts.seeds_to_dti.value()!=""){ - read_ascii_matrix(Seeds_to_DTI,opts.seeds_to_dti.value()); + Seeds_to_DTI = read_ascii_matrix(opts.seeds_to_dti.value()); } else{ Seeds_to_DTI=Identity(4); @@ -330,7 +330,7 @@ void mesh_lengths(){ } Matrix Seeds_to_DTI; - read_ascii_matrix(Seeds_to_DTI,opts.seeds_to_dti.value()); // Here seeds_to_dti should take the standard volume to diff space + Seeds_to_DTI = read_ascii_matrix(opts.seeds_to_dti.value()); // Here seeds_to_dti should take the standard volume to diff space float lcrat=5; volume4D<float> loopcheck((int)ceil(mask.xsize()/lcrat)+1,(int)ceil(mask.ysize()/lcrat)+1,(int)ceil(mask.zsize()/lcrat)+1,3); diff --git a/pt_seeds_to_targets.cc b/pt_seeds_to_targets.cc index 4193840..57ba00c 100644 --- a/pt_seeds_to_targets.cc +++ b/pt_seeds_to_targets.cc @@ -90,7 +90,7 @@ void seeds_to_targets() Matrix Seeds_to_DTI; if(opts.seeds_to_dti.value()!=""){ - read_ascii_matrix(Seeds_to_DTI,opts.seeds_to_dti.value()); + Seeds_to_DTI = read_ascii_matrix(opts.seeds_to_dti.value()); } else{ Seeds_to_DTI=Identity(4); diff --git a/pt_simple.cc b/pt_simple.cc index ea90070..1bafb24 100644 --- a/pt_simple.cc +++ b/pt_simple.cc @@ -35,7 +35,7 @@ void track(){ if(opts.seedref.value()!=""){ read_volume(prob,opts.seedref.value()); beenhere=prob*0; - read_ascii_matrix(Seeds_to_DTI,opts.seeds_to_dti.value()); + Seeds_to_DTI = read_ascii_matrix(opts.seeds_to_dti.value()); } else{ prob=mask; diff --git a/pt_twomasks.cc b/pt_twomasks.cc index f2b721e..2d6cd55 100644 --- a/pt_twomasks.cc +++ b/pt_twomasks.cc @@ -75,7 +75,7 @@ void twomasks_symm(){ Matrix Seeds_to_DTI; if(opts.seeds_to_dti.value()!=""){ - read_ascii_matrix(Seeds_to_DTI,opts.seeds_to_dti.value()); + Seeds_to_DTI = read_ascii_matrix(opts.seeds_to_dti.value()); } else{ Seeds_to_DTI=Identity(4); @@ -315,7 +315,7 @@ void waypoints(){ Matrix Seeds_to_DTI; if(opts.seeds_to_dti.value()!=""){ - read_ascii_matrix(Seeds_to_DTI,opts.seeds_to_dti.value()); + Seeds_to_DTI = read_ascii_matrix(opts.seeds_to_dti.value()); } else{ Seeds_to_DTI=Identity(4); diff --git a/streamlines.cc b/streamlines.cc index 59f38d9..6ecbf8b 100644 --- a/streamlines.cc +++ b/streamlines.cc @@ -61,7 +61,7 @@ namespace TRACT{ } } if(opts.seeds_to_dti.value()!=""){ - read_ascii_matrix(m_Seeds_to_DTI,opts.seeds_to_dti.value()); + m_Seeds_to_DTI = read_ascii_matrix(opts.seeds_to_dti.value()); } else{ m_Seeds_to_DTI=Identity(4); diff --git a/tractOptions.h b/tractOptions.h index 3fbab83..8ae5f67 100644 --- a/tractOptions.h +++ b/tractOptions.h @@ -15,6 +15,7 @@ #include <stdlib.h> #include <stdio.h> #include "utils/options.h" +#include "commonopts.h" //#include "newmatall.h" using namespace Utilities; diff --git a/vecreg.cc b/vecreg.cc index 0160ed8..7486124 100755 --- a/vecreg.cc +++ b/vecreg.cc @@ -219,7 +219,7 @@ int do_vecreg(){ volumeinfo vinfo; if((matrix.set())){ - read_ascii_matrix(Aff,matrix.value()); + Aff = read_ascii_matrix(matrix.value()); } if((warp.set())){ if(verbose.value()) cerr << "Loading warpfield" << endl; -- GitLab