Menu

antsApplyRegistrationToPoints and non LPS images

Help
2014-01-24
2014-01-31
  • Chris Filo Gorgolewski

    Thanks in advance - any help will be very appreciated. I did read the discussion you mentioned - hence the LIP->LPS conversion and application of reverse transform.

    What are the "debugging" options you mention?

     
    • stnava

      stnava - 2014-01-25

      re: debugging.

      you might transform the images - before landmarking - to LPS space.

      then identify the point coordinate in this new space.

      this can help you understand the transformation that needs to be made.

      brian

      On Sat, Jan 25, 2014 at 5:30 AM, Chris Filo Gorgolewski gorgolewski@users.sf.net wrote:

      Thanks in advance - any help will be very appreciated. I did read the
      discussion you mentioned - hence the LIP->LPS conversion and application of
      reverse transform.

      What are the "debugging" options you mention?

      antsApplyRegistrationToPoints and non LPS imageshttps://sourceforge.net/p/advants/discussion/840261/thread/3270e30a/?limit=50#f0db

      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/advants/discussion/840261/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
  • Chris Filo Gorgolewski

    Oh my crusade is finally over! Let me record for the posterity how I managed to do this.

    Basically there are many ways to represent images inside a nifti file. There are also many terms that mean different things in different communities (for example what LPS in ITK world is RAI in nipy, FreeSurfer world). Therefore the most effective way to figure out how to convert your coordinates to what antsApplyTransformsToPoints expects is by a test case. Here are the steps:

    1. Create a fake label volume based on your moving image. You can use ITK Snap or FSLView to do this. You basically need one point set to 1 and all others set to zero. Write down the coordinates (in mm) of that point.
    2. Use ImageMaths LabelStats on the label volume to figure out what are the coordinates of that point according to ANTs.
    3. Comparing the coordinates from step 1 and 2 you can figure out what conversion (swapping order, multiplying by -1) you need to apply to your list of points before feeding them to antsApplyTransformsToPoints

    You probably will have to go through a similar process to convert coordinates outputed by antsApplyTransformsToPoints to something compatible with the space your fixed image is in.

    I hope this helps!

    Best,
    Chris