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
// better split RGB image. | |
// @egrandgirard1 & @jmutterer | |
if (bitDepth==24) { | |
run("Duplicate...","title="+getTitle); | |
run("Split Channels"); | |
id=getImageID; | |
cols=newArray("#8888ff","#88ff88","#ff8888"); | |
for(i=0;i<3;i++) { | |
selectImage(id+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 "Test Action Tool - C000 T0h24T" { | |
run("Blobs"); | |
run("Green"); | |
run("In [+]"); | |
} |
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 name="user"; | |
macro "Test Tool - C000 T0h24T" { | |
getCursorLoc(x, y, z, modifiers); | |
print (name, "clicked:",x, y); | |
} | |
macro "Test Tool Options" { | |
name = getString("Name",name); | |
} | |
macro "Test Tool Selected" { |
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
import java.io.File; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.security.MessageDigest; | |
import ij.IJ; | |
import ij.gui.GenericDialog; | |
import ij.plugin.PlugIn; |
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 "digit1 Action Tool - C037N44R00nn" { | |
} | |
macro "digit2 Action Tool - C037N44R00nn" { | |
} | |
macro "digit3 Action Tool - C037N44R00nn" { | |
} | |
macro "play Action Tool - C037N44F0hf4 Fd64f Cf00 Va0bb " { | |
call("ij.gui.Toolbar.setIcon", "play Action Tool", "C037N44F0hf4 CfF0 Vadbb" ); | |
wait(500); | |
call("ij.gui.Toolbar.setIcon", "play Action Tool", "C037N44F0hf4 Fd64f Cf00 Va0bb" ); |
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
// reads and applies, the calibration, if any, | |
// from *_meta.xml files saved alongside | |
// *.tif files in Axiovision. | |
// [email protected] | |
fname=getInfo("image.directory")+getInfo("image.filename"); | |
if (File.exists(fname+"_meta.xml")) { | |
x=1;y=1; | |
s=split(File.openAsString(fname+"_meta.xml"),"\n"); |
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
// scrolls some demo text in tool icons | |
// install then press play icon | |
function start() { | |
setBatchMode(1); | |
call("ij.gui.Toolbar.setIcon", "T0 Action Tool", "D00"); | |
id = makeTemplate("ImageJ "+IJ.getFullVersion); | |
width=getWidth-24; | |
for (w=0;w<width*2;w=w+2){ | |
for (t=0;t<7;t++) { |
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 macro converts a 24x24 8-bit image to a tool macro icon | |
// string. Ideally, the image should have no more than 16 colors. | |
// Includes a few examples. | |
macro "Convert Image to Tool Icon 24..." { | |
requires("1.53c"); // for the extended hex feature | |
if (bitDepth==24) // convert RGB to 16-color 8-bit | |
run("8-bit Color", "number=16"); | |
if (bitDepth!=8 || getWidth>24 || getHeight>24) | |
exit("This macro requires an 8-bit 24x24 image"); |
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 example uses the Toolbar.setIcon(toolName,icon) method | |
// added in v1.53h, to dynamically update its icon. | |
macro "Left Eye Action Tool - N44 C000 o00nn" { | |
setTool("Googly Eyes Tool") | |
} | |
macro "Right Eye Action Tool - N44 C000 o00nn" { | |
setTool("Googly Eyes Tool") | |
} |