[Insight-developers] NeighborhodOperator ScaleCoefficients() and NumericTraits : RealType

Luis Ibanez luis . ibanez at kitware . com
Tue, 26 Aug 2003 18:59:24 -0400


Hi Josh,

The NeighborhoodOperator is generating some warninngs in the
method

                        ScaleCoefficients()

this methods multiplies the coefficients by a factor.
the coefficients are of type = Pixel Type, and the method
ScaleCoefficients() is also expecting a PixelType as argument.

It probably should be accepting a type

       NumericTraits< PixelType >::RealType.

and then casting the result of the product to PixelType.

Or,
maybe the coefficients themselves should be of type

       NumericTraits< PixelType >::RealType.

since they are used for multiplying pixel types.

The warnings are generated in the GradientMagnitudeImageFilter
where "double" values are passed to the ScaleCoefficients() method.

Do you see any major disadvantages on making this conversion ?

Thanks

    Luis