[Insight-developers] ImageToHistogramFilter issue

David Doria daviddoria at gmail.com
Tue Nov 16 17:21:28 EST 2010


Hi all,

I am trying to use the ImageToHistogramFilter. I see some unexpected
things when I create an iterator to traverse the histogram. First, it
seems to only traverse the first component. That is, I see indices of

0, 0, 0
1, 0, 0
2, 0, 0
...
0, 0, 0 (this repeats exactly from the beginning, rather than
incrementing  the 2nd or 3rd component)
1, 0, 0
....

The histogram cell centers (the iterator's .GetMeasurementVector())
also seem to follow the pattern of the index in that the second two
components don't move from zero.

Also, my query for "how many red pixels are there?" returns 0, when I
would expect 2 (there are two red pixels in the example input image).

Here is my demonstration of the problem:
http://www.vtk.org/Wiki/ITK/Examples/Broken/Statistics/ImageToHistogramFilter

Any thoughts? Has anyone successfully created a 3D histogram from an
image after the Statistics overhaul?

Thanks,

David


More information about the Insight-developers mailing list