[Insight-users] SetFixedImageRegion

Luis Ibanez luis.ibanez at kitware.com
Fri Sep 24 13:55:36 EDT 2004


Hi Mark,

You can define your region of interest using
lines like the following (assuming 3D...):

ImageType::IndexType start;
start[0] = 144;
start[1] = 123;
start[2] = 223;

ImaggeType::SizeType size;
size[0] = 400;
size[1] = 400;
size[2] = 400;

ImageType::RegionType region;

region.SetIndex(start);
region.SetSize(size);

registration->SetFixedImageRegion( region );



It will be up to you to define the actual values
to put in "start" and "size" in order to define
the region of interest. They should probably be
taken from a GUI interace by letting the user do
mouse clicks....

Just make sure that the region is entirely contained
inside the BufferedRegion, otherwise the Metric will
throw an exception.


   Regards,


      Luis



-----------------------
Mark Wyszomierski wrote:

> Hello All,
> 
> I have been using motion registration and it is great. A quick question - 
> 
> Currently I am considering the whole image for registration, when
> using only a region of interest would be preferable. Currently I am
> using this method to set the considered region:
> 
> registration->SetFixedImageRegion(
> fixedItkBuffer->GetOutput()->GetBufferedRegion() );
> 
> fixedItkBuffer is a buffer containing the pixel data for a reference
> image. registration is my registration type pointer.
> 
> How then can I specify a simple rectanglar region of interest to be
> considered instead of the entire buffer?
> 
> Thanks!
> _______________________________________________
> 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