[Insight-developers] itk::KernelTransform sort-of-bug

Zachary Pincus zpincus at stanford.edu
Tue Aug 15 19:09:25 EDT 2006


Hi folks,

Glad to be back working with ITK! Anyhow, I've noticed an  
inconsistency with the itk::KernelTransform class. ( http:// 
www.itk.org/Doxygen/html/classitk_1_1KernelTransform.html )

That class uses PointSet instances to store source and destination  
landmarks. However, it defines a PointSet type that is incorrectly- 
templated. (I think.) Here are the relevant typedefs:

typedef DefaultStaticMeshTraits<
TScalarType, NDimensions,
NDimensions, TScalarType,
TScalarType >
PointSetTraitsType

typedef PointSet< InputPointType,
NDimensions, PointSetTraitsType >
PointSetType

The problem is that PointSet should not be templated on the  
PointType! The first template parameter of PointSet should be the  
'Pixel Type', which is basically metadata that goes with a given  
point and is, in any case, unused by the kernel transform. (See  
http://www.itk.org/Doxygen/html/classitk_1_1PointSet.html ).

So why is this a problem? Explicit instantiations and wrappers won't  
be set up for this unusual PointSet type, causing compliation  
slowness (for E.I.) and inability to use the kernel transforms (for  
wrappers).

If there are no objections, I'll fix this inconsistency in the ITK  
CVS by changing that second typedef to:
typedef PointSet< TScalarType,
NDimensions, PointSetTraitsType >
PointSetType

There are no implications for the backwards compatibility policy that  
I can think of.

Zach Pincus

Program in Biomedical Informatics and Department of Biochemistry
Stanford University School of Medicine



More information about the Insight-developers mailing list