[Insight-users] Problem about the ITKAPP-IntensityBased2D3DRegistration : API Changes in CenteredEuler3DTransform

Luis Ibanez luis.ibanez at kitware.com
Mon Jul 23 08:20:45 EDT 2007


Hi Jimmy,

Thanks for letting us know about your version of Insight and
InsightApplications.

This seems to be a real bug:

The API of itkCenteredEuler3DTransforms changed around March 2005, and this
program was not updated correctly to match the new API.

http://www.itk.org/cgi-bin/viewcvs.cgi/Code/Common/itkCenteredEuler3DTransform.h?root=Insight&r1=1.4&r2=1.5

The most recent API of the itkCenteredEuler3DTransform  used 9 parameters:

   3 for rotation
   3 for translation
   3 for the center of rotation

The program however, still expects only 6 parameters:

  3 for rotation
  3 for translation


We have just reported this as Bug#5382:
http://public.kitware.com/Bug/bug.php?op=show&bugid=5382


The simplest solution is for you to replace the

   CenteredEuler3DTransform

with the

   Euler3DTransform

We are now making similar changes in the CVS version of InsightApplications.


----


  Regarding the meaning of the Optimizer scales please read the
  ITK Software Guide

     http://www.itk.org/ItkSoftwareGuide.pdf


   in particular the "Image Registration" chapter.

   The purpose of the scaling array that is passed to the optimizer
   is to make more uniform the dynamic range of the Transform
   parameters. E.g.  radians in rotations versus millimeters in
   Translation.

   The size of the parameter scaling array *MUST* be the same
   of the number of Transform parameters, since each element
   of the parameter scaling array correspond to one of the
   Transform parameters.


   This is explained in the ITK Software Guide, and has been
   discussed many times in the list. Please read the guide and
   let us know if you still have any questions.


       Thanks


            Luis




==============================================
On 7/23/07, jimmy <jimmy_lab at 163.com> wrote:
>
> Thank you for your reply.
>
> The version of Insight and InsightApplication are both 2.8.1.
> The source file of IntensityBased2D3DRegistration is also attached.
>
> Line 994 is where the problem located.
> Could you tell me that what the meaning of weightings here used by
> Optimizer?
> optimizer->SetScales(weightings);  // <- what do the scales stand for?
>
> I have also downloaded the newest version of
> IntensityBased2D3DRegistration, it seems to be unchanged.
> The file version is  "Version:   $Revision: 1.4 $ ".
>
> Thanks in advance.
>
>
> ------------------
> jimmy
> 2007-07-23
>
> -------------------------------------------------------------
> 发件人:Luis Ibanez
> 发送日期:2007-07-22 23:01:25
> 收件人:jimmy
> 抄送:insight-users
> 主题:Re: [Insight-users] Problem about
> the        ITKAPP-IntensityBased2D3DRegistration
>
>
> Hi Jimmy,
>
>    What version of Insight             are you using ?
>    What version of InsightApplications are you using ?
>
> Over time the API of some of the ITK transforms has changed.
> Notably, the Center of rotation, used to be part of the
> parameters of the transform. This may explain the mismatch
> between 6 and 9 parameters.
>
> It is likely that you are combining two imcompatible versions
> of Insight and InsightApplications.
>
>
> Please let us know,
>
>
>    Thanks
>
>
>       Luis
>
>
> --------------
> jimmy wrote:
> > Hi, everyone:
> >
> > When I running the ITKAPP [IntensityBased2D3DRegistration],
> > an error occurs as the following:
> >
> > itk::ExceptionObject (00F7FCD0)
> > Location: "void __thiscall
> itk::RegularStepGradientDescentBaseOptimizer::Advance
> > OneStep(void)"
> > File:
> ITKSource\Code\Numerics\itkRegularStepGradientDescentBaseOptimizer.cxx
> > Line: 200
> > Description: itk::ERROR: RegularStepGradientDescentOptimizer(015128A8):
> The size
> >  of Scales is 6, but the NumberOfParameters for the CostFunction is 9.
> >
> > Can someone tell my why?   ( The test example is from BrainWeb )
> >
> > 1.
> > Is it the problem of
> > itk::Optimizer::ScalesType weightings( 6 );  ?
> >
> > What does it use for?  How to expand it into *9?*
> >
> > 2.
> > And when I ignore the option of the command line
> >  ./IntensityBased2D3DRegistration [-t -100 -100 -100] projection.mhd/data/BrainWeb/brainweb165a10f17.mha
> >
> > The iteration of optimizer is 0, and the parameters of transform do not
> change.
> > furthermore the programe crashed when writing the wrong result image.
> >
> > Don't you think it is more reasonable that we should not input any
> tranformation information before registration?
> >
> >
> >
> > --------------
> > jimmy
> > 2007-07-18
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org
> > http://www.itk.org/mailman/listinfo/insight-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070723/0dd3076b/attachment.htm


More information about the Insight-users mailing list