[Insight-users] Minor bug in new OtsuMultipleThresholdsCalculator?
Zachary Pincus
zpincus at stanford.edu
Thu, 4 Mar 2004 23:20:39 -0800
Hello,
I'm attempting to use the new itkOtsuMultipleThresholdsCalculator,
generously contributed by Luca Antiga (thanks!)
It seems that in a few places, this class assumes that the Measurement
Vector of the input histogram is a floating-point type.
Specifically, on lines 76, 80, 94, 100, 105, 110, 114, 196, 203, 207,
and 217, local variables of declared type "double" are assigned from or
to vectors of MeasurementType, or as parameters to functions expecting
variables of type MeasurementType.
Clearly, it makes more sense for the Otsu threshold calculator to work
in floating-point -- I certainly don't argue that point. Perhaps,
however, this requirement should be mentioned somewhere? Or someone (I
certainly volunteer if people think this is a good idea) could just add
the necessary type casts to keep the calculator type-safe.
Any thoughts?
Zach Pincus
Department of Biochemistry and Program in Biomedical Informatics
Stanford University School of Medicine