[elastix] how to constrain the optimizer's range?

Stefan Klein s.klein at erasmusmc.nl
Sun Jan 15 14:56:31 CET 2012

Hi Dongfeng,
That's unfortunately not possible in elastix!
In most cases it should't be necessary though. Anyway, if the 
registration for some reason diverges to a large translation, the 
maximum limit of 10mm would probably also not provide a good registration.
You could implement it in a postprocessing step, in which you modify the 
resulting transform parameters after elastix has finished.

If you get too large displacements, it suggests that the images that you 
are using do not contain enough information to guide the registration, 
or they contain some artefacts that mislead the registration.

If you expect only small translations, it might be useful to limit the 
number of resolution to one or two. Then elastix will not blur the 
images so much and will in general result in only small deformations.

Kind regards,

On 31/12/2011 08:26, Dongfeng Han wrote:
> Hello klein,
> I am using elastix for CT and PET registration.
> Since I can roughly align the images, I don not want to the final 
> displacements are too large.
> For example, for the rigid transfom, I know the largest translation 
> along x is 10 mm. So how I can set this constrain in elastix?
> For the deformation registration, for example, I know the largest 
> displacement along y is 20mm, how to set this constrain in  parameters 
> file.
> Any suggestion?
> Thank for the reply.
> Best
> df

Stefan Klein
+31 10 7043049

More information about the Elastix mailing list