We quite often use the surface based registration option in Amira to generate an initial alignment for cases where CMTK's affine registration fails.
- Take your starter image and smooth/downsample to e.g. 3 um voxels.
- Then generate a surface – you can use the Isosurface viewer module
- We then normally simplify to ~ 18k vertices. Now you are ready for the surface aligment
- Choose Align surfaces
- set the template brain as the surface to be transformed
- set the sample/floating brain as the reference surface
- (yes this sounds backwards, but that's what CMTK wants)
- Now align the centres
- rigidly align the brains until you see no further improvement
- then continue with affine registration until ditto
- In the console, get the reference brain transformation e.g.
JFRC2.surf getTransform
- These 16 numbers define a homogeneous affine transformation, which can now be used to make a CMTK registration.
We carry out the last step in R:
library(nat) # paste in the 16 numbers m=matrix(scan(), ncol=4) # check that you have a 4 x 4 matrix with last row 0 0 0 1 write.cmtkreg(cmtk.mat2dof(m), "/path/to/my/reg/folder/Registration/affine/JFRC2_FLPO_20121214175357476_2097_01_ght.list")
You will need to have R and the nat package installed. See http://jefferis.github.io/nat for details.