Skip to content

Instantly share code, notes, and snippets.

@mutterer
Created February 21, 2024 21:40
Show Gist options
  • Save mutterer/c7822a5a9011e18c8191b865ed2a6286 to your computer and use it in GitHub Desktop.
Save mutterer/c7822a5a9011e18c8191b865ed2a6286 to your computer and use it in GitHub Desktop.
abs(n)
acos(n)
Array.concat(array1, array2)
Array.copy(array)
Array.deleteValue(array, value)
Array.deleteIndex(array, index)
Array.fill(array, value)
Array.filter(array, filter)
Array.findMaxima(array, tolerance)
Array.findMinima(array, tolerance)
Array.fourier(array, windowType)
Array.getSequence(n)
Array.getStatistics(array, min, max, mean, stdDev)
Array.print(array)
Array.rankPositions(array)
Array.resample(array, len)
Array.reverse(array)
Array.show(array)
Array.show("title", array1, array2, ...)
Array.slice(array, start, end)
Array.sort(array)
Array.sort(array1, array2, array3...)
Array.trim(array, n)
Array.rotate(array, d)
Array.getVertexAngles(xArr, yArr, arm)
asin(n)
atan(n)
atan2(y, x)
autoUpdate(boolean)
beep()
bitDepth()
calibrate(value)
call("class.method", arg1, arg2, ...)
call("class.method")
changeValues(v1, v2, v3)
charCodeAt(string, index)
close()
close(pattern)
close("*")
close("\\Others")
Color.set(string)
Color.set(value)
Color.setForeground(string)
Color.setForegroundValue(value)
Color.setBackground(string)
Color.setBackgroundValue(value)
Color.setForeground(r, g, b)
Color.setBackground(r, g, b)
Color.foreground
Color.background
Color.toString(r, g, b)
Color.toArray(string)
Color.getLut(reds, greens, blues)
Color.setLut(reds, greens, blues)
Color.wavelengthToColor(wavelength)
cos(angle)
d2s(n, decimalPlaces)
debug(arg)
Dialog.create("Title")
Dialog.createNonBlocking("Title")
Dialog.addMessage(string)
Dialog.addMessage(string, fontSize, fontColor)
Dialog.addString(label, initialText)
Dialog.addString(label, initialText, columns)
Dialog.addNumber(label, default)
Dialog.addNumber(label, default, decimalPlaces, columns, units)
Dialog.addSlider(label, min, max, default)
Dialog.addCheckbox(label, default)
Dialog.addCheckboxGroup(rows, columns, labels, defaults)
Dialog.addRadioButtonGroup(label, items, rows, columns, default)
Dialog.addChoice(label, items)
Dialog.addChoice(label, items, default)
Dialog.addDirectory(label, defaultPath)
Dialog.addFile(label, defaultPath)
Dialog.addImage(pathOrURL)
Dialog.addImageChoice(label)
Dialog.addImageChoice(label, defaultImage)
Dialog.addHelp(url)
Dialog.addToSameRow()
Dialog.setInsets(top, left, bottom)
Dialog.setLocation(x, y)
Dialog.getLocation(x, y)
Dialog.show()
Dialog.getString()
Dialog.getNumber()
Dialog.getCheckbox()
Dialog.getChoice()
Dialog.getRadioButton()
Dialog.getImageChoice()
doCommand("Command")
doWand(x, y)
doWand(x, y, tolerance, mode)
drawLine(x1, y1, x2, y2)
drawOval(x, y, width, height)
drawRect(x, y, width, height)
drawString("text", x, y)
drawString("text", x, y, background)
dump()
endsWith(string, suffix)
eval(macro)
eval("script", javascript)
eval("js", script)
eval("bsh", script)
eval("python", script)
exec(string or strings)
exit
exit("error message")
exp(n)
Ext (Macro Extension) Functions
File.append(string, path)
File.close(f)
File.copy(path1, path2)
File.dateLastModified(path)
File.delete(path)
File.directory
File.exists(path)
File.getName(path)
File.getNameWithoutExtension(path)
File.getDirectory(path)
File.getDefaultDir
File.setDefaultDir(directoryPath)
File.getParent(path)
File.isFile(path)
File.isDirectory(path)
File.lastModified(path)
File.length(path)
File.makeDirectory(path)
File.name
File.nameWithoutExtension
File.open(path)
File.openAsString(path)
File.openAsRawString(path)
File.openAsRawString(path, count)
File.openUrlAsString(url)
File.openSequence(path, options)
File.openDialog(title)
File.rename(path1, path2)
File.saveString(string, path)
File.separator
fill()
fillOval(x, y, width, height)
fillRect(x, y, width, height)
Fit.doFit(equation, xpoints, ypoints)
Fit.doFit(equation, xpoints, ypoints, initialGuesses)
Fit.doWeightedFit(equation, xpoints, ypoints, weights, initialGuesses)
Fit.rSquared
Fit.p(index)
Fit.nParams
Fit.f(x)
Fit.nEquations
Fit.getEquation(index, name, formula)
Fit.getEquation(index, name, formula, macroCode)
Fit.plot
Fit.logResults
Fit.showDialog
floodFill(x, y)
floor(n)
fromCharCode(value1, ..., valueN)
getArgument()
getBoolean("message")
getBoolean(message, yesLabel, noLabel)
getBoundingRect(x, y, width, height)
getCursorLoc(x, y, z, modifiers)
getDateAndTime(year, month, dayOfWeek, dayOfMonth, hour, minute, second, msec)
getDimensions(width, height, channels, slices, frames)
getDirectory(string)
getDir(string)
getDir("Choose a Directory")
getDir("downloads")
getDir("file")
getDir("home")
getDir("image")
getDir("imagej")
getDir("luts")
getDir("macros")
getDir("plugins")
getDir("startup")
getDir("temp")
getDir("cwd")
getDir("preferences")
getDisplayedArea(x, y, width, height)
getFileList(directory)
getFontList()
getHeight()
getHistogram(values, counts, nBins[, histMin, histMax])
getImageID()
getImageInfo()
getInfo("command.name")
getInfo(DICOM_TAG)
getInfo("font.name")
getInfo("image.description")
getInfo("image.directory")
getInfo("image.filename")
getInfo("image.title")
getInfo("image.subtitle")
getInfo("log")
getInfo("macro.filepath")
getInfo("micrometer.abbreviation")
getInfo("os.name")
getInfo("overlay")
getInfo("selection.name")
getInfo("selection.color")
getInfo("slice.label")
getInfo("threshold.method")
getInfo("threshold.mode")
getInfo("window.contents")
getInfo("window.title")
getInfo("window.type")
getInfo(key)
getLine(x1, y1, x2, y2, lineWidth)
getList("image.titles")
getList("window.titles")
getList("java.properties")
getList("threshold.methods")
getList("LUTs")
getLocationAndSize(x, y, width, height)
getLut(reds, greens, blues)
getMetadata("Info")
getMetadata("Label")
getMinAndMax(min, max)
getNumber("prompt", defaultValue)
getPixel(x, y)
getPixelSize(unit, pixelWidth, pixelHeight)
getProfile()
getRawStatistics(nPixels, mean, min, max, std, histogram)
getResult("Column", row)
getResultString("Column", row)
getResultLabel(row)
getSelectionBounds(x, y, width, height)
getSelectionCoordinates(xpoints, ypoints)
getSliceNumber()
getStatistics(area, mean, min, max, std, histogram)
getString("prompt", "default")
getStringWidth(string)
getThreshold(lower, upper)
getTime()
getTitle()
getValue(x, y)
getValue("color.foreground")
getValue("color.background")
getValue("rgb.foreground")
getValue("rgb.background")
getValue("font.size")
getValue("font.height")
getValue("selection.size")
getValue("selection.width")
getValue("results.count")
getValue("rotation.angle")
getValue("image.size")
getValue("Mean, Median, Feret, etc.")
getVoxelSize(width, height, depth, unit)
getVersion()
getWidth()
getZoom()
IJ.deleteRows(index1, index2)
IJ.getToolName()
IJ.getFullVersion
IJ.freeMemory()
IJ.checksum("MD5 string", string)
IJ.checksum("MD5 file", filepath)
IJ.currentMemory()
IJ.log(string)
IJ.maxMemory()
IJ.pad(n, length)
IJ.redirectErrorMessages()
IJ.renameResults(name)
IJ.renameResults(oldName, newName)
Image.title
Image.width
Image.height
Image.copy
Image.paste(x, y)
Image.paste(x, y, mode)
imageCalculator(operator, img1, img2)
indexOf(string, substring)
indexOf(string, substring, fromIndex)
is("animated")
is("applet")
is("area")
is("Batch Mode")
is("binary")
is("Caps Lock Set")
is("changes")
is("composite")
is("FFT")
is("global scale")
is("grayscale")
is("Inverting LUT")
is("InvertY")
is("line")
is("locked")
is("Virtual Stack")
isActive(id)
isKeyDown(key)
isNaN(n)
isOpen(id)
isOpen("Title")
lastIndexOf(string, substring)
lengthOf(str)
lineTo(x, y)
List.set(key, value)
List.get(key)
List.getValue(key)
List.size
List.clear()
List.setList(list)
List.getList
List.setMeasurements
List.setMeasurements("limit")
List.setCommands
List.toArrays(keys, values)
List.fromArrays(keys, values)
List.indexOf(key)
log(n)
makeArrow(x1, y1, x2, y2, style)
makeEllipse(x1, y1, x2, y2, aspectRatio)
makeLine(x1, y1, x2, y2)
makeLine(x1, y1, x2, y2, lineWidth)
makeLine(x1, y1, x2, y2, x3, y3, ...)
makeOval(x, y, width, height)
makePoint(x, y, options)
makePoint(x, y)
makePolygon(x1, y1, x2, y2, x3, y3, ...)
makeRectangle(x, y, width, height)
makeRectangle(x, y, width, height, arcSize)
makeRotatedRectangle(x1, y1, x2, y2, width)
makeSelection(type, xpoints, ypoints)
makeText(string, x, y)
matches(string, regex)
Math.abs(n)
Math.acos(n)
Math.asin(n)
Math.atan(n)
Math.atan2(y, x)
Math.ceil(n)
Math.cos(angle)
Math.erf(x)
Math.exp(n)
Math.floor(n)
Math.log(n)
Math.log10(n)
Math.min(n1, n2)
Math.max(n1, n2)
Math.pow(base, exponent)
Math.round(n)
Math.sin(angle)
Math.sqr(n)
Math.sqrt(n)
Math.tan(n)
Math.toRadians(degrees)
Math.toDegrees(radians)
Math.constrain(n, min, max)
Math.map(n, low1, high1, low2, high2)
maxOf(n1, n2)
minOf(n1, n2)
moveTo(x, y)
newArray(size)
newImage(title, type, width, height, depth)
newMenu(macroName, stringArray)
nImages
nResults
nSlices
open(path)
open(path, n)
Overlay.moveTo(x, y)
Overlay.lineTo(x, y)
Overlay.drawLine(x1, y1, x2, y2)
Overlay.add
Overlay.setPosition(n)
Overlay.setPosition(c, z, t)
Overlay.drawRect(x, y, width, height)
Overlay.drawEllipse(x, y, width, height)
Overlay.drawString("text", x, y)
Overlay.drawString("text", x, y, angle)
Overlay.show
Overlay.hide
Overlay.hidden
Overlay.remove
Overlay.clear
Overlay.size
Overlay.addSelection
Overlay.addSelection(strokeColor)
Overlay.addSelection(strokeColor, strokeWidth)
Overlay.addSelection("", 0, fillColor)
Overlay.activateSelection(index)
Overlay.activateSelectionAndWait(index)
Overlay.removeSelection(index)
Overlay.update(index)
Overlay.moveSelection(index, x, y)
Overlay.indexAt(x, y)
Overlay.getBounds(index, x, y, width, height)
Overlay.removeRois(name)
Overlay.copy
Overlay.paste
Overlay.drawLabels(boolean)
Overlay.setLabelFontSize(size, options)
Overlay.setLabelColor(color)
Overlay.useNamesAsLabels(boolean)
Overlay.selectable(false)
Overlay.measure
Overlay.setStrokeColor(color)
Overlay.setStrokeWidth(width)
Overlay.flatten
Overlay.cropAndSave(dir, format)
Overlay.fill(color)
Overlay.fill(color1, color2)
Overlay.xor(array)
P
parseFloat(string)
parseFloat("Infinity")
parseFloat("-Infinity")
parseFloat("NaN")
parseInt(string)
parseInt(string, radix)
PI
Plot.create("Title", "X-axis Label", "Y-axis Label", xValues, yValues)
Plot.create("Title", "{cat1, cat2, cat3}", "Y-axis Label")
Plot.add(type, xValues, yValues)
Plot.add(type, xValues, yValues, label)
Plot.addHistogram(values, binWidth, binCenter)
Plot.drawVectors(xStarts, yStarts, xEnds, yEnds)
Plot.drawLine(x1, y1, x2, y2)
Plot.drawNormalizedLine(x1, y1, x2, y2)
Plot.addText("A line of text", x, y)
Plot.setLimits(xMin, xMax, yMin, yMax)
Plot.getLimits(xMin, xMax, yMin, yMax)
Plot.setLimitsToFit()
Plot.setColor(color)
Plot.setColor(color1, color2)
Plot.setBackgroundColor(color)
Plot.setLineWidth(width)
Plot.setJustification("center")
Plot.setLegend("label1\tlabel2...", "options")
Plot.setFrameSize(width, height)
Plot.getFrameBounds(x, y, width, height)
Plot.setLogScaleX(boolean)
Plot.setLogScaleY(boolean)
Plot.setXYLabels("x Label", "y Label")
Plot.setFontSize(size, "options")
Plot.setAxisLabelSize(size, "options")
Plot.setFormatFlags("11001100001111")
Plot.setStyle(index, styleString)
Plot.freeze(boolean)
Plot.setOptions(string)
Plot.replace(index, type, xValues, yValues)
Plot.useTemplate("plot name" or id)
Plot.makeHighResolution(factor)
Plot.appendToStack
Plot.show()
Plot.update()
Plot.getValues(xpoints, ypoints)
Plot.showValues()
Plot.showValuesWithLabels()
Plot.drawGrid()
Plot.drawShapes("rectangles", lefts, tops, rights, bottoms)
Plot.drawBoxes("boxes width=30", x, y1, y2, y3, y4, y5)
Plot.removeNaNs()
Plot.eneableLive(boolean)
pow(base, exponent)
print(string)
Property.get(key)
Property.getNumber(key)
Property.set(key, property)
Property.getInfo()
Property.getSliceLabel
Property.setSliceLabel(string, slice)
Property.setSliceLabel(string)
Property.getList
Property.setList(string)
random
random("gaussian")
random("seed", seed)
rename(name)
replace(string, old, new)
requires("1.29p")
reset
resetMinAndMax
resetThreshold
restoreSettings
Roi.size
Roi.contains(x, y)
Roi.getBounds(x, y, width, height)
Roi.getFloatBounds(x, y, width, height)
Roi.getCoordinates(xpoints, ypoints)
Roi.getContainedPoints(xpoints, ypoints)
Roi.getDefaultColor
Roi.getStrokeColor
Roi.getFillColor
Roi.getName
Roi.getProperty(key)
Roi.setProperty(key, value)
Roi.getProperties
Roi.getSplineAnchors(x, y)
Roi.setPolygonSplineAnchors(x, y)
Roi.setPolylineSplineAnchors(x, y)
Roi.getType
Roi.move(x, y)
Roi.translate(dx, dy)
Roi.setStrokeColor(color)
Roi.setStrokeColor(red, green, blue)
Roi.setStrokeColor(rgb)
Roi.setFillColor(color)
Roi.setFillColor(red, green, blue)
Roi.setFillColor(rgb)
Roi.setAntiAlias(boolean)
Roi.setName(name)
Roi.setStrokeWidth(width)
Roi.setUnscalableStrokeWidth(width)
Roi.getStrokeWidth
Roi.setGroup(group)
Roi.getGroup
Roi.setDefaultGroup(group)
Roi.getDefaultGroup
Roi.setPosition(slice)
Roi.setPosition(channel, slice, frame)
Roi.getPosition(channel, slice, frame)
Roi.getPointPosition(index)
Roi.setJustification(str)
Roi.setFontSize(size)
Roi.getGroupNames
Roi.setGroupNames(string)
Roi.remove
Roi.selectNone
Roi.copy
Roi.paste
Roi.getFeretPoints(xpoints, ypoints)
ROI Manager Functions
roiManager("and")
roiManager("add")
roiManager("add & draw")
roiManager("combine")
roiManager("count")
roiManager("delete")
roiManager("deselect")
roiManager("draw")
roiManager("fill")
roiManager("index")
roiManager("measure")
roiManager("multi measure")
roiManager("multi-measure append")
roiManager("multi-measure one")
roiManager("multi plot")
roiManager("open", file-path)
roiManager("remove slice info")
roiManager("rename", name)
roiManager("reset")
roiManager("save", file-path)
roiManager("save selected", file-path)
roiManager("select", index)
roiManager("select", indexes)
roiManager("show all")
roiManager("show all with labels")
roiManager("show all without labels")
roiManager("show none")
roiManager("size")
roiManager("sort")
roiManager("split")
roiManager("update")
RoiManager.multiCrop(dir, options)
RoiManager.getName(index)
RoiManager.getIndex(name)
RoiManager.rotate(angle)
RoiManager.rotate(angle, xcenter, ycenter)
RoiManager.scale(xscale, yscale, centered)
RoiManager.select(index)
RoiManager.selectByName(name)
RoiManager.selected
RoiManager.selectGroup(group)
RoiManager.selectPosition(c, z, t)
RoiManager.setGroup(group)
RoiManager.setPosition(slice)
RoiManager.setPosition(channel, slice, frame)
RoiManager.size
RoiManager.translate(dx, dy)
RoiManager.associateROIsWithSlices(boolean)
RoiManager.restoreCentered(boolean)
RoiManager.useNamesAsLabels(boolean)
round(n)
run(command)
run(command, options)
runMacro(name)
runMacro(name, arg)
save(path)
saveAs(format, path)
saveSettings()
screenHeight
screenWidth
selectionContains(x, y)
selectionName
selectionType
selectImage(id)
selectWindow("name")
setAutoThreshold()
setAutoThreshold(method)
setBackgroundColor(r, g, b)
setBackgroundColor(rgb)
setBatchMode(arg)
setBatchMode("exit and display")
setBatchMode("show")
setBatchMode("hide")
setColor(r, g, b)
setColor(value)
setColor(string)
setFont(name, size[, style])
setFont("user")
setForegroundColor(r, g, b)
setForegroundColor(rgb)
setJustification("center")
setKeyDown(keys)
setLineWidth(width)
setLocation(x, y)
setLocation(x, y, width, height)
setLut(reds, greens, blues)
setMetadata("Info", string)
setMetadata("Label", string)
setMinAndMax(min, max)
setMinAndMax(min, max, channels)
setOption(option, boolean)
setOption(measurement, boolean)
setOption("AntialiasedText", boolean)
setOption("AutoContrast", boolean)
setOption("Bicubic", boolean)
setOption("BlackBackground", boolean)
setOption("Changes", boolean)
setOption("CopyHeaders", boolean)
setOption("DebugMode", boolean)
setOption("DisablePopupMenu", boolean)
setOption("DisableUndo", boolean)
setOption("ExpandableArrays", boolean)
setOption("FlipFitsImages", boolean)
setOption("FullRange16bitInversions", boolean)
setOption("InterpolateLines", boolean)
setOption("InvertY", boolean)
setOption("JFileChooser", boolean)
setOption("Loop", boolean)
setOption("MonospacedText", boolean)
setOption("OpenUsingPlugins", boolean)
setOption("QueueMacros", boolean)
setOption("ScaleConversions", boolean)
setOption("CalibrateConversions", boolean)
setOption("Show All", boolean)
setOption("ShowAngle", boolean)
setOption("ShowMin", boolean)
setOption("WaitForCompletion", boolean)
setOption("WandAllPoints", boolean)
setPasteMode(mode)
setPixel(x, y, value)
setResult("Column", row, value)
setRGBWeights(redWeight, greenWeight, blueWeight)
setSelectionLocation(x, y)
setSelectionName(name)
setSlice(n)
setThreshold(lower, upper)
setTool(name)
setTool(id)
setupUndo()
setVoxelSize(width, height, depth, unit)
setZCoordinate(z)
showMessage("message")
showMessage("title", "message")
showMessageWithCancel(["title", ]"message")
showProgress(progress)
showProgress(currentIndex, finalIndex)
showStatus("message")
showText("string")
showText("Title", "string")
sin(angle)
snapshot()
split(string, delimiters)
sqrt(n)
Stack.isHyperstack
Stack.getDimensions(width, height, channels, slices, frames)
Stack.setDimensions(channels, slices, frames)
Stack.setChannel(n)
Stack.setSlice(n)
Stack.setFrame(n)
Stack.getPosition(channel, slice, frame)
Stack.setPosition(channel, slice, frame)
Stack.getFrameRate()
Stack.setFrameRate(fps)
Stack.getFrameInterval()
Stack.setFrameInterval(interval)
Stack.getUnits(X, Y, Z, Time, Value)
Stack.setUnits(X, Y, Z, Time, Value)
Stack.setXUnit(string)
Stack.setYUnit(string)
Stack.setZUnit(string)
Stack.setTUnit(string)
Stack.setDisplayMode(mode)
Stack.getDisplayMode(mode)
Stack.setActiveChannels(string)
Stack.getActiveChannels(string)
Stack.toggleChannel(channel)
Stack.swap(n1, n2)
Stack.getStatistics(voxelCount, mean, min, max, stdDev)
Stack.setOrthoViews(x, y, z)
Stack.getOrthoViews(x, y, z)
Stack.getOrthoViewsID
Stack.getOrthoViewsIDs(XY, YZ, XZ)
Stack.stopOrthoViews
startsWith(string, prefix)
String.resetBuffer
String.append(str)
String.buffer
String.copy(str)
String.copyResults
String.getResultsHeadings
String.format(format, n1, n2, ...)
String.pad(n, length)
String.paste
String.join(array)
String.join(array, delimiter)
String.trim(string)
String.show(str)
String.show(title, str)
String.setFontSize(size)
substring(string, index1, index2)
substring(string, index)
Table.create(name)
Table.reset(name)
Table.size
Table.title
Table.headings
Table.allHeadings
Table.get(columnName, rowIndex)
Table.getString(columnName, rowIndex)
Table.set(columnName, rowIndex, value)
Table.getColumn(columnName)
Table.setColumn(columnName, array)
Table.renameColumn(oldName, newName)
Table.deleteColumn(columnName)
Table.columnExists(columnName)
Table.update
Table.rename(oldName, newName)
Table.setSelection(firstRowIndex, lastRowIndex)
Table.getSelectionStart
Table.getSelectionEnd
Table.save(filePath)
Table.open(filePath)
Table.deleteRows(firstIndex, lastIndex)
Table.sort(column)
Table.showRowNumbers(boolean)
Table.showRowIndexes(boolean)
Table.saveColumnHeader(boolean)
Table.showArrays(title, array1, array2, ...)
Table.applyMacro(code)
Table.setLocationAndSize(x, y, width, height)
tan(angle)
toBinary(number)
toHex(number)
toLowerCase(string)
toolID
toScaled(x, y)
toScaled(x, y, z)
toUnscaled(x, y)
toUnscaled(x, y, z)
toScaled(length)
toUnscaled(length)
toString(number)
toString(number, decimalPlaces)
toUpperCase(string)
updateDisplay()
updateResults()
wait(n)
waitForUser(string)
waitForUser(title, message)
waitForUser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment