[Insight-users] How to set the registration region

Luis Ibanez luis.ibanez at kitware.com
Wed May 21 08:56:15 EDT 2008



Hi Brandon,


  Yes,
  You can use non-rectangular masks in the registration framework.



This is done by passing to the RegistrationMethod object masks defined
by SpatialObjects. You can pass one mask that sits on the Fixed image
coordinate system, and another mask that sits in the Moving image one.


For an example of how to do this, you can read the ITK Software Guide

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

In particular,

        section 8.10 "Metrics" in pdf-page 447.

and also,

       section 8.11.3, "Registration using masks constructed
                        with Spatial Objects", in pdf-page 464.


You will find a source code example in

     Insight/Examples/Registration/ImageRegistration12.cxx


   Regards,


      Luis



--------------------
Brandon Lin wrote:
> Is there a way to create a non-rectangular shaped region?  Or is there a 
> way to perform registration with some pixel locations masked out? 
>  
> I would like perform registration between two images, but there are some 
> pixels at the top left and top right corners I need to mask out.  If I 
> use rectangular region, I will have to give up columns or rows of 
> pixels, which is not preferred.  Any thoughts or feedback are 
> appreciated.  Thanks.
>  
> Regards,
> Brandon
> 
> 
>  
> On 3/31/08, *Brandon Lin* <brandon.lin at gmail.com 
> <mailto:brandon.lin at gmail.com>> wrote:
> 
>     Thank Tomáš.
>      
>     Brandon
> 
>      
>     On 3/31/08, *Tomáš Kazmar* <Tomash.Kazmar at seznam.cz
>     <mailto:Tomash.Kazmar at seznam.cz>> wrote:
> 
>         Hi Brandon,
> 
>         just do what you describe. Create a region of your image's
>         region type, setup
>         its index and size, and call SetFixedImageRegion():
> 
>         ImageType::RegionType region;
>         ImageType::IndexType index;
>         ImageType::SizeType size;
>         for (int i = 0; i < ImageType::ImageDimension; i++) {
>            index[i] = ...start of your region...
>            size[i] = ...size of your region...
>         }
>         region.SetIndex(index);
>         region.SetSize(size);
>         ...
>         registration.SetFixedImageRegion(region);
> 
>         For more information read the ITK Software Guide, Section 4.1 on
>         Images.
> 
>         Regards,
>         Tomas
> 
>         # I'm trying to perform 2D image to image
>         registration.  However, I'd like to
>         # define a region of the image to perform registration.  I
>         understand that
>         # this can be done using registration->SetFixedImageRegion()
>         method.  The
>         # example only uses the full image.  Could anyone please point me to
>         # documentation on how to setup the region?  All I need to
>         specify is the
>         # start pixel and length for each dimension.
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list