[Insight-users] How to set the registration region

Brandon Lin brandon.lin at gmail.com
Wed May 21 02:19:36 EDT 2008


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> wrote:
>
> Thank Tomáš.
>
> Brandon
>
>
>  On 3/31/08, Tomáš Kazmar <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.
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080520/85f62b86/attachment.htm>


More information about the Insight-users mailing list