[Insight-users] smoothing an Histogram

Luis Ibanez luis.ibanez at kitware.com
Sat Jul 4 15:08:41 EDT 2009


Hi Raquel,

You can convert the Histogram into a 1D Image,
and use any of the ITK Smoothing filters on
this 1D image, then convert the image back
to a Histogram.

See the class
Insight/Code/Numerics/Statistics/itkHistogramToImageFilter.h

and its related classes

itkHistogramToEntropyImageFilter.h
itkHistogramToIntensityImageFilter.h
itkHistogramToLogProbabilityImageFilter.h
itkHistogramToProbabilityImageFilter.h

Then look at the section of Smoothing image filters
in the ITK Software Guide


   http://www.itk.org/ItkSoftwareGuide.pdf



    Regards,


        Luis



--------------------
Raquel Itk wrote:
> Hi,
> 
> I have computed the histogram of an image with 
> Examples/Statistics/ImageHistogram2.cxx, now I want to smooth the array 
> , where I have saved the values of an Histogram ( valoresHisto[i]) 
> because I have a lot of peaks. I would like to use a Gaussian method, I 
> have been read about Gaussian but only for Images.
>  
> 
> while( itr != end )
> 
> {
> 
> valoresHisto[i]=itr.GetFrequency();
> 
> ++itr;
> 
> ++binNumber;
> 
> ++i;
> 
> }
> 
> return(valoresHisto);
> 
> 
> Thanks
> 
> 
> Raquel
> 
> 
> ------------------------------------------------------------------------
> 
> _____________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list