[Mrtrix-discussion] Question about converting tracks

Kuan-Tsen Kuo fixcankuo at gmail.com
Mon Apr 6 20:27:18 PDT 2015


Dear all:

I would like to transforming the tracks to the ROI space which image valve
is integer from 0 to 490,
but not sure how to apply the transformation matrix.
So I use MR::Image::Interp to access the voxel intensity of ROI image.

Here is how I use,
===
std::vector<MR::Point> tck; // one track got from tck file
MR::Image::Object image_object;
image_object.open(ROI.nii); // which is coregistered to DWI
MR::Image::Interp interp (image_object);
MR::Point track_point, voxel_position;
for (std::vector< MR::Point>::iterator i = tck.begin(); i != tck.end(); ++i)
  {
    float *p = i->get();
    track_point.set(p);
    voxel_position = interp.R2P(track_point);
    interp.P (voxel_position);
    value = interp.value();
    if(value != 0)
    {
      cout << value << endl ;
    }
  }
===
Is this a correct method to using Interp? Cause I get a float value.
I hope I can get a integer value show that fiber is passing through the
specific region.

Should I round down, up or nearest to the point of track(track_point) to
access right voxel intensity?

Thank you for your help!
Kuo, Kuan-Tsen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.nitrc.org/pipermail/mrtrix-discussion/attachments/20150407/39dd03e4/attachment.html>


More information about the Mrtrix-discussion mailing list