[Insight-users] Rigid3DTransform make error

David Doria daviddoria at gmail.com
Fri Jan 6 18:18:30 EST 2012


On Fri, Jan 6, 2012 at 5:47 PM, Sara Rolfe <smrolfe at u.washington.edu> wrote:
> Hello,
>
> I'd like to use the Rigid3DTransform but I'm getting an error when I try to
> create a new instance.  I commented out all the lines of my code expect for:
>
> typedef itk::Rigid3DTransform<double> TransformType;
> TransformType::Pointer  transform = TransformType::New();
>
> The second line results in the following error:
>
> /Users/smrolfe/build/LandmarkRegistration.cxx:132: error: conversion from
> ‘itk::SmartPointer<itk::MatrixOffsetTransformBase<double, 3u, 3u> >’ to
> non-scalar type ‘itk::SmartPointer<itk::Rigid3DTransform<double> >’
> requested
>
> It seems strange that just declaring a new instance of the filter would
> cause this error.  I've tried substituting in the Rigid2DTransform and that
> works just fine.  Please let me know if you have any ideas.
>
> Thanks,
> Sara

I looked in
Modules/Core/Transform/test/itkRigid3DTransformTest.cxx

and saw Rigid3DTransformSurrogate defined and then used.

I don't know why that is necessary, but maybe it'll get you going?

If someone knows why this is necessary, it might be nice to add a
comment in the test near the Surrogate definition.

David


More information about the Insight-users mailing list