[Insight-users] Mutual Info-based Registration on Ultrasoundimage

Luis Ibanez luis.ibanez at kitware.com
Tue, 20 Apr 2004 22:29:26 -0400


Hi Thomas,

The effect that you observe when you place the images
in a loop or outside the loop may just be the consequence
of the seed initialization for the random number generator.

The random sampling performed inside the Viola-Wells metric
makes virtually impossible to repeat an experiment, unless
you take care of reinitializaing the random seed in the same
way every time.

Regardless of this stochastic nature of this Metric, a good
setup of the other registration parameters should allow the
optimizer to converge to more or less the same region of the
parametric space.


Please take a look at the Metric plots, that will start
throwing some light on the characteristics of your registration
problem.


    Regards,


       Luis


----------------------------
Thomas - Kuiran Chen wrote:

> Hi Luis,
> 
> Thanks so much for the detailed input!   It is really "insightful", :-).
> 
> I've tried the Mattes implementation and the result is better than that of Viola's.  My registration objective is to match two 2D US images.
> 
> I am eager to try the program and methods you suggest on my ultrasound dataset  to fine-tune the method, and will report to you any of my findings when available.
> 
> BTW, another behavior I found on Viola's implementation in ITK is also interesting, which I am not quite sure if it is a bug or something else.  
> 
> I tried using two identical US images and the optimizer gave one set of outputs (BestValue, TranslationInX, TranslationInY. etc.), and the result is consistant all the time.  Then I put the same image inside a group with other different US images, and used a for-loops to compare each of them to this very same US image, again using the Viola ITK method.  When the process went though the two identical images, what I expected was that it should give me the same outpus as before when two single identical image were compared.  However, the result was totally different (BestValue, TranslationX and TranslationY were all different to the previous output, and definitely not to a small extent).  I discovered that if the two identical images are placed in the first round of the for-loop to do the matching, the value would be the same as previous, but if the images are not placed in the first position, the result varies by the positions they were in the comparing queue.   
> 
> Inside the for-loop, I carefully destroyed the registration module after every run of matching.  The registration module I wrote is basically a wrapper class of ImageRegistration2, and it was created on the heap so I can explicitly destroyed it at the end of each loop, therefore I don't really understand why the result is not consistant and depends on the order of matching.  
> 
> If you deem necessary, I can send you my simple testing program for this behaviour (it writes all outputs to an ASCII file).
>                                                               
> Thanks very much again!
> 
> Thomas
> 
> 
> 
> ---------------------- Original Message ------------------------
> From: Luis Ibanez <luis.ibanez at kitware.com>
> To: Thomas - Kuiran Chen <chent at cs.queensu.ca>
> Sent: 2004-04-20 15:57:27
> Subject: Re: [Insight-users] Mutual Info-based Registration on Ultrasoundimage
> 
> 
> Hi Thomas,
> 
> Let me start by saying that we all have a lot of respect
> for those who dare to work with Ultra Sound images.  :-)
> 
> Ultrasound is more challenging for Mutual Information due
> to the presence of speckle/noise. Since MI uses a reduced
> number of samples (typically 50 to 100), there are good
> chances that the Metric values will have a large variability
> because samples will fall sometimes in bright speckle spots
> and sometimes in dark speckle spot.
> 
> I will suggest you to start by using the Mattes implementation
> of Mutual Information. This Metric produces a less noisy output
> than the Viola-Wells implementation.  This will not yet solve
> your problem though...
> 
> 
> Are you trying to register UltraSound to UltraSound ?
> or UltraSound to MRI ?
> 
> This will be very important in order to chose the metric and
> anticipate its behavior.
> 
> 
> 
> 
> In order to get some insight on how to tune the parameters
> for your optimization, probably the best thing to do is to
> study the characteristics of the Metric when computed over
> your images.  Please find attached a small program  that allows
> you to explore the values of the metric using a translation
> transform. You want to plot these values in order to get a
> feeling on the level of noise of the Metric, the presence
> of local minima, and the overall reproducibility of the Metric
> function itself. (you will have to convert the dimension
> to 3D, since the example was configured for 2D)
> 
> Please run this program first using the *same* input image
> as fixed and moving images, and let the translation be
> evaluated for a range that is close to 1/2 of the image extent
> (physical extent in millimeters).
> 
> Plot the values using your favorite plotting program. (anything
> from GNUPlot to Excel).
> 
> For examples on how these plot will look like, please take
> a  look at the course in Image Registration:
> 
>      http://www.cs.rpi.edu/courses/spring04/imagereg/
> 
>      In particular, look at lectures 8 and 9.
> 
> 
> Once you get this plot, I'll suggest you to experiment with
> the edge preserving smoothing filters described in the Software
> Guide. Run these filter as pre-processing of the input images,
> and then repeat the metric plots. Since the filters will reduce
> the noise, and hopefully some of the US speckle, it is to expect
> that the Metric plot will also be smoothed... and therefore
> easier to optimize.
> 
> You could also give it a try to more traditional smoothing such
> as Gaussians....
> 
> ---
> 
> It is not productive to fight with the registration + optimization
> until you find a way of generating relatively smooth Metric plots.
> Note that this is just an exercise on learning how to tune the
> parameters.  Once you figure out the parameters, you will not need
> to plot the Metric anymore.
> 
> Make sure that origin and spacing are correctly set in your images
> before you start computing all these metric plots.
> 
> 
> 
>    Please let us know if you have further questions.
> 
> 
>      Thanks
> 
> 
>         Luis
> 
> 
> -------------------------
> Thomas - Kuiran Chen wrote:
> 
> 
>>Hi Luis, 
>>
>>I've been trying to use ITK's implementation of viola's mutual information based registration (itk::MutualInformationImageToImageMetric) for ultrasound images.
>>
>>The parameter settings of the matric in the example (ImageRegistration2) work well on MRI image, but when I tried with ultrasound images (I even tried two identical images), the result was interesting but somehow unexpected.  The bestValue from the optimizer was around 0.5 (mutual info entropy), and the program suggested a translation of (0.11, 0.09) along X and Y directions, and the number of iterations used was 200. 
>>
>>The parameters need to be set are (as for the MRI image - BrainT1SliceBorder20.pgn, in the example):
>>
>>1. for itk::MutualInformationImageToImageMetric:
>>- Fixed and moving image standard deviation, the example suggests 0.4;
>>- Number of Spatial Sample Bins, the example uses 50;
>>
>>2. for itk::DiscreteGaussianImageFilter:
>>- Fixed and moving image smoother various, the example sets 2.0
>>
>>3. for itk::GradientDescentOptimizer:
>>- learning rate: set to 20.0 in the example
>>- number of iterations: 200
>>
>>Can you provide any hints/guidelines of how to play with these parameters for different image modality?  In particular, those work for ultrasound images?  Also is there any text I can find to explain these parameters in more details?
>>
>>Thanks a lot,
>>Thomas
>>
>>
>>
> 
> ================================================================
> 
> 
> --------------------------------------------------------------------
> 			
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>