[Insight-users] ScalarImageToHistogramGenerator always creates real-value-typed histograms?

Zachary Pincus zpincus at stanford.edu
Thu, 4 Mar 2004 22:56:47 -0800


Hello,

itkScalarImageToHistogramGenerator<ImageType> appears to create 
histograms where the measurement vector components are *not* of type 
ImageType::PixelType, as one might expect, but instead of type 
NumericTraits<ImageType::PixelType>::RealType
(see line 53 of itkScalarImageToHistogramGenerator.h)

That is, if I pass in an image of unsigned chars to 
ScalarImageToHistogramGenerator, the histogram returned has measurement 
vectors defined over doubles.

This behavior is at odds with that of ScalarImageToListAdaptor, which 
generates lists with measurement vectors of ImageType::PixelType, which 
seems natural.

Is there any particular reason for this? Or am I just exposing my lack 
of knowledge about the statistics classes?

Thanks,

Zach Pincus

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