<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi Karsten,<div><br></div><div>You can set the region which the metric is to be computed over by SetFixedImageRegion</div><div><br></div><div>method. Another approach is using the&nbsp;SetFixedImageSamplesIntensityThreshold method</div><div><br></div><div>which sets the minimum intensity needed for a sample to be included in the metric</div><div><br></div><div>computation.</div><div><br></div><div>Hope this
 helps,</div><div><br></div><div>Dawood</div><div><br></div><div><br></div><div>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;</div><div><br></div><div>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;</div><div><br></div><div><br></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 14px; line-height: 16px; ">Hi,<br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; "><br style="line-height: 1.2em; outline-style: none; outline-width: initial;
 outline-color: initial; ">I have the same problem with all the 'nan' values now. All threshold values greater than zero cause "nan"-values in my registration process, when I want to use the method SetFixedImageSamplesIntensityThreshold of the MeanSquaresImageToImageMetric. The datatype of the volumes to be registered is short.&nbsp;<br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; "><br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; ">I'm using the review code with optimized registration methods of ITK v3.20, but the same problem appears with the code from the latest itk git repository.<br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; "><br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; ">Thanks,<br style="line-height: 1.2em; outline-style: none;
 outline-width: initial; outline-color: initial; ">Karsten<br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; "><br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; "><br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; ">----------------------------------------<br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; ">Karsten Molka<br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; ">Department of Neurology<br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; ">Max-Planck-Institute for Human Cognitive and Brain Sciences<br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; ">Stephanstrasse 1A<br style="line-height: 1.2em;
 outline-style: none; outline-width: initial; outline-color: initial; ">04103 Leipzig<br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; ">Germany<br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; ">Email:&nbsp;<a ymailto="mailto:molka@cbs.mpg.de" href="http://us.mc1302.mail.yahoo.com/mc/compose?to=molka@cbs.mpg.de" style="line-height: 1.2em; text-decoration: underline; color: rgb(0, 51, 153); outline-style: none; outline-width: initial; outline-color: initial; ">molka@cbs.mpg.de</a><br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; ">www.cbs.mpg.de</span></div><div><br></div></td></tr></table>