[Insight-users] Registration - Mutual Information Metric - Sampling from Moving Image

Sharath Venkatesha sharath20284 at yahoo.com
Sat Jul 11 15:20:24 EDT 2009


Hi Luis,

Thanks for your reply. I am experimenting with non medical images, which are like those we see in google maps. I captured the images at different zoom values, and hence have high scaling parameters, and some rotation. These images are RGB 24 bit images, and I have taken care that the spacing in both cases is 1.0. I am using Affine transform. Further, I want to use projective transformation as explained in http://www.geom.uiuc.edu/docs/reference/CRC-formulas/node16.html and http://www.css.tayloru.edu/~btoll/s99/424/res/mtu/Notes/geometry/geo-tran.htm. 

Sorry for not being clear in the earlier mails. I am refering to functions GetValue() and GetValueAndDerivative() in itkMutualInformationImageToImageMetric() where the sampling of pixels from the fixed image is done.

Considering that A is the bigger image, and B is the smaller image, I performed the change that you mentioned, i.e setting B to fixed image, and A to moving image, while passing to the registration. In this case, I think A is warped continously through the different iterations of the optimizer.
But as a final result, I want to align the smaller image(B), as a sub part of the bigger image(A), by warping the smaller image. 

Hence I want to sample pixels in B, map them to A by the new transformation calculated in every iteration, and calculate the metric between the warped image of B and the fixed image of A. 
i.e I want to keep the bigger image A fixed.

Thus, I think the change should be done in the GetValue() and GetValueAndDerivative()  functions. Am I right here?

Does ITK have support for projective transformation as I mentioned earlier?

Thanks for all the help.

Sharath



________________________________
From: Luis Ibanez <luis.ibanez at kitware.com>
To: Sharath Venkatesha <sharath20284 at yahoo.com>
Cc: Insight users <insight-users at itk.org>
Sent: Saturday, July 11, 2009 10:25:18 AM
Subject: Re: [Insight-users] Registration - Mutual Information Metric -  Sampling from Moving Image

HI Sharath,

1) What value of region are you passing to 


 registration->SetFixedImageRegion( region )    ?


   The Metric only uses the pixels inside that region.

   So, depending on the region that you are passing,
   you may not be using the 2000x2000 pixels of
   the full image.

2)   Why do you have to use a big region in the Fixed image ?

3) What Transform are you using ?
    A scaling of 0.5 is unusual, and may indicate that
    the spacing declared by your images is wrong.

4)  What is the content of the images ?
      are these medical images ?


5) Sure, you can sample from the Moving image,
    You simply need to swap  the Fixed and Moving
    images and you should be ready to rerun the 
    registration.

6) What "functions", in what "respective" files are 
    you referring to ?

   If you want to sample from the Moving Image, then
   In principle you just need to replace:

        registration->SetFixedImage( imageA );
        registration->SetMovingImage( imageB );
        registration->SetFixedImageRegion( regionA );

with:

        registration->SetFixedImage( imageB );
        registration->SetMovingImage( imageA );
        registration->SetFixedImageRegion( regionB );



   Regards,


        Luis


----------------------------------------------------------------------------

On Sat, Jul 11, 2009 at 12:48 PM, Sharath Venkatesha <sharath20284 at yahoo.com> wrote:

Hi Luis,
>
>
>I am already using the 
>
>
> registration->SetFixedImageRegion( region ) 
>
>
>My scaling parameters are around 0.6 and rotation of 6-7
> degrees, I have to use a big region  in the fixed image (I am initialiazing with scale =0.5, and hence using a region of size 1280*960).  The performance has not improved
> much. 
>
>
>Hence I want to sample pixels from the moving image, and do a backward mapping to pixels in the fixed image( by the inverse transform parameters, that are estimated in each iteration of the optimizer). In this case, I think that almost all the points will be mapped, and hence the metric will be better. Also, it will take care of the scale and translation, as in the previous case, a wrong initial scale will make me miss out the the pixel values in the fixed image.
>
>
>
>
>Do I need to change the functions in the respective files, or is there a simpler way to do this, or is already implemented?
>
>Thanks,
>
>Sharath Venkatesha
>
>
>
________________________________
 
>From: Luis Ibanez <luis.ibanez at kitware.com>
>To: Sharath Venkatesha <sharath20284 at yahoo.com>
>Cc: Insight users
> <insight-users at itk.org>
>Sent: Saturday, July 11, 2009 8:49:51 AM
>Subject: Re: [Insight-users] Registration - Mutual Information Metric -  Sampling from Moving Image
>
>
>
>Hi Sharath,
>
>You are right in that it is not a good idea to take samples
>from the entire 2000 x 2000 pixels image if we expect that
>only a regions of 640 x 480 is going to match the Moving
>image.
>
>>
>The solution is to simply call 
>
>            registration->SetFixedImageRegion( region )
>
> and set "region" to the region of interest from the 
>2000 x 2000 image, where you anticipate to find matches
>>
>for the moving image.
>
>
>You will find examples on the use of 
>
>       SetFixedImageRegion()
>
>in the ITK software Guide
>
>       http://www.itk.org/ItkSoftwareGuide.pdf
>
>and most (if not all) the corresponding Image Registration
>examples in 
>
>            Insight/Examples/Registration
>
>
>
>
>   Regards,
>
>
>         Luis
>
>
>
>---------------------------------------------------------------
>
>On Fri, Jul 10, 2009 at 9:15 PM, Sharath Venkatesha <sharath20284 at yahoo.com> wrote:
>
>
>>>>Hi,
>>
>>>>I am working with images where the Fixed image is 2000*2000 pixels and the moving image is 640*480 (sub region of the fixed image). In all the Mutual Information metrics, the sampling is done on the Fixed image, and the transformed points are mapped on the moving image.
>>
>>>>I figured out that it is incorrect to sample the points randomly in the full fixed image ( as in my case, the moving image is a sub-part of the fixed image, and only 30-40% points were mapped), I used an approximate region of the fixed image from which sampling should be done. This has not improved the performance/accuracy of registration.
>>
>>>>I am thinking of sampling pixels from the moving image, and do a backward mapping to pixels in the fixed image. In this case, I think that almost all the points will be mapped, and hence the metric will be better.
>>
>>>>Do I need to change the functions in the respective files, or is there a simpler way to do this, or is already implemented?
>>
>>>>Thanks,
>>
>>>>Sharath Venkatesha
>>
>>
>>
>>
>>
>>>>_____________________________________
>>>>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
>>
>
>
>
>_____________________________________
>>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
>
>



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090711/6ed57838/attachment-0001.htm>


More information about the Insight-users mailing list