Multiple LUT Stack

Author: Wayne Rasband (wsr at
History: 2009/03/16: First version
Installation: Download to the plugins folder, or subfolder, then compile and run it using Plugins>Compile and Run.
Description: This plugin demonstrates how to display a stack using multiple lookup tables (LUTs). An n-image stack normally has only one LUT but convert it to an n-channel composite image and each image in the stack will have its own LUT.

This is what this plugin looks like when it is converted into a macro:

   w=500; h=500; images=10;
   newImage("Multiple LUT Stack", "32-bit ramp", w, h, images);
   Stack.setDimensions(images, 1, 1);
   run("Make Composite", "display=Grayscale");
   for (i=1; i<=images; i++) {
      run("Multiply...", "value=100");
      run("Add...", "value="+100*i);
      //run("Macro...", "code=v=x*(z+1)+z*100 slice");
   for (i=1; i<=images; i++) {
      getMinAndMax(min, max);
      print(i+": "+min+"-"+max);

|Plugins | Home |