[Insight-users] How to set the registration region

Tomáš Kazmar Tomash.Kazmar at seznam.cz
Mon Mar 31 04:37:11 EDT 2008


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.


More information about the Insight-users mailing list