ANTsPy icon indicating copy to clipboard operation
ANTsPy copied to clipboard

how to perform deformable registration without the affine step

Open HazelHik opened this issue 3 years ago • 4 comments

Hi there,

I want to know whether it's possible that I only conduct ants.registration to get the deformable field, skipping the rigid/affine registration step. Do we have one "typeofTransform" for this ?

Thanks!

HazelHik avatar Feb 19 '22 18:02 HazelHik

  • antsRegistrationSyN*[bo]
  • antsRegistrationSyN*[so]

ntustison avatar Feb 19 '22 18:02 ntustison

Hi ntustison,

Thank you for the advice! so I can run mytx = ants.registration(fixed=fi, moving=mi, type_of_transform = 'antsRegistrationSyN*[bo]') right? What's the meaning (difference) of bo & so?

HazelHik avatar Feb 20 '22 06:02 HazelHik

I tried mytx = ants.registration(fixed=fi, moving=mi, type_of_transform = 'antsRegistrationSyN*[bo]') and mytx = ants.registration(fixed=fi, moving=mi, type_of_transform = 'antsRegistrationSyN*[so]') but mytx['fwdtransforms'] still have two components, [0] is for affine and [1] is for deformable parameters. If I run:

mywarpedimage = ants.apply_transforms( fixed=fi, moving=mi,
                                               transformlist=mytx['fwdtransforms'][1])

I found the warped image not matched exactly (because I should use transformlist=mytx['fwdtransforms'] to apply affine mat as well).

What I want is a registration map that is deformable flows so I can convert it to numpy and do some further exploration. But now as all (?) the registration process contains an affine map, I can not use only the deformation flows to warp images to achieve antsSyn's performance.

HazelHik avatar Feb 20 '22 07:02 HazelHik

The * in antsRegistrationSyN*[bo] is simply a placeholder for the different possibilities, ie, "Quick", "Repro". You would have to specify which one you want. See the help here.

ntustison avatar Feb 21 '22 01:02 ntustison