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