Xabier:<br><br>You could use a combination of the methods :<br><br>SetFixedImageRegion<br>SetFixedImageMask<br>SetMovingImageMask<br><br>Mattes (or any metric that derives from itk::ImageToImageMetric) is going to compute the metric by iterating over those pixels from the fixed image that satisfy the following criteria: 
<br><br>* Is inside the fixed image region<br>* Is inside the fixed image mask<br>* After transformation through the current transform, during registration, also falls within the moving image mask.<br><br>The masks are specified as itk::SpatialObjects, so you could use any generic spatial object. Note that ImageMaskSpatialObject is one subclass. 
<br><br>The spatial object, you&#39;d be interested in is the itk::BoxSpatialObject. This enables you to specify fixed and moving image bounds. (Note that spatial objects, unlike regions are expressed in physical coordinates).
<br><br>Hope this helps<br><br>-- <br>Karthik Krishnan<br>R&amp;D Engineer,<br>Kitware Inc.<br>Ph: 518 371 3971 x119<br>Fax: 518 371 3971
<br><br><div><span class="gmail_quote">On 11/2/07, <b class="gmail_sendername">Xabier Artaechevarria Artieda</b> &lt;<a href="mailto:xabiarta@unav.es">xabiarta@unav.es</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all,<br>I would like to compute Mutual Information between corresponding<br>regions of two different images.<br>In other words: I have Image1 and Image2 and I would like to know the<br>MI between RegionA of Image1 and RegionA of Image2 (same region for
<br>two images). I see there is a &quot;SetFixedImageRegion()&quot; method in<br>itkMattesMutualInformationImageToImageMetric, but there is no<br>corresponding &quot;SetMovingImageRegion()&quot;.<br>Is it set automatically? Should I take a different approach?
<br><br>Thanks in advance and best regards,<br>Xabi<br><br>--<br>Xabier Artaechevarria<br>Cancer Imaging Laboratory<br>Centre for Applied Medical Research<br><a href="http://www.cima.es">www.cima.es</a><br><br><br><br><br>
<br><br>----------------------------------------------------------------<br>Este mensaje ha sido enviado desde <a href="https://webmail.unav.es">https://webmail.unav.es</a><br><br>_______________________________________________
<br>Insight-users mailing list<br><a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br><a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br></blockquote>
</div>