[Insight-users] histogram and generating barcharts

Gavin Baker gavinb+xtk at cs.mu.OZ.AU
Wed Jun 9 11:32:19 EDT 2004


Hello Yann,

On Wed, Jun 09, 2004 at 03:19:26PM +0200, Yann GAVET wrote:

> Does anyone know how to use itk::Statistics::Histogram to generate a 
> barchart image and have a visual output?

The Histogram is described in section 10. 1.3 on page 402 of the Software
Guide.  Note that this code only provides the calculation back-end for the
statistics.

Since ITK does not provide any GUI or visualisation facilities, it does not
include facilities for actually plotting the chart.  That is determined by
the GUI toolkit that you use, and there are _many_ ways of achieving this.

For example, if you were using Gtk+ you might use the GtkChart, otherwise
there's Cairo, OpenGL, GDChart, Chaco (from SciPy), DISLIN, GnuPlot, GNU R,
and much more...

Which GUI toolkit are you using?  That would narrow down the available
options for you.  It may be just as easy to write a custom widget to do the
display, depending on your requirements.

If you are using FLTK (a fine choice), then SNAP from InsightApplications
has a very nice histogram widget.  Have a look at the code to see how it is
done.

Regards,

  :: Gavin

-- 
Gavin Baker                                      Complex Systems Group
http://www.cs.mu.oz.au/~gavinb             The University of Melbourne


More information about the Insight-users mailing list