<br>Hi Pinpress,<br><br><br>Thanks for the additional information.<br><br><br>It escaped to me that in your first email you mentioned<br>that you were using Normalized MI.<br><br>That fact indeed explains the behavior that you are observing :-)<br>
<br><br>Normalized MI doesn't use the subsampling functionality<br>that is provided in the base ImageToImageMetric class.<br><br><br>The only metrics that use sub-sampling are:<br><br>* itk::MutualInformationImageToImageMetric<br>
* itk::MattesMutualInformationImageToImageMetric<br>* itk::MeanSquaresImageToImageMetric<br><br><br>I apologize for missing that important piece <br>of information from your initial email.<br><br><br> Regards,<br><br>
<br> Luis<br><br><br>-----------------------------------------------------------------<br><div class="gmail_quote">On Wed, May 26, 2010 at 5:59 PM, pinpress <span dir="ltr"><<a href="mailto:sb_ji@yahoo.com">sb_ji@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br>
Hi Luis,<br>
<br>
Thanks for the reply. Please see below for my answers.<br>
<div class="im"><br>
<br>
Hi Pinpress,<br>
<br>
Thanks for your clarification.<br>
<br>
---<br>
<br>
A change from 10% of samples to 100% of samples should be<br>
noticeable in the time that it takes to compute the registration.<br>
<br>
<br>
A) How big are your images ?<br>
</div>> My images are typically 256-by-256-by-120, or that range.<br>
<div class="im"><br>
B) How many pixels do they have ?<br>
</div>> About 8 million voxels/pixels each, for both fixed and moving images.<br>
<div class="im"><br>
<br>
C) How many iterations did your optimizer ran ?<br>
</div>> I set the maximum iterations to be 200, but the program will stop if other<br>
> convergence criterion is met (e.g.,<br>
<div class="im"><br>
D) What Transform are you using ?<br>
<br>
</div>> I used the following in the code:<br>
<br>
#include "itkVersorRigid3DTransform.h"<br>
#include "itkCenteredTransformInitializer.h"<br>
<br>
#include "itkVersorRigid3DTransformOptimizer.h"<br>
<div class="im"><br>
<br>
<br>
something else might be at play here....<br>
<br>
</div>> Not sure why. But if I simply change the similarity metric to Mattes and<br>
> keep everything else the same, then the difference in computational cost<br>
> is obvious. Another thing to note is that the Mattes MI metric is<br>
> multi-threaded, so I was able to use all 8 CPUs, whereas other metrics are<br>
> not multi-threaded. Therefore I was only able to use one CPU. Regardless,<br>
> if I choose only to use 1 CPU for Mattes MI metric, the # of spatial<br>
> samples still play a role in computational cost.<br>
<div class="im"><br>
> Thanks for looking into this!<br>
<br>
Luis<br>
<br>
<br>
</div><font color="#888888">--<br>
View this message in context: <a href="http://old.nabble.com/SetNumberOfSpatialSamples-has-no-effect-on-computation-time----tp28486979p28687052.html" target="_blank">http://old.nabble.com/SetNumberOfSpatialSamples-has-no-effect-on-computation-time----tp28486979p28687052.html</a><br>
</font><div><div></div><div class="h5">Sent from the ITK - Users mailing list archive at Nabble.com.<br>
<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</div></div></blockquote></div><br>