Sampling strategy in ImageRegistrationMethodv4

Hi,

I see user can set sampling rate for image registration by the function “SetMetricSamplingPercentage”
If I understand correctly, after setting the sample rate, ITK will randomly choose a set of points and evaluate metric on those points. The set of points is fixed during iteration.

My question is, is there a way to use different sample for every iteration?
Or am I wrong that it is resampled every iteration?

There are 3 sampling strategies implemented: None, Regular, and Random I have always wanted to try a “poisson distributed sampling”, but I doubt it’d make a difference.

The ITKv3 registration created a new sample set each iterations.

This is not an option for ITKv4. Having a fix sample set enables coherent results for the values and the derivatives of the metric which adheres better to the assumptions of many optimizers and convergence criteria.

1 Like

Thanks @blowekamp!
Is there a way to create new sample at every iteration in ITKv4?
I would rather give it a try.

The images I like to registrate contains detailed structure that I think only sampling part of the points might be biased from ground truth. But I would like to speed up by sampling, or in other words, I would like to try stochastic gradient descent.
I hope I can use techniques like momentum to stabilize the optimization.

Well, I worked out a way to update the sample through observer.
The result isn’t better neither worse in my case.
Thanks for help!