[Insight-users] Reply:Re: how to warp moving image to fixed image and the size is equal the moving image for bspline?

Luis Ibanez luis.ibanez at kitware.com
Fri Apr 17 16:16:44 EDT 2009


Hi Han,

Thanks for the clarification.

Let's follow your notation:

Let's call A the Fixed Image and
Let's call B the Moving Image.

The motion field (or deformation field) in ITK will be defined
in the domain of the Fixed image and it will map to the domain
of the Moving image.

This means, that given a point in the fixed image, you will
add to it the vector value from the deformation field in order
to find the corresponding point in the moving image.

Regarding the resampling of the images:


A) If you are using BSplineDeformableTransform:
    You will map the Moving image to the space of the Fixed
    image by simply using the itk::ResampleImageFilter.

    You will find multiple examples under

       Insight/Examples/Registration/

BSplineWarping1.cxx
BSplineWarping2.cxx
DeformableRegistration4.cxx
DeformableRegistration6.cxx
DeformableRegistration7.cxx
DeformableRegistration8.cxx
DeformableRegistration12.cxx
DeformableRegistration13.cxx
DeformableRegistration14.cxx
DeformableRegistration15.cxx


B) If you are using Demons or FEM base registration then
    the resulting deformation field is generated as an image
    of Vectors, and you can use the itkWarpImageFilter in
    order to resample the Moving image into the Fixed image
    coordinate system.

    See Examples:

       Insight/Examples/Registration/

DeformableRegistration2.cxx
DeformableRegistration3.cxx
DeformableRegistration5.cxx
DeformableRegistration9.cxx
DeformableRegistration10.cxx
DeformableRegistration16.cxx
DeformableRegistration17.cxx

LandmarkWarping2.cxx


3) Overlap is to be measured between the Moving image domain
    and the *mapped* Fixed image domain.

    Pixels that fall outside of the overlap will simply be set
    to the "Default" pixel value that you set in both the
    itkResampleImageFilter and the itkWrapImageFilter.


I strongly encourage you to read the Image Registration
chapter of the ITK Software Guide

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

in particular the Section of Deformable Registration.
and to play with the many source code examples described
above.


   Regards,


       Luis


-----------------
Han D. F wrote:
> 
> Hi Luis,
> I would like to make my question clearly.
> Suppose I have two images A (in state S_A) and B(in state S_B),  so 
> there may be a motion field between A and B (also we can say there may 
> be a motion field between S_A and S_B).
> I want to transform A to B. If the motion between A and B is rigid, I 
> can first find the overlap between A and B  and compute the transform 
> matrix, then the transform matrix can be applied to every pixel in A to 
> get a new version A'.
> But the transform is non-rigid, so I only can transform the pixels in 
> the overlaps. The pixels out the overlap can not be transfered. (my 
> understanding is right?)
> This is my main problem.  how to transform the pixels out the overlap ?
> 
> Now , let me make a summary:
> (1) Image A and B have some overlap.
> (2) We can compute the bspline parameters between A and B (note only 
> valid in overlap regions ).
> (3) I want to transfer every pixels in A using the spline parameters.
> 
> This is for bspline case. If I use optical flow method, the velocity is 
> only in the overlap, how to transform the pixels out the overlap?
> 
> I am not sure if I  make it clearly.
> may be my understanding is wrong.
> thanks
> best
> 
> Han
> 
> ÔÚ2009-04-17 01:12:07£¬"Luis Ibanez" <luis.ibanez at kitware.com> дµÀ£º
>>
>>Hi Han,
>>
>>
>>The description of your problem is not very clear.
>>
>>
>>You say that:
>>
>>
>>    A) Your Fixed and Moving images have the same size.
>>
>>    B) You are doing deformable registration using BSplines.
>>
>>    C) Fixed and Moving images have a small overlap between them.
>>
>>    D) That your goal is to deform the *fixed* image !!!
>>       Is that right ?
>>
>>
>>----
>>
>>Can you confirm if (A,B,C and D) are indeed what you
>>want to do ?
>>
>>
>>    Thanks
>>
>>
>>       Luis
>>
>>
>>-----------------
>>Han D. F wrote:
>>> 
>>> hello dears,
>>> 
>>> I have fixed image and moving image to be registered.
>>> my goal is to warp moving image to fixed image and the size is equal to 
>>> moving image size.
>>> here is the question:
>>>  the examples just warp to the results image with size of fixed image.
>>> 
>>> how to solve my question?
>>> 
>>> fixed image and  moving image have some overlap but not very much.
>>> then I just used the overlap to compute the b-spline parameters.
>>> my final goal is to deformed the whole fixed image using bspline parameters.
>>>  so some problems I mentioned above will occur.
>>> 
>>> anybody can give me some suggestion?
>>> 
>>> thanks a lots.
>>> 
>>> best
>>> hdf
>>>  
>>> 
>>> 
>>> 
>>> 
>>> 
>>> ------------------------------------------------------------------------
>>> ÍøÒ×ÓÊÏ䣬ÖйúµÚÒ»´óµç×ÓÓʼþ·þÎñÉÌ <http://email.163.com>
>>> 
>>> 
>>> ------------------------------------------------------------------------
>>> 
>>> _____________________________________
>>> Powered by www.kitware.com
>>> 
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>> 
>>> Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ
>>> 
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.itk.org/mailman/listinfo/insight-users
> 
> 
> 
> ------------------------------------------------------------------------
> ÍøÒ×ÓÊÏ䣬ÖйúµÚÒ»´óµç×ÓÓʼþ·þÎñÉÌ <http://email.163.com>


More information about the Insight-users mailing list