[Insight-users] itkLinearInterpolateImageFunction

Luis Ibanez luis.ibanez at kitware.com
Sat Jun 20 15:50:10 EDT 2009


Hi Anja,

The B-Spline deformable registration in ITK is simply using a
B-Spline deformable Transform as the Transform in the standard
registration framework.

You may want to study first the standard registration framework.
Most of your questions in this email thread refer actually to the
inner workings of the registration framework, and are independent
of the type of transform that you use.

The registration process does not resample the moving image.
(at least not explicitly).  What is does is to compute on-demand
the intensities of the Moving image that will correspond to given
points of the fixed image.

In order to understand this better please read

A) Geometric Transformations section of the Software Guide.
     This is the section describing all the uses of the Resample
     ImageFilter.   This section will answer your questions about

      a) Direction of the transform
      b) How a Moving image is mapped to a Fixed image


B) "Image Registration" chapter.
     This describes the inner working of the registration framework.


In Pseudo code, an iteration of the Optimizer in the registration
framework will do the following:

   1) Take the array of current Transform parameters
   2) Initialize the Transform using these parameters
   3) Compute the Metric (for example a MeanSquares)
       3.1) For Every pixel in the Fixed Image
         3.1.1) Compute the physical coordinates of the
                   pixel by taking into account: image origin
                   spacing and direction
         3.1.2) Use the Transform to map the point from
                    the Fixed image coordinate system to the
                    Moving image coordinate system.
         3.1.3)  Using the Moving image parameters convert
                    the physical coordinates of the mapped point
                    into an image continuous index
                    (in the Moving image grid)
         3.1.4)  Interpolate the intensity of the Moving image
                    at that continuous index position.
          3.1.5) computes the difference between the moving
                    image intensity at that point and the fixed
                    image intensity at the pixel that we took in
                    (3.1.1).   Compute the square, add it to the
                    accumulator.
       3.2) Divide the sum in the accumulator by the number
               of visited pixels.

 At this point the optimizer will analyze the metric value
and will decide what parameters of the Transform to test
next.

As you can see, the Moving image is not explicitly mapped
to the Fixed image, however, points from the Fixed image
were mapped to the moving image in order to find the
moving image intensity at those mapped locations.

Note that in all of the above, the nature of the Transform
is irrelevant. We simply need the Transform to provide
the functionality of mapping points from the Fixed image
coordinate system in to points in the Moving image
coordinate system.


In the case of the BSpline deformable transform, the
parameters of the Transform (as explained in the
Software Guide) are the collection of components of the
displacement vectors associated with each one of the
nodes in the B-Spline grid. In your email you seem to
be confusing the points from the Fixed image pixels
with the nodes of the BSpline grid.



Again,

Please read the sections of the Software Guide
and let us know if you have further questions,



     Thanks



             Luis



-----------------------------------------------------------------------------------------
On Sat, Jun 20, 2009 at 2:59 PM, Anja Ende <anja.ende at googlemail.com> wrote:

> Hi Luis,
>
> Thanks for the reply. Things are clearer now. When I said "non-rigid",
> I meant mostly registration based on free form deformations (B-splines
> for example). I was trying to understand how the moving image will be
> transformed before it is compared with the fixed image in the
> calculation for similarity metric.
>
> So, if I understand correctly, the registration process will move the
> control points for the b-spline to give a new set of sample points. I
> am a little bit confused about what happens after? Do we now
> interpolate back from this new sample points to the sample points in
> our original image and compute the similarity matrix?
>
> I guess my doubts are with the registration process itself.
>
> Thanks,
>
> Anja
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090620/f4337e00/attachment.htm>


More information about the Insight-users mailing list