question about metric setter

Hi everyone,
I went through itkMeanSquaresImageToImageMetric.hxx file, and I was wondering what is the effect of changing this->SetUseAllPixels(true) to this->SetUseAllPixels(false)?


Thank you in advance for your reply!

It probably controls whether to evaluate the metric on all the pixels or just the selected subset (which is usually faster).

ok thank you. So how does this “selected subset” work? I mean, it divides the whole image in a few parts? And how many parts? And what is the shape of these parts? A cube?

Usually randomly sampled. See this discussion.

You are looking at an ITKv3 registration metric. The discussion @dzenanz linked too was for the ITKv4 registration framework. All that I recall about the ITKv3 sampling is that the point set changed each iteration, but I haven’t looked at that code for a very long time!

1 Like

ok, thanks to both of you.

Is there any difference between using the metric v3 or metric v4 regarding registration performance? Actually, I thought I was using v5 of this metric…