diff --git a/ptx_simple.cc b/ptx_simple.cc index c96372a0f72e6b34eb5476a3d225bdadf5e5149f..798cf826c9095d641ab13196bb443999dc71dcef 100644 --- a/ptx_simple.cc +++ b/ptx_simple.cc @@ -29,15 +29,23 @@ void track(){ else{ read_volume(seedref,opts.maskfile.value()); } - + Streamliner stline; Counter counter(seedref,stline); counter.initialise(); Seedmanager seedmanager(counter); - - + Matrix Seeds = read_ascii_matrix(opts.seedfile.value()); + // convert coordinates from nifti (external) to newimage (internal) + // conventions - Note: for radiological files this should do nothing + for (int n=1; n<=Seeds.Nrows(); n++) { + ColumnVector v(4); + v << Seeds(n,1) << Seeds(n,2) << Seeds(n,3) << 1.0; + v = seedref.niftivox2newimagevox_mat() * v; + Seeds(n,1) = v(1); Seeds(n,2) = v(2); Seeds(n,3) = v(3); + } + int keeptot=0; for(int SN=1; SN<=Seeds.Nrows();SN++){ float xst=Seeds(SN,1);