A colour deconvolution plugin that 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.
Version 2 of the plugin introduces a number of modifications and improvements (please follow the link at the bottom of this page).
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:
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 papers!