[Insight-users] Registration?

Luis Ibanez luis.ibanez@kitware.com
Mon, 04 Nov 2002 22:50:22 -0500


Hi Ghassan,

Yes,
Introducing a mask in the evaluation of the metric
is something that can be easily done.

The point will be to prevent this feature from slowing
down the process for those that are not interested in
using a mask.

If you want to explore the idea of a mask, you may
take a look at any of the metrics. For example
MeanSquares, in the file Insight/Code/Algorithms

      itkMeanSquaresImageMetric.txx


lines 74 to 81:  The heart of the Metric computation
involves to take a point from the fixed image, map it
through the transform, and use the resulting position
to probe the value in the moving image (using an interpolator).



     if( m_Interpolator->IsInsideBuffer( transformedPoint ) )
       {
       const RealType movingValue  = m_Interpolator->Evaluate(
                                                  transformedPoint );
       const RealType fixedValue   = ti.Get();
       m_NumberOfPixelsCounted++;
       const RealType diff = movingValue - fixedValue;
       measure += diff * diff;
       }



The code is placed inside an if() that verifies if the
pixel to be tested is in the allocated buffer.

You could easily add another condition to this "if",
for example, something like:

     if( m_Interpolator->IsInsideBuffer( transformedPoint ) )
         && m_Mask->GetPixel( transformedPoint ) == 1 )


In some way, in the current code, the BufferedRegion is
the default mask.



Please let us know if you would like to have more
details about how to implement the mask functionality.



   Thanks


    Luis


==========================================================

Ghassan Hamarneh wrote:

>>>4)  We could easily modify the registration framework
>>>    to evaluate the metrics is a set of selected regions.
>>>    Rigth now, you provide a specific rectangular (ND)
>>>    region on the fixed image.  This could be replaced
>>>    with a set of regions, in order to require only one
>>>    full slice to be on memory for the moving image,
>>>    while the fixed image will be loaded as a set of
>>>    smaller regions of interest.
>>>
> 
> 
> Would it be possible to use a 3D mask (binary or fuzzy) when evaluating the
> registration similarity metrics?  Is that something that can be easily
> incorporated?
> 
> /Ghassan
> 
> Ghassan Hamarneh
> Hospital for Sick Children
> Toronto
> 
> 
> 
> ______________________________________________________________________ 
> Post your free ad now! http://personals.yahoo.ca
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
> 
>