[Insight-users] Cost function value over a region

kavec at messi.uku.fi kavec at messi.uku.fi
Sat Dec 18 06:29:35 EST 2004


Hi.

I am trying to calculate normalized mutual information of two images (no
registration). Additionaly, I want the value only from a region defined by a
movingImageMask. The movingImageMask is an image with intensities 0 and 1.

However, it seems that the mask has no effect on the result; if I set 1s for the
whole image or just a part of it. This is how I set the region:

  // Define the region over which the metric will be computed.  
  metric->SetFixedImageRegion(fixedImageReader->GetOutput()->GetBufferedRegion());
  metric->SetMovingImageMask( spatialObjectMask );

Is there something wrong with it?

The whole code is attached in case some would like to looked at it.

Thanks.

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ShowCost.cxx
Type: application/octet-stream
Size: 4214 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20041218/f1778f7d/ShowCost.obj


More information about the Insight-users mailing list