ImageJ base code to get access to all the classes and their methods to test new Plugins. https://imagejdocu.tudor.lu/howto/plugins/the_imagej_eclipse_howto
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

37 lines
1.0 KiB

// This macro displays, as a montage, all the LUTs in the
// Image>Lookup Tables menu.
saveSettings();
list = getList("LUTs");
setBatchMode(true);
newImage("ramp", "8-bit Ramp", 256, 32, 1);
newImage("luts", "RGB White", 256, 48, 1);
count = 0;
setForegroundColor(255, 255, 255);
setBackgroundColor(255, 255, 255);
setFont("SansSerif", 12,"antialiased");
for (i=0; i<list.length; i++) {
selectWindow("ramp");
run(list[i]);
run("Select All");
run("Copy");
selectWindow("luts");
makeRectangle(0, 0, 256, 32);
run("Paste");
setJustification("center");
setColor(0, 0, 0);
drawString(list[i],128, 48);
run("Add Slice");
run("Select All");
run("Clear", "slice");
count++;
}
run("Delete Slice");
rows = floor(count/4);
if (rows<count/4) rows++;
run("Canvas Size...", "width=258 height=50 position=Center");
run("Make Montage...", "columns=4 rows="+rows
+" scale=1 first=1 last="+count+" increment=1 border=0 use");
rename("Lookup Tables");
setBatchMode(false);
restoreSettings();