MantisBT - ITK | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0012026 | ITK | ITK | public | 2011-03-30 04:46 | 2011-04-22 15:46 |
Reporter | Thiago R. dos Santos | ||||
Assigned To | kentwilliams | ||||
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | OS Version | |||
Product Version | |||||
Target Version | Fixed in Version | ||||
Resolution Date | 2011-04-21 | ||||
Sprint | |||||
Sprint Status | backlog | ||||
Summary | 0012026: itk::LandmarkBasedTransformInitializer does not work with a float transform as template parameter | ||||
Description | itk::LandmarkBasedTransformInitializer is templated over a transform type TTransform, which itself is templated over the scalartype. itk::LandmarkBasedTransformInitializer works only with two specific transform types. They are defined like that: /** 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 ''TransformType::ScalarType' instead, because that is the actual scalar type template parameter of the template transform. It is the same bug reported in: http://www.itk.org/Bug/view.php?id=9421 [^] | ||||
Steps To Reproduce | typedef itk::Image< signed short, 3> ImageType; typedef itk::VersorRigid3DTransform< float > 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 If ITKVersorTransformType is changed like this: typedef itk::VersorRigid3DTransform< double > ITKVersorTransformType; everything is working. | ||||
Additional Information | There are two relevant typedefs for the problem: typedef typename TransformType::ParametersType ParametersType; typedef typename ParametersType::ValueType ParameterValueType; If you follow the typedef chain of ParameterValueType, eventually the class itk::TransformBase will be reached. If you take a look to ParameterValueType, you will see that it is hard coded to double. If you modify the typedef in itk::LandmarkBasedTransformInitializer to this: typedef typename TransformType::ScalarType ParameterValueType; everything works fine!! | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2011-03-30 04:46 | Thiago R. dos Santos | New Issue | |||
2011-04-01 10:10 | Hans Johnson | Assigned To | => kentwilliams | ||
2011-04-01 10:10 | Hans Johnson | Status | new => assigned | ||
2011-04-22 15:46 | kentwilliams | Resolution Date | => 2011-04-21 | ||
2011-04-22 15:46 | kentwilliams | Note Added: 0026243 | |||
2011-04-22 15:46 | kentwilliams | Status | assigned => closed | ||
2011-04-22 15:46 | kentwilliams | Resolution | open => fixed |
Notes | |||||
|
|||||
|
|