I think this issue relates to the way the metrics compute gradients. It can be reproduced using

Examples/RegistrationITKv4/ImageRegistration1.cxx
and
Examples/RegistrationITKv3/ImageRegistration1.cxx

by setting Dimensions to 3, and using 2D images as inputs.

I found using: metric->ComputeGradientOff()
will allow the registration to proceed for ITKv3 using the MeanSquaresImageToImageMetric, but there is no such function for the v4 version. Using a metric that does not require gradients (eg Mattes) will allow the registration to proceed in both v3 and v4.

I humbly suggest the registration framework and metrics should be able to handle this situation. Also of note to those interested, the v3 registration on my system goes about twice as fast per iteration.

What are your thoughts?

David

On 11/12/2015 08:41 PM, Matias Montroull wrote:

David, would you be able to share the code you wrote?

On Nov 12, 2015 10:39 PM, "David Burns" <david.mo.bu...@gmail.com <mailto:david.mo.bu...@gmail.com>> wrote:

    Dear Insight,

    I am having the following trouble attempting 2D/3D registration of
    xray/CT with ITK v4 registration framework.

    The basics: The moving image is a 3D volume, and the fixed image
    is a 2D projection. An interpolator calculates a synthetic
    cone-beam projection for the moving image (volume) and compares to
    the fixed 2D image.

    The v4 registration framework doesn't allow me to use a 2D fixed
    and 3D moving image -> won't compile. So I need to setup the fixed
    image as 3D, even though it is 2D data. I can compile, but I get
    the following error at run time


    ExceptionObject caught !

    itk::ExceptionObject (0x20cfac0)
    Location: "void itk::RecursiveSeparableImageFilter<TInputImage,
    TOutputImage>::BeforeThreadedGenerateData() [with TInputImage =
    itk::Image<float, 3u>; TOutputImage = itk::Image<float, 3u>]"
    File: /usr/local/include/ITK-4.8/itkRecursiveSeparableImageFilter.hxx
    Line: 245
    Description: itk::ERROR: RecursiveGaussianImageFilter(0x2089fb0):
    The number of pixels along direction 2 is less than 4. This filter
    requires a minimum of four pixels along the dimension to be processed.

    It seems this behavior does not occur in the v3 registration
    framework and 2D/3D registrations were possible, however, I want
    to take advantage of the threading features in v4. How would you
    suggest I proceed?


    Thanks
    David Burns






    _______________________________________________
    Powered by www.kitware.com <http://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://kitware.com/products/protraining.php

    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://public.kitware.com/mailman/listinfo/insight-developers
    _______________________________________________
    Community mailing list
    commun...@itk.org <mailto:commun...@itk.org>
    http://public.kitware.com/mailman/listinfo/community


_______________________________________________
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://kitware.com/products/protraining.php

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://public.kitware.com/mailman/listinfo/insight-developers

Reply via email to