simeks / deform

Efficient dense deformable image registration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add option to regularize initial_displacement

AAAArcus opened this issue · comments

For affine pre-registration, it makes sense not to regularize the initial displacement field inputed to deform; however, it can also be useful to use a more general start guess that deform improves upon, in which case the initial displacement should also be penalized in the regularization term. This could be added as an option in the settings, which defaults to the current setup, and should be a easy fix in the code.
Don't know if changing the struct regularizer is preferred, or if setting initial to zero there would be enough? Maybe there are performance penalties/advantages to take into consideration?

Makes sense. I think the best solution would be to just not set the initial displacement, i.e., some check here:

binary_fn.set_initial_displacement(_deformation_pyramid.volume(level).clone());
and here
binary_fn.set_initial_displacement(_deformation_pyramid.volume(level).clone());

Somewhat related: I would like to enable the user to input the affine transformation parameters explicitly (rather than just a displacement field), but I haven't really had the time.