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
/* | |
* Making a pretty fluorogram | |
* Olivier Burri, BioImaging & Optics Platform, EPFL | |
*/ | |
run("Fluorescent Cells (400K)"); | |
image = getTitle(); | |
run("Split Channels"); |
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 | |
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) { | |
dx=x2-xstart; dy=y2-ystart; |
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
// CZI batch project macro | |
// parses the file metadata to work around a bioformat bug | |
// that assigns wrong channel colors. | |
// edit the first two lines to use DIC in the projection or not | |
// and what projection mode is needed (see Image>stacks>Z project...) | |
useDic = true; | |
projectionMode = "Max Intensity"; | |
var r,g,b; |
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
// creates series of montages | |
// use case: input stack of 200 images | |
// user wants 4x5 montage: 10 pages output. | |
source = getImageID; | |
slices=nSlices; | |
cols = 4; | |
rows = 5; | |
imagesPerPage = cols*rows; | |
for (i=0; i<slices/imagesPerPage; i++) { |
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 "MultiFreehand Tool - C00cT0f18M" { | |
xs = newArray(1); | |
ys = newArray(1); | |
getCursorLoc(x, y, z, flags); | |
xs[0]=x; ys[0]=y; | |
lastx=x;lasty=y; | |
leftclick=16; | |
while (flags&leftclick>0) { | |
getCursorLoc(x, y, z, flags); | |
if ((x!=lastx)||(y!=lasty)) { |
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
// written at the request of S.Mingle. | |
// https://gist.github.com/mutterer/8fc04d0bdcc72a56072c | |
var baselineIndex=0; | |
macro "Help Action Tool - C00cT0f18?" { | |
help = setup(); | |
} | |
macro "Define BaseLine Action Tool - C00cT0f18BTaf18l" { |
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
/* | |
* By Olivier Burri, BioImaging & Optics Platform EPFL | |
* June 2016 | |
* Provided as-is from a request on the ImageJ Forum | |
* http://forum.imagej.net/t/dividing-circle-into-8-equal-areas/1995 | |
*/ | |
var count = 0; // Variable to know which circle we are working on | |
// If you install this macro, it will be mapped to the F2 Key |
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
// do auto contrast on all channels | |
// contrast is adjusted to min/max | |
import ij.*; | |
imp = IJ.getImage(); | |
name = imp.getTitle(); | |
print (name); | |
c = imp.getNChannels(); |
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
s=getMetadata('info'); | |
s = split(substring (s,indexOf(s,'>')+2)); | |
for (i=0;i<nSlices;i++){ | |
setSlice(i+1); | |
setMetadata("Label", (1*s[i]-1*s[0])/1000+" s"); | |
} |
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 "move_overlay_elements Tool - C00cO11cc" { | |
getCursorLoc(x, y, z, flags); | |
while (flags&16>0) { | |
getCursorLoc(x1, y1, z, flags); | |
n = Overlay.size; | |
for (i=0;i<n;i++) { | |
Overlay.activateSelection(i); | |
Roi.getBounds(rx, ry, width, height); | |
Overlay.moveSelection(i, rx+x1-x, ry+y1-y); | |
} |