[Insight-users] Bug in itk::LandmarkBasedTransformInitializer?

Neuhaus Jochen j.neuhaus at dkfz-heidelberg.de
Thu Aug 13 10:43:26 EDT 2009


Hi List,

I try to initialize a transform using
itk::LandmarkBasedTransformInitializer the following way:

  typedef itk::Image< signed short, 3>  ImageType;
  typedef itk::VersorRigid3DTransform< MyPointType::ValueType >
ITKVersorTransformType;
  typedef itk::LandmarkBasedTransformInitializer<
ITKVersorTransformType, ImageType, ImageType > TransformInitializerType;
  ITKVersorTransformType::Pointer transform =
ITKVersorTransformType::New();
  TransformInitializerType::Pointer init =
TransformInitializerType::New();
  init->SetTransform(transform);
  ...
  init->InitializeTransform();

Everything compiles fine. But when I execute the code, the following
warning appears:
WARNING: In
v:\windows\source\itk3120\code\common\itkLandmarkBasedTransformInitializ
er.txx, line 413
LandmarkBasedTransformInitializer (0000000004156C10): Landmark
initialization using the specified input transform not implemented

WARNING: In
v:\windows\source\itk3120\code\common\itkLandmarkBasedTransformInitializ
er.txx, line 418
LandmarkBasedTransformInitializer (0000000004156C10): Landmark
initialization using the specified input transform not implemented


I traced the problem to the following issue:

My MyPointType::ValueType is float. If I change it to double, everything
works fine.

Itk:: LandmarkBasedTransformInitializer defines the supported transforms
like this:
  /**  Supported Transform typedefs */
  typedef VersorRigid3DTransform< ParameterValueType >   
 
VersorRigid3DTransformType;
  typedef Rigid2DTransform< ParameterValueType > Rigid2DTransformType;


looking deep into the inheritance hierarchy, I found that
ParameterValueType ultimately is hardcoded to float. In my opinion,
ParameterValueType is just the wrong type here. It should use
'ScalarType' instead, because that is the actual template parameter.

Has anybody encountered this problem? Is there a better way to achieve
this? Should I just submit a bug report to ITK? 


Thanks,
 Jochen


More information about the Insight-users mailing list