Multiple LUT Stack

Author: Wayne Rasband (wsr at nih.gov)
History: 2009/03/16: First version
Source: Multiple_LUT_Stack.java
Installation: Download Multiple_LUT_Stack.java 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++) {
      setSlice(i);
      run("Multiply...", "value=100");
      run("Add...", "value="+100*i);
      //run("Macro...", "code=v=x*(z+1)+z*100 slice");
      resetMinAndMax();
   }
   for (i=1; i<=images; i++) {
      setSlice(i);
      getMinAndMax(min, max);
      print(i+": "+min+"-"+max);
   }

|Plugins | Home |