The colour deconvolution plugin implements stain separation using Ruifrok & Johnston's method.


The code is based on a NIH Image macro kindly provided by A.C. Ruifrok.
The plugin assumes images generated by color subtraction (i.e. light-absorbing dyes such as those used in bright field histology or ink on printed paper). However, the dyes should not be neutral grey (most histological stains are not so).
If you intend to work with this plugin, it is important to read the original paper to understand how to determine new vectors and how the whole procedure works.
The plugin works correctly when the background is neutral (white to grey), so background subtraction with colour correction must be applied to the images before processing.

Colour deconvolution

A number of “built in” stain vectors are provided some of which were determined experimentally in our lab (marked in the source with GL), but you may have to determine your own vectors to provide a more accurate stain separation, depending on the stains and methods you use.

The built-in vectors are:

  • Haematoxylin and Eosin (H&E)
  • Haematoxylin and DAB (H DAB)
  • Fast Red, Fast Blue and DAB
  • Methyl green and DAB
  • Haematoxylin, Eosin and DAB (H&E DAB)
  • Haematoxylin and AEC (H AEC)
  • Azan-Mallory
  • Alcian blue & Haematoxylin
  • Haematoxylin and Periodic Acid of Schiff (PAS)
  • RGB subtractive
  • CMY subtractive
  • User values entered by hand
  • Values interactively determined from rectangular ROIs

Ideally, new vector determination should be done on slides stained with only one colour at a time (using the “From ROI” interactive option).
The plugin takes an RGB image and returns three 8-bit images. If the specimen is stained with a 2 colour scheme (such as H&E) the 3rd image represents the complementary of the first two colours (i.e. green). Ideally the 3rd image should be completely white. If not, then either the colour vectors or the background colour correction have not been correctly determined.

Read the paper!

Available from http:// and documentation available at: http://

plugin/color/colour_deconvolution/start.txt · Last modified: 2014/02/14 16:42 by glandini
Back to top
CC Attribution-Noncommercial-Share Alike 3.0 Unported = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0