[Insight-users] Questions on B-spline deformable registration

Luis Ibanez luis.ibanez at kitware.com
Thu Apr 1 18:38:44 EDT 2010


Hi Stephen,


                     Welcome to ITK !



About your questions

1)  The example DeformableRegistration6.cxx uses only two levels of
     multi-resolution, as explained in the comment at the top of the file,
     in lines 23-31:

// This example illustrates the use of the \doxygen{BSplineDeformableTransform}
// class in a manually controlled multi-resolution scheme. Here we define two
// transforms at two different resolution levels. A first registration is
// performed with the spline grid of low resolution, and the results are then
// used for initializing a higher resolution grid. Since this example is quite
// similar to the previous example on the use of the
// \code{BSplineDeformableTransform} we omit here most of the details already
// discussed and will focus on the aspects related to the multi-resolution
// approach.


2) You could copy/paste the lines from 288 to 416 and generate
    a third resolution level. However, note that this is not an elegant
    way to do it. And that you probably should get more familiar with
    ITK and C++ before you attempt to make these changes.


3)  You get the deformation field via the call of the writer in
     lines 557-571:

  fieldWriter->SetInput( field );

  if( argc >= 7 )
    {
    fieldWriter->SetFileName( argv[6] );
    try
      {
      fieldWriter->Update();
      }

     This requires you to pass a valid filename as the sixth command
     line argument of the program.


4)   JPEG is not a suitable file format for storing deformation
      fields.
      Please use

               MetaImage (extension .mhd) or
               VTK (extension .vtk)

      You could visualize both of these file formats in Paraview
      http://www.paraview.org

     as it is described in the ITK Software Guide

            http://www.itk.org/ItkSoftwareGuide.pdf


    Regards,


            Luis


-------------------------------------------------------------------------------------------------
On Wed, Mar 31, 2010 at 12:30 PM, Stephen Yip <stephen.fyip1 at gmail.com> wrote:
> Hi,
>
> I have several questions regarding b-spline deformable registration. I've
> just started to learn C++. I might have overlooked something crucial while I
> skimmed through the source code.
>
> B-spline Registration
>
> 1. In the multi-resolution b-spline registration (I am particularly
> referring to DeformbleRegistration6 in the examples), how do I find out the
> level of pyramid the registration has undergone? (i.e. The registration was
> performed hierarchically using multi-resolution scheme. How many levels of
> hierarchy were there?)
>
> 2. How do I manipulate the code to change number of level?
>
> 3. How do I get the deformation vector field as an output in the
> DeformableResgistratio6 example?
>
> I execute the code in MatLab.
>
> I put: system('deform6.exe A.png B.png C.png Dafter.png Dbefore.png
> vector.jpg');
>
> The rest of them worked fine, except for the vector.jpg part. I have tried a
> few different file types (e..g png, jpg, hdr, etc.), none of them work.
>
> I keep getting the similar error message like the following:
>
> itk::ExceptionObject (0144E7D4)
> Location: "void __thiscall itk::JPEGImageIO::Write(const void *)"
> File: ..\..\src\Code\IO\itkJPEGImageIO.cxx
> Line: 465
> Description: itk::ERROR: JPEGImageIO(0195C3D8): JPEG supports unsigned
> char/int only
>
>
> Thank you,
>
> Stephen
>
>
> _____________________________________
> 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