//adapted from https://imagej.nih.gov/ij/macros/Show_All_LUTs.txt //make LUTs montage from the NeuroCyto LUTs script folder //Kevin Terretaz 2022 var propertyList = ""; macro "Apply LUTs Montage" { oridir = File.getDefaultDir; rootdir = getDir("imagej"); startdir = rootdir + "scripts" + File.separator + "LUTs" + File.separator + "___Grays_.ijm"; File.setDefaultDir(startdir); lutdir = getDir("Choose folder"); File.setDefaultDir(oridir); count = 0; saveSettings(); setBatchMode(true); newImage("ramp", "8-bit Ramp", 256, 32, 1); newImage("luts", "RGB White", 256, 48, 1); setForegroundColor(255, 255, 255); setBackgroundColor(255, 255, 255); processFiles(lutdir); run("Delete Slice"); rows = floor(count/4); if (rows