[Insight-users] What optimizer and transform can/should I use?

Luis Ibanez luis.ibanez at kitware.com
Mon Jun 20 10:27:06 EDT 2005


Hi Yu,

Please provide more technical details instead of
anecdotic information.

If you are honestly concerned about speed, you
must start by reporting the following information:

  1) What is the size of your images ?
  2) In what machine are you running this program ?
  3) Did you compiled the program for Release ?
  4) What Interpolator are you using ?


Two seconds may be excellent if your images are in
the range of Gigabytes,.. and it is very poor if
your images are in the range of Kilobytes.

Two seconds are to be expected if you are using
an old SGI machine, and indicate that something
is wrong if you are running in a contemporary
Desktop.

Two seconds may be ok if you are compiling your
code for Debug, because in that case most of
the functions that could have been inlined...
are not compiled inline.

The bulk of the computation during one iteration
of the optimizer is spend on Interpolation and
on Mapping. A slow interpolator will have a
dramatic effect on the time needed for completing
one iteration.


Please let us know the answers to
the questions above,



     Thanks


       Luis



-----------------------------------------------------
Yu Qi wrote:

> Hi,
> I tried the Versor transform function and optimizer.
> and following is the code for metric
>  
> / unsigned int numberOfBins =32;
>   MetricType::HistogramType::SizeType histogramSize;
>   histogramSize[0] = numberOfBins;
>   histogramSize[1] = numberOfBins;
>   metric->SetHistogramSize( histogramSize );
>  /
> /  const unsigned int numberOfParameters = 
> transform->GetNumberOfParameters();/
> /  typedef MetricType::ScalesType ScalesType;
>   ScalesType scales( numberOfParameters );/
> /  scales.Fill( 1.0 );
>    
>   metric->SetDerivativeStepLengthScales(scales);/
> / 
>  /
> I do not know why the computation was so slow.
> Every iteration will take 2 second.
> Do you know why?
>  
> Thanks!
> Best regards,
> Yu Qi
> *//* 
> *//* 
> *//* 
> */Luis Ibanez <luis.ibanez at kitware.com>/* 写道:
> 
> 
>     Hi Yu,
> 
> 
>     The Optimizers to use depends a lot on the Transform
>     that you choose. Therefore the decision about the
>     Transform should be taken first.
> 
>     Since this is 3D and you probably are dealing with
>     images from the same patient, I would suggest that
>     you use a rigid Transform such as:
> 
>     VersorRigid3DTransform
>     http://www.itk.org/Insight/Doxygen/html/classitk_1_1VersorRigid3DTransform.html
> 
>     and therefore use the
> 
>     VersorRigid3DTransformOptimizer
>     http://www.itk.org/Insight/Doxygen/html/classitk_1_1VersorRigid3DTransformOptimizer.html
> 
> 
>     There are multiple options for Mutual Information, but
>     if you insist in using Normalized Mutual Information,
>     then the class that you need is:
> 
>     http://www.itk.org/Insight/Doxygen/html/classitk_1_1NormalizedMutualInformationHistogramImageToImageMetric.html
> 
> 
>     You will fin! d a versy similar example on the
>     ITK Software Guide
> 
>     http://www.itk.org/ItkSoftwareGuide.pdf
> 
>     in section: 8.6.4, pdf-page 391. The source code is
>     available in
> 
> 
>     Insight/Examples/Registration/
>     ImageRegistration8.cxx
> 
> 
> 
>     You are *STRONGLY* encouraged to read the full Chapter
>     on registration before you attempt to use this particular
>     example.
> 
> 
> 
>     Regards,
> 
> 
>     Luis
> 
> 
> 
>     --------------
>     Yu Qi wrote:
>      > Hi.
>      > I am going to register 3d MRI and fMRI using Normalized MI metric.
>      >
>      > What optimizer and transform can I use?
>      > Can I use any of the transform and optimizer supplied by ITK?
>      >
>      > And which is the most popular one for normalized MI?
>      >
>      > Thank you!
>      >
>      >
>      >
>      >
>      > *Best Regards!*
>      > **
>      > *Yu Qi*
>      >
>      >
>      >
> 
> 
> __________________________________________________
> 赶快注册雅虎超大容量免费邮箱?
> http://cn.mail.yahoo.com
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users





More information about the Insight-users mailing list