[Insight-users] histogram : bug

Luis Ibanez luis . ibanez at kitware . com
Thu, 11 Dec 2003 19:58:06 -0500


Hi David,

Thanks for sending your image.

With it I was able to reproduce the error that you
reported. This helped to identify a bug in the
ImageToHistogramGenerator.  This class should
use a real type (float or double) for the second
template argument of ListSampleToHistogramGenerator,
but it was using the image PixelType.

This has been fixed in CVS.  Please update your
checkout and let us know if you find any further
problems.


Thanks


    Luis



------------------------------------------------
David Llanos wrote:
> The format of the images that I have to process is JPEG or JPG.
> I really need to work with these images for my application.
> 
> I send you an image so that you prove it...
> 
> 
> 
> ----- Original Message ----- 
> From: "Luis Ibanez" <luis . ibanez at kitware . com>
> To: "David Llanos" <gva02 at elai . upm . es>
> Cc: <Insight-users at itk . org>
> Sent: Thursday, December 11, 2003 12:38 AM
> Subject: Re: [Insight-users] histogram
> 
> 
> 
>>Hi David,
>>
>>
>>What image are you feeding to the ImageHistogram3 program ?
>>
>>I'm testing this program with the image in
>>
>>      Insight/Examples/Data/VisibleWomanEyeSlice.png
>>
>>and it is not producing zeros as in your case.
>>
>>What's the file format of your image ?
>>
>>
>>Thanks
>>
>>
>>   Luis
>>
>>
>>
>>--------------------
>>David Llanos wrote:
>>
>>
>>>Why the program ImageHistogram3.cxx gives all the "bin" with  frequency
> 
> = 0?
> 
>>>Is it maybe erroneous histograms?
>>>
>>>----- Original Message ----- 
>>>From: "Luis Ibanez" <luis . ibanez at kitware . com>
>>>To: "David Llanos" <gva02 at elai . upm . es>
>>>Cc: <insight-users at itk . org>
>>>Sent: Monday, December 08, 2003 3:26 PM
>>>Subject: Re: [Insight-users] histogram
>>>
>>>
>>>
>>>
>>>>Hi David,
>>>>
>>>>
>>>>An example on how to compute the Histogram of an RGB image
>>>>has been commited to the CVS repository under:
>>>>
>>>>
>>>>     Insight/Examples/Statistics/ImageHistogram3.cxx
>>>>
>>>>
>>>>This example loads a 2D RGB Image (dimension is irrelevant here)
>>>>and computes the histogram of its red channel, its blue channel,
>>>>and its green channel. Finally it computes the joint histogram
>>>>of the RGB values which results in a 3D histogram.
>>>>
>>>>This example uses the new helper class
>>>>
>>>>           itk::ImageToHistogramGenerator
>>>>
>>>>that simplifies the setup of the ImageToListSample adaptor, since
>>>>you only have to connect the image and select what kind of histogram
>>>>you want to compute.
>>>>
>>>>
>>>>Please let us know if you find any problems,
>>>>
>>>>
>>>>  Thanks
>>>>
>>>>
>>>>    Luis
>>>>
>>>>
>>>>-----------------------