// ---------------------------------------------------------------------------------------------- // This macro converts RGB image into RGB Stack. // Convert the Image into 32-bit and divide each channel by 255 // ---------------------------------------------------------------------------------------------- if(!(is("grayscale"))) {run("RGB Stack");} run("32-bit"); // convert the image into // indices of arrays start at 0 for (i = 0; i < 3; i++) { Stack.setChannel(i+1); // indices of stack channels start at //divide by 255 first run("Divide...", "value=255 slice"); }