From bda95520b01b053411c3f8b1ab8c81f84ec88b2e Mon Sep 17 00:00:00 2001 From: Tim Behrens <behrens@fmrib.ox.ac.uk> Date: Tue, 14 Jun 2005 15:38:10 +0000 Subject: [PATCH] *** empty log message *** --- testfile.cc | 10 ++++++++-- xfibres.cc | 11 +++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/testfile.cc b/testfile.cc index 8b4a30b..847fd1a 100644 --- a/testfile.cc +++ b/testfile.cc @@ -37,8 +37,8 @@ int main(int argc, char** argv){ //volume<float> mask; // Matrix datam; cerr<<"pants"<<endl; - read_volume4D(data,"dat");//data,opts.datafile.value()); - cerr<<"pants1"<<endl; + // read_volume4D(data,"dat");//data,opts.datafile.value()); + //cerr<<"pants1"<<endl; // read_volume(mask,"mas");//mask,opts.maskfile.value()); //cerr<<"pants2"<<endl; //datam=data.matrix(mask); @@ -47,4 +47,10 @@ int main(int argc, char** argv){ //vector<vector<int> > poo; //string af="avg_file"; //read_avg_file(poo,af); + Matrix a(2,1); + a(1,1)=10.2; + a(2,1)=4.1; + element_mod_n(a,M_PI); + cerr<<a<<endl; + } diff --git a/xfibres.cc b/xfibres.cc index bd8ab5a..624e6c0 100644 --- a/xfibres.cc +++ b/xfibres.cc @@ -192,19 +192,22 @@ public: //Sort the output based on mean_fsamples // vector<Matrix> sumf; + cerr<<"cock"<<endl; for(int f=0;f<opts.nfibres.value();f++){ Matrix tmp=sum(m_fsamples[f],1); sumf.push_back(tmp); } - + cerr<<"cock2"<<endl; for(int vox=1;vox<=m_dsamples.Ncols();vox++){ vector<pair<float,int> > sfs; pair<float,int> ftmp; + for(int f=0;f<opts.nfibres.value();f++){ ftmp.first=sumf[f](1,vox); 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++){ @@ -219,11 +222,11 @@ public: } - + cerr<<"cock3"<<endl; // save the sorted fibres for(int f=0;f<opts.nfibres.value();f++){ - element_mod_n(thsamples_out[f],M_PI); - element_mod_n(phsamples_out[f],2*M_PI); + // element_mod_n(thsamples_out[f],M_PI); + // element_mod_n(phsamples_out[f],2*M_PI); tmp.setmatrix(thsamples_out[f],mask); string oname="th"+num2str(f+1)+"samples"; save_volume4D(tmp,logger.appendDir(oname)); -- GitLab