[Insight-developers] ImageMetrics now using Regions
Luis Ibanez
luis.ibanez@kitware.com
Tue, 09 Apr 2002 11:01:43 -0400
Hi,
As we discusses at the UNC meeting, ImageMetrics now
accept a user-defined ImageRegion to define the region
of the image that will be used for computing the metric.
This has been added to the class:
itk::ImageToImageMetric
and is called "FixedImageRegion" because the region
is defined in the reference frame of the Fixed image.
Users should now call :
metric->SetFixedImageRegion( myRegionOfInterest );
Before the metric call the "Initialize()" method. Initialize()
will verify that all the components passed to the metric are
consistent, otherwise it will throw exceptions.
The only requirement tested now on the FixedImageRegion
is to have at least one pixel (which seems to be reasonable :-).
We could also test the region to be completly contained in
the BufferedRegion...for example.
Registration methods should also take care of setting this
region at some point before trying to use the metric.
Note that this region is not modifying in any way the
Regions of the Fixed image (LargestPossible, Buffered
or Requested) it is only being managed by the metric.
Luis