The non-parametric image subtraction algorithm described in TINA Memo no 2002-004 is implemented within the Imcalc tool as the dscat button. The algorithm subtracts two images by constructing a joint histogram, normalising it to produce a probability histogram and then, for each pair of corresponding pixels from the original image pair, performing an integration along the column of the histogram defined by the pixel grey-level value from the top-of-stack image, summing all values smaller than that at the position defined by the pixel pair. This is directly equivalent to constructing a confidence interval to generate the probability that the grey-level pairing of the pixels was not generated by the same distribution as the bulk of the images. The algorithm is therefore ideal for detecting small changes in image pairs, such as enhancement of MS lesions between pre- and post-GdDTPA contrast agent injection.
The major advantage of the technique over simple image subtraction is that the resulting difference image can be interpreted directly as a probability image, with a uniform distribution (i.e. the probabilities are ``honest" in the sense that they reflect frequencies of occurrence). In addition, the difference image is not contaminated with consistent differences between the original image pair e.g. overall illumination differences.
The usage of the algorithm is as follows:
Ideally this should be done with a kernel roughly equal in size to the noise on the data: you can check the noise by pressing the "noise" button in Imcalc: the result will be displayed in the Imcalc parameters dialog box as the "const" field: enter the same number in the "sigma" field, and change "range" to be roughly five times larger then "sigma". Sigma is, of course, the standard deviation of the Gaussian kernel used, and "range" is the size at which the kernel is truncated. The Imcalc parameters dialog box can be accessed by pressing "Imcalc Params" in the Imcalc tool.
This will produce the subtraction image in the imcalc Tv. The subtraction image should have a flat histogram: you can check this by pressing the "hist" button in the "Imcalc Mice" choice list, and then drawing a box in the imcalc tv using the left mouse button (click and drag). The result will be displayed in the Imcalc graph Tv.
The subtraction image is a probability image, produced by a hypothesis test: pixels which are not drawn from the same distribution as the bulk of the pixels in the image pair will have a low value. Such pixels can be extracted using the thresh button in Imcalc. Press the "-1*" button in Imcalc to invert the image, then enter the desired threshold in the "thresh" field of the Imcalc Parameters dialog box (hint: try -0.05 as a starting point, to threshold the image at the 95% confidence limit). Then press "thresh" in the Imcalc tool. This will set all pixels with lower values (i.e. higher probabilities prior to the inversion) to 0.