setLut and getLut Commands
Posted by Jason NoSpam on
URL: http://imagej.273.s1.nabble.com/setLut-and-getLut-Commands-tp3701021.html
I am trying to convert the below macro into an ImageJ plugin. However, the LUT functions getLut and setLut don't want to work as a plugin in all permutations I have tried. I get an error on setLut that the wrong number of arguments has been past to the function when I try to call it as below.
IJ.Macro.Functions.SetLUT(r,r,r)
Do I need to setup/call/? the LUTs differently to use them in a Plugin versus a macro?
****Original Macro*******
macro "Gamma [F1]" {
getLut(r, g, b);
gamma = gamma + 0.005;
for (i=0; i<256; i++) {
r[i] = pow(r[i]/255, gamma)*255;
}
setLut(r, r, r);
}
************************
---------------------------------
Everyone is raving about the all-new Yahoo! Mail beta.