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
var tags = newArray("nucleus-1","nucleus-2","cyto-1", "cyto-2"); | |
var colors = newArray("red", "green", "blue", "magenta"); | |
var commands = newArray("Select by tag..."); | |
var menu = Array.concat(commands, tags); | |
var pmCmds = newMenu("Popup Menu", menu); | |
macro "Popup Menu" { | |
cmd = getArgument(); | |
if (cmd=="Select by tag...") { | |
Dialog.create("Title"); |
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
// creates a stack, duplicating the source image | |
// after an idea by Mathieu Fallet | |
x=getNumber("no of Slices", 10); | |
run("Select All"); | |
run("Copy"); | |
for(i=1;i<x;i++){ | |
run("Add Slice"); | |
run("Paste"); | |
} |
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
run("Blobs (25K)"); | |
run("Smooth"); | |
run("Mean...", "radius=2"); | |
setAutoThreshold("Intermodes"); | |
run("Analyze Particles...", "exclude clear add"); |
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
resetThreshold(); | |
run("Remove Overlay"); | |
n = roiManager("count"); | |
Dialog.create("Choix"); | |
Dialog.addChoice("paramètre", newArray("Area","Mean","Circ."),""); | |
Dialog.show(); | |
param = Dialog.getChoice(); | |
m=moy(param); | |
for (i=0;i<n;i++) { | |
roiManager("select",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
dir = File.directory; | |
data = dir+ File.nameWithoutExtension+".txt"; | |
if (File.exists(data)) { | |
data=File.openAsString(data); | |
setMetadata("Info", data); | |
List.setList(data); | |
size=split(List.get('$CM_FULL_SIZE')); | |
makeRectangle(0,0,size[0],size[1]); | |
run("Crop"); | |
pixels = List.get('$$SM_MICRON_BAR'); |
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
// fixes the display range of lsm files with pixelDepth>8 | |
macro "fix display range [f]" { | |
Stack.getDimensions(width, height, channels, slices, frames); | |
for (c=0;c<channels;c++){ | |
Stack.setChannel(c+1); | |
getStatistics(area, mean, min, max, std, histogram); | |
setMinAndMax(min, max); | |
} | |
} |
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
// yet another multichannel profile plotter | |
// with smart(?) lookuptables | |
// 20181114 : works as a macro Tool thanks to Sophie Allart | |
// plot x-axis is calibrated thanks to Christian Rouviere | |
// works with 16-bit images thanks to Tiago Ferreira (https://gist.github.com/tferr/863b630d7da2dbcdbed0/revisions) | |
// Add Image popup menu with Inverted Background command to get dark mode plots (Christian Rouvière) | |
// Add standard line adjusting behavior (Christian Rouvière) | |
// Works with RGB or Composite images | |
macro "multichannel profile plotter Tool - Cf00D02D13D14D24D25D26D27D38D46D47D56D65D75D85D95Da5Db5Dc5Dc6Dd6Dd7Dd8De7De8Df6Df7C00fD09D1aD1bD2cD2dD2eD3eD3fD4dD4eD5cD6bD7bD7cD8bD9aDabDbaDcaDdbDdcDddDecDedDfbC000T06102"{ |
OlderNewer