[Insight-users] Problem in BSpline Registration of really small region
Luis Ibanez
luis.ibanez at kitware.com
Tue Mar 16 13:01:09 EDT 2010
Hi Serena,
1) The "SetGrid...()" methods of the BSplineDeformableTransform,
sets the parameters of the BSpline grid, and therefore, are loosely
related to the actual fixed image.
In particular, the SetGridRegion() method is intended to define
the number of grid nodes along each dimension. This is done
by setting the corresponding number of nodes in the Size variable
passed as argument to region.SetSize().
Something like:
SizeType size;
size.Fill( 5 );
RegionType region;
region.SetSize( size );
bsplineTransform->SetGridRegion( region );
Will define a grid of 5x5x5 (if in 3D) nodes.
Note that this is independent of the number of pixels in the
image region covered by the BSpline grid. Although in practice
it is common to define the BSpline grid size based on that
number of pixels. For example, you may want to cover a
FixedImageRegion of 100x100x100 with a grid region of 5x5x5
to get 20x20x20 image pixels per grid node.
2) A much simpler approach to your problem is to extract
from the fixed image the region of interest that you want
to register, and then proceed with the standard setup of
a typical deformable registration, using the extracted region
as the input fixed image.
You can do this by using the
itkRegionOfInterestImageFilter
and you can greatly simplify the configuration of the BSpline
transform by using the following initializer class:
Insight/Code/Review/
itkBSplineDeformableTransformInitializer.h
again, you want to pass to this initializer the image that
results from extracting a region of interest from your
original large fixed image.
Regards,
Luis
------------------------------------------------
On Mon, Mar 15, 2010 at 8:22 PM, Serena Fabbri <fabbri at u.washington.edu> wrote:
>
> Hi All,
>
> I'd like to register a small portion of the Fixed Image with BSplineT,
> Mattes MI and Regular Step Gradient Descent Optimizer.
> In particular I want to set BSpline Grid only on this portion of the Fixed
> image.
>
> I have set fixedRegion with appropriate size and origin and I have passed
> them to
>
> registration->SetFixedImageRegion( fixedRegion );
>
> and the same time I have used fixedRegion to determine
> GridSpacing( spacing );
> GridOrigin( gridOrigin );
> GridDirection( gridDirection );
>
> I have followed the examples in the ITKSoftGuide and i have set
> bsplineRegion.SetSize( totalGridSize );
>
> but I have a doubt about GridRegion( bsplineRegion ):
>
> what is the difference between bsplineRegion and fixedRegion???
>
> and....The fixedRegion is really small, the its pixel size is: [9,25,38]
> and the Fixed Image and Moving Image are [80,80,102], spacing=[4,4,1] mm
>
> I use all pixel in the region for MMI calculus and I tuned fine the
> parameter of the optimizer but I get the error message that Description:
> itk::ERROR: MattesMutualInformationImageToImageMetric(0x1006af4f0): Too many
> samples map outside moving image buffer: 0 / 8550
>
> The registration works only if I enlarge the size of the fixedRegion to
> [30,30,38], but then it contains features that I don't want to register.
>
> How can I register a really small region ???
> any idea?
>
> Thank you a lot.
>
> Serena.
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list