[Insight-users] Using masks in registration.
Luis Ibanez
luis.ibanez at kitware.com
Tue Oct 25 01:07:10 EDT 2005
Hi Ro,
From your description, I guess that you are using one of the
MutualInformation metrics in ITK. (since those are the ones
for which you can specify the number of samples to use.
If you are using the Viola-Wells MutualInformation metric,
the number of samples are taken from the FIXEDREGION, but
only those that fell inside of the ImageMask are used for
the registration. So... this doesn't quite match your
assumptions.
Although I would agree with you in that it would make more
sense to have all the N samples selected from inside the
ImageMask.
It maybe a bit difficult to change this behavior because
the samples are generated using the RandomImageIterator,
which is unaware of the FixedImageMask.
So, to summarize, the actual behavior of the Metric is
to generate N random samples inside the FixedImageRegion,
and then select only those that are inside the Mask.
so potentially you may end up with many less samples
than you would expect, and, as you already found, if you
use a larger FixedImageRegion, then you will get even
less samples inside your mask.
You probably want to stick to using the bounding box of
the Mask as the FixedImageRegion.
It would be nicer to have a variant of the Random iterator
that will take a Mask into account *but* without having
a performance penalty for those who don't use the Mask.
Please let us know if you have further questions,
Thanks
Luis
-------------------------------
Landen, R. van der (LKEB) wrote:
>
> Dear list,
>
> I have a question on the use of masks in registration; I hope someone
> can help me.
> To define a custom region I use Metric->SetFixedImageMask(), as in
> ImageRegistration12.cxx.
> This seems to work fine; the IsInside() in the metric gives points in
> the masked region.
> However, there is one thing I do not understand: I get _very_ different
> results when setting the
> Registration->SetFixedImageRegion() to the entire image or when using,
> for example, the bounding
> box around the mask; even when numberofspatialsamples set to the total
> number of pixels of the masked
> area. I would expect that using a larger region would be (possibly much)
> slower, but not different, from using
> a smaller region, since in both cases numberofspatialsamples points are
> taken/ inside/ the masked region.
> So, I was wondering whether my assumptions were wrong (and, in that
> case, why?)? If not, than at least I know
> that there is a coding error somewhere that results in the observed
> behaviour..
>
> I hope you can help.
>
> Regards,
>
>
> Ro.
>
>
>
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list