<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;"><div><br></div><div><br></div>Good evening,</span></font><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br></span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;">I am a novice ITK user and I am current working on an image-registration project. I would like to clarify the regions over which similarity metrics are calculated.</span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br></span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br></span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;">Based on very general descriptions of both the itk::MeanSquaresImageToImageMetric and the itk::NormalizedCorrelationImageToImageMetric classes ("Detailed Description" section of the Doxygen documentation) and the more detailed description of the itk::MattesMutualInformationImageToImageMetric, it appears that these metrics are calculated using a region of the fixed-image and a corresponding moving-image region from an applied transform and interpolator.</span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br></span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;">The ITK Software Guide, page 415, Section 8.10, "Metrics", states: "Typically, the metric samples points within a defined region of the fixed image. For each point, the corresponding moving image position is computed using the transform with the specified parameters, then the interpolator is used to compute the moving image intensity at the mapped position."</span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br></span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br></span></font></div><div><span class="Apple-style-span" style="font-family: Arial; font-size: 14px; ">With this in mind, and considering the entire fixed-image area/region unless noted otherwise, three cases come to mind:</span></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br></span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;">1.) No initial overlap (even with an applied initial tranformation) of the fixed-image and moving-image. In this obvious case, no metric can be determined.</span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br></span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;">2.) Partial overlap of the fixed-image and moving-image. Considering an initial identity-transform with no rotation/translation/etc., only the common area/region of the fixed and moving images are used to determine the metric. If an initial rotation/translation/etc. is applied along with the identity-transform, the common area/region could be smaller or larger depending on the resulting movement.</span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br></span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;">3.) Fixed-image bounded by moving-image. As with 2., consider an initial identity-transform. Either because the fixed-image area/region is smaller than the moving-image area/region or a region-of-interest has been applied to the fixed-image, two possibilities exist. a.) No initial rotation/translation/etc. - all fixed-image area/region is used for metric determination. b.) Large rotation/translation/etc. partial fixed-image area/region is used depending on amount of movement. Of course, a non-identity transform could also change number of pixels/voxels considered.</span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br></span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br></span></font></div><div><span class="Apple-style-span" style="font-family: Arial; font-size: 14px; ">The ITK Software Guide (Section 8.10) indicates the S<span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px; "><font style="font: 9.0px Courier"><font class="Apple-style-span" face="Arial" size="4">etFixedImageMask()</font></font><font style="font: 12.0px Helvetica"><font class="Apple-style-span" face="Arial" size="4"> </font></font><font style="font: 9.0px Times"><font class="Apple-style-span" face="Arial" size="4">and</font></font><font style="font: 12.0px Helvetica"><font class="Apple-style-span" face="Arial" size="4"> SetMovingImageMask() methods of the itk::ImageToImageMetric class can also be used to refine metric calculations. With respect to the SetFixedImageMask() method, an itk::RegionOfInterestImageFilter could also be applied to define a smaller, fixed-image working area/region? How is the SetMovingImageMask() typically applied?</font></font></span></span></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br></span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br></span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;">Thank you, </span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br></span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;">Michael.</span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br></span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br></span></font><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;">M. Wirtzfeld</span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;">Robarts Imaging</span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;">London, ON</span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br></span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;">"There are three kinds of lies: lies, damned lies, and statistics." - Benjamin Disrael</span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br></span></font></div><div><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br></span></font></div></span><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br class="Apple-interchange-newline"></span></font></span><font class="Apple-style-span" face="Arial" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br class="Apple-interchange-newline"></span></font> </div><br></div></body></html>