

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This ImageJ cheat sheet provides the main commands and user interfaces
Typology: Cheat Sheet
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Robert Haase (Myers lab, MPI-CBG); Benoit Lombardot, Noreen Walker and Gayathri Nadar (Scientific Computing Facility, MPI-CBG); Jens Ehrig (CMCB, TU Dresden)
replace any occurrence of pattern in input by rsubst
cut a string into a list of strings (array) according to the separator position(s)
returns number of characters of the string (see below for “lengthOf(array)”)
returns true, if input starts with given pattern
returns true, if input end with pattern
<, <= smaller than, smaller or equal to c = (a < b); // c is 1 (“true”)
, >= greater than, greater or equal to c = (a > b); // c is 0 (“false”) == equal to c = (a==b); // c is 0 (“false”) != not equal to^1 c = (a != 1 ); // c is 1 (“true”)
(corresp. to a*b)
(~corresp. to a+b)
(corresp. to 1-a)
1
before each loop: check & only continue if this is true after each loop: do this
Robert Haase (Myers lab, MPI-CBG); Benoit Lombardot, Noreen Walker and Gayathri Nadar (Scientific Computing Facility, MPI-CBG); Jens Ehrig (CMCB, TU Dresden)
Stack.getDimensions(width, height, channels, slices, frames); Stack.setSlice(slice); Stack.setChannel(channel); Stack.setFrame(frame); Stack.setDisplayMode("color"); Stack.setDisplayMode("composite"); Stack.setDisplayMode("grayscale");
open(folder+imageFilename); close(); fileList = getFileList(folder); numFiles = lengthOf(fileList); for (i= 0 ;i<lengthOf(fileList);i++){ file = fileList[i]; open(file); // actual image processing... close(); }
titleOfCurrentImage = getTitle(); selectWindow(titleOfAnyImage);
run("Enhance Contrast...", "saturated=0.3 normalize")
run("Set Measurements...", "area mean standard min centroid"); corresp. to this: run("Analyze Particles...", "add clear display"); roiManager("Measure"); rowCount = nResults(); value = getResult("column title", rowNumber); setResult("column title", rowNumber, newValue); saveAs("Results","myResults.xls"); run("Clear results");
waitForUser("headline", "prompt");
ImageJ macro reference https://imagej.nih.gov/ij/developer/macro/macros.html https://imagej.nih.gov/ij/developer/macro/functions.html ImageJ / Fiji plugins https://imagej.net/Category:Plugins Forum http://forum.imagej.net/ Macro code auto formatter http://jsbeautifier.org/
getStatistics(area, mean, min, max, standard_deviation);
roiManager("add"); roiManager("split"); roiManager("delete"); roiManager("reset"); roiManager("measure"); roiManager("count"); roiManager("open", filename); roiManager("save", filename); roiManager("save selected", filename); roiManager("select", index); roiManager("select", newArray(index1, index2, ...)); roiManager("deselect"); roiManager("show all"); roiManager("show all with labels"); roiManager("show none"); roiManager("and");
getPixelSize(unit, pWidth, pHeight); getVoxelSize(vWidth, vHeight, vDepth, unit);
#@ String(label="Your Text") userText #@ String(value="Some useful hints...", visibility="MESSAGE") hints #@ String(label="Analyst name", description="Your name") analystName #@ String(choices={"A", "B"}, style="radioButtonHorizontal") ROI #@ String(label="Exp. Group", choices={"Mutant", "Control"}, style="list") expGroup #@ Integer(label="Ratio 1") r #@ Integer(label="Ratio 2", value= 25 , min= 0 , max= 100 , style="slider") r #@ Double(value=0.7, min= 0 , max= 1 , label="A real number") realNumber #@ File(style="open") inputFile #@ File(style="save") outputFile #@ File(style="directory") imageFolder #@ ColorRGB(value="red") color #@ Boolean(label="Show Preview?") preview