RANTs - the valley of confusion
11 Jul 2014I have been playing with 3D-image registration lately and am slowly getting somewhat acquainted with the R-implementation of the ANTs registration framework called ANTsR, which is really great. I started a new package named RANTs (pun intended), I am planning to fill with R-code calling ANTs(R) routines (I hate littering my workspace with code snippets an prefer loading them as a package including documentation). After my second trial to map two 3D-images depicting presegmented midfacial areas yielded awesome results, I started to program a routine to coarsely register two images using a couple of landmarks (code), before calling ANTs. While this wasn’t a big deal (thanks to an infamous internet search engine), I was almost lost in the valley of confusion, because the transformed images ended up anywhere but close to the target points. It turned out that this was owed to two sources of confusion: the transformation between IJK and RAS space and that image data needs the inverse transformation when obtained from point data. It took me 2 hours to figure that out. Now the function vtkTransformImage
in RvtkStatismo
allows the comfortable coarse alignment (with options similarity, rigid and affine transforms). Additionally, I included the function read.fcsv to read fiducials placed in Slicer4. Hopefully, I will improve this to end up in a reasonable pipeline for future research.