From 9ef9c48484c2b58598ce5bb1e7411a45f1cce33f Mon Sep 17 00:00:00 2001 From: Mark Jenkinson <mark@fmrib.ox.ac.uk> Date: Wed, 19 Dec 2007 18:29:20 +0000 Subject: [PATCH] Made changes for neurological fix - DO NOT MAKE STABLE YET --- ptx_simple.cc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ptx_simple.cc b/ptx_simple.cc index c96372a..798cf82 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); -- GitLab