[Insight-users] image region intersection

David Doria daviddoria at gmail.com
Wed Dec 8 13:24:50 EST 2010


On Wed, Dec 8, 2010 at 1:16 PM, Kevin H. Hobbs <hobbsk at ohiou.edu> wrote:
> Is there any method that will give me the region that is common between
> two regions?

Kevin,

I found this reply from Luis in the archives:

>> > > Hi Erik,
>> > >
>> > > The easiest method is among ImageRegions.
>> > >
>> > > In that case, simply use:
>> > >
>> > > itk::ImageRegion::Crop()
>> > >
>> > > If you have two image regions
>> > >
>> > > itk::ImageRegion regionA;
>> > > itk::ImageRegion regionB;
>> > >
>> > > Then you can find the overlap by doing
>> > >
>> > > regionA.Crop( regionB )
>> > >
>> > > The common region will be stored in the
>> > > variable regionA.
>> > >
>> > >
>> > > Regards,
>> > >
>> > >
>> > > Luis

Is that what you need?

David


More information about the Insight-users mailing list