// Max Value Segmentation // // This macro creates a color image based on the max of // three grayscale images. A pixel in the color image is set to // green if the corresponding pixel in the first image is max, // to blue if the corresponding pixel in the second image is // max and to red if the corresponding pixel in the third // image is max. // Author: Ronald DeSpain (ron_despain at hotmail.com) macro "Max Value Segmentation" { requires("1.34f"); if (nImages!=3 || bitDepth==24) exit("This macro requires exactly three grayscale images"); width = getWidth(); height = getHeight(); newImage("Max Pixel", "RGB", width, height, 1); starttime = getTime(); autoUpdate(false); setBatchMode(true); for (y=0; y