[Insight-users] How to set the registration region

Brandon Lin brandon.lin at gmail.com
Thu May 22 11:05:05 EDT 2008


Thanks Luis.  This is very helpful.

A question that I didn't find explained in the chapters.  How is the 8-bit
char data type in ImageMaskType interpreted as binary?  Also, is 1 or
0 pixel location being masked out?

Thanks.

Regards,
Brandon


On 5/21/08, Luis Ibanez <luis.ibanez at kitware.com> wrote:
>
>
>
> 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
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080522/a1af6e6d/attachment.htm>


More information about the Insight-users mailing list