ij-VTK contains example of RGB color space visualization using a 3D color histogram. Bins of the histogram are defined by 3D grid. Color count in each bin is visualized by size of a ball, color of the ball represents mean or center color in that bin.
|baboon||Color histogram with 6x6x6 bins|
|clown||Color histogram with 6x6x6 bins|
Note that 3D Color Inspector plugin by Kai Uwe Barthel, now also includes the ability to display similar color histogram, in RGB and number of other color spaces (v.1.6). If you are not looking for an example of VTK code, the 3D Color Inspector is recommended, as it has more extensive functionality. The 3D Color Inspector is written in pure Java and does not require VTK to run, you can download it and get more info at: http://rsb.info.nih.gov/ij/plugins/color-inspector.html