This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This tool draws a line, and overlays its profile and some infos | |
// 2023-01-22 fixed profile origin by moving Overlay.moveTo after setColor. | |
macro "Line and Profile Tool -C00bL1de0L1ee1" { | |
getCursorLoc(x, y, z, flags); | |
xstart = x; ystart = y; | |
x2=x; y2=y; | |
while (true) { | |
getCursorLoc(x, y, z, flags); | |
if (flags&16==0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
macro "inches_mm_toggle Action Tool - C000T0608iT3608nT8f08mTef08mL0dd0" { | |
getVoxelSize(width, height, depth, unit); | |
if (unit.startsWith("inch")) { | |
width=width*25.4; | |
height=height*25.4; | |
depth=depth*25.4; | |
unit = "mm"; | |
} else if (unit.startsWith("mm")) { | |
width=width/25.4; | |
height=height/25.4; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
macro "Adjust Overlay Transparency Tool - C00cT0f20A" { | |
getCursorLoc(x, y, z, flags); | |
px=x; | |
while (flags&16>0) { | |
getCursorLoc(x, y, z, flags); | |
if (x!=px) { | |
Overlay.activateSelectionAndWait(Overlay.size-1); | |
run("Properties... ","opacity="+100*x/getWidth+" transparent"); | |
Overlay.removeSelection(Overlay.size-1); | |
Overlay.addSelection; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
macro "Curtain Tool - C00cT0f20A" { | |
getCursorLoc(x, y, z, flags); | |
setBatchMode(true); | |
id=getImageID; | |
run("Duplicate...","title=temp"); | |
// here goes the image transform to preview | |
run("Gaussian Blur...","sigma=5"); | |
// | |
id2=getImageID; | |
px=x; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ImageJ 1.53t Linegraph Anlayzer demo | |
run("Line Graph"); | |
// calibrate and set plot origin | |
makeRectangle(80, 27, 409, 261); | |
Roi.getBounds(x, y, width, height); | |
calibrateFormRect(400,700,0,800); | |
function calibrateFormRect(xmin,xmax,ymin,ymax) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#@ File saveLocation (label="Location of MIDI save file") | |
/** | |
* Testing Spots to Sound using MIDI | |
* Each hit is given a unique note based on some metric and intensity is related to volume | |
* | |
* = AUTHOR INFORMATION = | |
* Code written by Olivier Burri, EPFL - SV - PTECH - BIOP | |
* for Samuel Vernon, McCabe Lab | |
* 2022.08.23 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// a simplified IJ macro version of https://github.com/BIOP/ijp-LaRoMe | |
roiManager("reset"); | |
run("Duplicate...","title=temp"); | |
id=getImageID; | |
h=getHeight; | |
w=getWidth; | |
for (y=0;y<h;y++){ | |
for (x=0;x<w;x++){ | |
if (getPixel(x,y)>0) { | |
doWand(x,y); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var r =6; | |
macro "2D Gaussian Fit Tool - C00cT0f16GTbf16f" { | |
setBatchMode(1); | |
getCursorLoc(x, y, z, f); | |
while (f&16>0) { | |
Overlay.clear; | |
getCursorLoc(x, y, z, f); | |
makeRectangle(x-r,y-r,2*r,2*r); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// see https://twitter.com/Maurice_Y_Lee/status/1487093624982499330 | |
// show center of mass | |
makePoint(getValue('XM'),getValue('YM'),"medium green hybrid"); | |
Overlay.addSelection('green'); | |
// gaussian fit | |
makePoint(gaussianFit(true),gaussianFit(false),"medium red hybrid"); | |
Overlay.addSelection('red'); |
NewerOlder