[Insight-users] Question on BSplineDecompositionImageFilter

Luis Ibanez luis.ibanez at kitware.com
Thu Jan 21 14:18:17 EST 2010


Hi Jochen,


Here is what the code in DeformableRegistration15.cxx is doing:


A)   A BSplineDeformable transform is computed for
       a coarse grid (small number of nodes = 5 inside + 3 in the
       border, for a total of 8x8x8 nodes).

       This BSpline transform has been computed by the time
       the first deformable registration stage finishes in line : 554


B)   The BSpline transform internally store the coefficients in
       image that can be accessed via the GetCoefficientImage()
       method.  As it is done in line: 627.

       For the case of a 3D BSpline Deformable transform.
       The coefficients are stored in three separate images,
       One image contains the "X" components of the deformation
       vectors in the grid nodes, another image contains the "Y"
       components, and the third image contains the "Z" components.


C)   The "upsampler" filter in lines 627  to 632 is resampling
       these components from the 8x8x8 grid used in the Coarse
       to a (20+3 = 23 nodes along one dimension, for a total of
       23x23x23 nodes in the grid).

       The interpolator used in this process is the
       BSplineResampleImageFunction.

       Note that, this is the part that may be misleading in the
       process.  The output of this upsampling is NOT an image
       of coefficients, but an actual sampling of the deformation
       field that is represented by the BSpline grid.

       It just happens that we chose to sample this deformation
       field at a resolution equal to the one of the new grid.

        Since these values are in the "space" of the deformation
        field, we must follow with the filter that estimates the
        coefficients of a BSpline grid, that will be a good representation
        for this new deformation field.


D)   The upsampled image (which is a deformation field) is then
       passed to the BSplineDecomposition filter in lines 634-640.

       and from this we obtain actual BSpline coefficients that are
       then used for initializing a higher resolution BSplineTransform.



     Please let us  know if you still see
     any problem with this process,


             Thanks


                      Luis


---------------------------------------------------------------
On Wed, Jan 20, 2010 at 5:23 PM, Jochen Cammin <jcammin1 at jhmi.edu> wrote:
> Hi,
>
> Upon responding to another question on this forum, I looked at examples
> using the class BSplineDecompositionImageFilter. DeformableRegistration6
> and DeformableRegistration15 both make use of this filter.
>
> Here is my confusion: from the documentation of that class (and
> logically) I understand that the input is an image and the output are
> the b-spline coefficients. However, in the two examples a b-spline
> coefficient image is the input which is then decomposed into b-spline
> coefficients. There is a comment section in the example codes that says:
>
>   //  Software Guide : BeginLatex
>   //
>   //  Now we need to initialize the BSpline coefficients of the higher
>   //  resolution transform. This is done by first computing the actual
>   //  deformation field at the higher resolution from the lower
>   //  resolution BSpline coefficients. Then a BSpline decomposition is
>   //  done to obtain the BSpline coefficient of the higher resolution
>   //  transform.
>   //
>   //  Software Guide : EndLatex
>
> From this comment I would expect the input to the decomposition filter
> to be the components of the deformation field. However, I can't see any
> code that would calculate the deformation vectors. Further down the code
> the input to the decomposition filter is then given as
>
> ...
> upsampler->SetInput( transformLow->GetCoefficientImage()[k] );
> ...
> decomposition->SetInput( upsampler->GetOutput() );
> ...
>
> So clearly, the input are b-spline coefficients and not the deformation
> field. What am I missing or misunderstanding?
>
> Thank you,
> Jochen
>
>
>
> _____________________________________
> 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