[Insight-users] itk neighborhood operator image filter error

Luis Ibanez luis.ibanez at kitware.com
Tue, 20 Apr 2004 21:01:16 -0400


Hi Raghu,

If the metric value gets to a stable value you can
define a stopping criterion by using the Gradient
Magnitude Tolerance.

In the case of the RegularStepGradientDescentOptimizer
http://www.itk.org/Insight/Doxygen/html/classitk_1_1RegularStepGradientDescentBaseOptimizer.html

You call:

      SetGradientMagnitudeTolerance();

The optimizer will stop when the magnitude
of the Metric gradient is less than this
value.

The default value is :   1 e-4


You will find the code that controls the optimizer in

     Insight/Code/Numerics/
         itkRegularStepGradientDescentBaseOptimizer.cxx

In line 197.


----


If you use the RegularStepGradientDescent optimizer, the
step length is divided by two each time the gradient change
directions.


If you use the GradientDescent optimizer, the learning
rate is constant. You could however change it from the
Execute() method of a Command/Observer.


You will find the code for the GradientDescentOptimizer at

        Insight/Code/Numerics/
           itkGradientDescentOptimizer.cxx



   Regards,


      Luis


---------------------
raghu venkatram wrote:
> 
> 
> Hi Luis,
> 
> Using the gradient descent optimizer, even with 2000 iterations, my 
> registration does not converge. But my results do look good, as a plot 
> of my iterations vs my metric, my metric kind of flattens out after a 
> certain number of iterations.
> 
> my question is the learning rate constant throughout the process? or is 
> it divided my the current iteration something like r/iteration no.?
> 
> thanks,
> raghu
> 
> >From: Luis Ibanez <luis.ibanez at kitware.com>
> >To: raghu venkatram <raghu_420 at hotmail.com>
> >CC: insight-users at itk.org
> >Subject: Re: [Insight-users] itk neighborhood operator image filter 
> error
> >Date: Tue, 20 Apr 2004 14:34:15 -0400
> >
> >
> >Hi raghu,
> >
> >The optimizer scales do not need to be different among
> >X, Y, and Z. Unless the anisotropy ratio as big as 1:10.
> >
> >The goal of the parameter scaling is to deal with large
> >dynamic range differences such  as degrees versus
> >millimeters where the ratio is in the range of 1:100.
> >
> >If your metric plots shows the Metric behaving smoothly,
> >you can take the risk of *increasing* (not decreasing)
> >the step length of the optimizer, and probably reducing
> >the number of iterations.
> >
> >Note however that if your registration is using all the
> >allotted iterations, it means that it has not converged,
> >and that you still have homework to do in parameter
> >tunning.
> >
> >
> >
> >    Regards,
> >
> >
> >       Luis
> >
> >
> >
> >------------------------
> >raghu venkatram wrote:
> >
> >>Hello Luis,
> >>
> >>Thank you for the tip, it was ofcourse my CT volume, I was only
> >>reading 2 slices. I am not sure why this is happening as I used
> >>MRICro to convert both my CT and MR volumes into mayo clinic
> >>analyze format and everything works fine. using ITK's dicom series
> >>reader reads my MR volume and am able to wrtie it out, but it dies
> >>on the third slice of my CT volume.
> >>
> >>Also regarding registration itself, i am using viola-wells mutual
> >>information, with gradient descent and the translation transform.
> >>in this set up should my my optimizer scales for x and y be equal
> >>to 1 while my optimizer scale for z slightly greater than 1? my z
> >>in the volume is much smaller than the inplane dimensions.
> >>
> >>with a step size of 18 and 500 epochs, i am getting good results,
> >>and a final metric value of 0.2-0.4,  a plot of the iteration vs
> >>metric shows that the metric is fairly stable with this, should i
> >>decrease the step size and increase the iterations further?
> >>
> >>
> >>
> >>thanks
> >>
> >>raghu
> >>
> >>  >From: Luis Ibanez <luis.ibanez at kitware.com>
> >>  >To: raghu venkatram <raghu_420 at hotmail.com>
> >>  >CC: insight-users at itk.org
> >>  >Subject: Re: [Insight-users] itk neighborhood operator image
> >>filter error
> >>  >Date: Mon, 19 Apr 2004 19:43:23 -0400
> >>  >
> >>  >
> >>  >Hi Raghu,
> >>  >
> >>  >It is likely that your process for reading the
> >>  >DICOM series is failing.  The fact that it shows
> >>  >up in the Neighborhood iterator may simply indicate
> >>  >that you are reading an image of a single slice,
> >>  >for example.
> >>  >
> >>  >Please connect a ImageFileWriter directly to the
> >>  >output of the DicomSeries reader and save the
> >>  >image in another format. MetaImage will be the
> >>  >best choice since then you can look at the header
> >>  >and figure out what information from the DICOM
> >>  >file is getting lost on the way.
> >>  >
> >>  >Chances are that you only have a Input/Output
> >>  >problem and not a processing problem.
> >>  >
> >>  >
> >>  >I will also suggest you to try the example
> >>  >
> >>  >     Insight/Examples/IO/
> >>  >         DicomSeriesReadImageWrite.cxx
> >>  >
> >>  >for reading your Dicom images, and to make sure
> >>  >that you are using the series reader correctly.
> >>  >
> >>  >For example, note that you should specify the
> >>  >string identifying the series to be read.
> >>  >
> >>  >
> >>  >Please let us know what you find.
> >>  >
> >>  >
> >>  >
> >>  >    Thanks,
> >>  >
> >>  >
> >>  >       Luis
> >>  >
> >>  >
> >>  >-----------------------
> >>  >raghu venkatram wrote:
> >>  >>Hello Luis,
> >>  >>  I am trying to register a MR and CT image using 
> ImagetoImage
> >>  >>mutual information measure, I have no problems 
> whatsoever using
> >>the
> >>  >>analyze image format.
> >>  >>  when i switch to dicom, and use the series reader, i 
> can read
> >>  >>both the series, but my program terminates with an 
> error window
> >>  >>asking me to notify microsoft, debug option takes me 
> to the
> >>  >>itkneighborhoodoperator filter.
> >>  >>  is there something obvious that i am doing wrong? my 
> image
> >>types
> >>  >>are unsigned short 3 dimensions.
> >>  >>  thanks,
> >>  >>raghu
> >>  >>
> >>  >
> >>  >
> >>  >_______________________________________________
> >>  >Insight-users mailing list
> >>  >Insight-users at itk.org
> >>  >http://www.itk.org/mailman/listinfo/insight-users
> >>
> >>------------------------------------------------------------------------ 
> 
> >>Check out MSN PC Safety & Security to help ensure your PC is
> >>protected and safe. <http://g.msn.com/8HMAENUS/2749??PS=>
> >>_______________________________________________ Insight-users
> >>mailing list Insight-users at itk.org
> >>http://www.itk.org/mailman/listinfo/insight-users
> >
> >
> >
> 
> _________________________________________________________________
> 
>> From must-see cities to the best beaches, plan a getaway with the Spring 
> 
> Travel Guide! http://special.msn.com/local/springtravel.armx
> 
>