Skip to content
Snippets Groups Projects
Commit 140a19ca authored by Saad Jbabdi's avatar Saad Jbabdi
Browse files

Added network option, seed can be a list of rois

parent d8ec5e79
No related branches found
No related tags found
No related merge requests found
......@@ -35,8 +35,12 @@ int main ( int argc, char **argv ){
if(opts.mode.value()=="simple")
track();
string tmpin=opts.seedfile.value();
if(fsl_imageexists(opts.mask2.value())){ twomasks();}
else if(fsl_imageexists(opts.seedfile.value())){ seedmask();}
if(fsl_imageexists(opts.seedfile.value())){
if(fsl_imageexists(opts.mask2.value())){ twomasks();}
else{ seedmask(); }
}
else{ nmasks(); }
//else if(fopen(tmpin.c_str(),"r")!=NULL ){ track();}
// else if(opts.mode.value()=="seeds_to_targets")
......
......@@ -7,3 +7,4 @@
#include "ptx_simple.h"
#include "ptx_seedmask.h"
#include "ptx_twomasks.h"
#include "ptx_nmasks.h"
......@@ -34,8 +34,8 @@ void track(){
Counter counter(seedref,stline);
counter.initialise();
Seedmanager seedmanager(counter);
Matrix Seeds = read_ascii_matrix(opts.seedfile.value());
for(int SN=1; SN<=Seeds.Nrows();SN++){
float xst=Seeds(SN,1);
......
......@@ -195,11 +195,20 @@ namespace TRACT{
if(opts.loopcheck.value()){
m_loopcheck=0;
}
bool accept_path=true;
if(m_passed_flags.size()!=0){
for(unsigned int i=0; i<m_passed_flags.size();i++)
if(!m_passed_flags[i])
accept_path=false;
if(opts.waypoints_and.value()){
for(unsigned int i=0; i<m_passed_flags.size();i++)
if(!m_passed_flags[i])
accept_path=false;
}
else{
accept_path=false;
for(unsigned int i=0; i<m_passed_flags.size();i++)
if(m_passed_flags[i])
accept_path=true;
}
}
if(rubbish_passed)
accept_path=false;
......
......@@ -28,6 +28,7 @@ namespace TRACT{
volume<int> m_mask;
volume<int> m_skipmask;
volume<int> m_rubbish;
volume<int> m_stop;
volume4D<float> m_loopcheck;
vector<volume<int>* > m_waymasks;
vector<bool> m_passed_flags;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment