This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 step =90; | |
| var step_in_unit =90; | |
| var angle =90; | |
| var colors =newArray("red", "green", "blue", "orange"); | |
| var color = "red"; | |
| macro "Grid Tool - C00cT1f1aG" { | |
| max = maxOf(getWidth,getHeight); | |
| getCursorLoc(x0, y0, z, flags); | |
| while (flags&16!=0) { |
This file contains hidden or 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); | |
| } |
This file contains hidden or 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 macro making a movie (stack) of zooming on selected rectangle (ROI) | |
| //Eugene Katrukha katpyxa at gmail.com | |
| requires("1.48h"); | |
| //check if there is rectangular selection | |
| if(selectionType() ==0) | |
| { | |
| sTitle=getTitle(); | |
| sMovieTitle=sTitle+"_zoom_movie"; | |
| setBatchMode(true); |
This file contains hidden or 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
| setBatchMode(true); | |
| id = getImageID(); | |
| n = nSlices(); | |
| for(i=1; i<=n; i++) { | |
| setSlice(i); | |
| run("FFT"); | |
| run("Select All"); | |
| run("Copy"); | |
| run("Close"); | |
| if (!isOpen("Stack of FFT"+id)) { |
This file contains hidden or 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
| setBatchMode(true); | |
| t = getTitle(); | |
| if (!startsWith(t,"Stack of FFT")) exit ("Requires an FFT stack"); | |
| original = 1*substring (t,indexOf(t,"-")); | |
| if (!isOpen(original)) exit("Original image has been closed"); | |
| fft = getImageID(); | |
| selectImage(original); | |
| run("Duplicate...", "title=Results duplicate"); | |
| results= getImageID; | |
| selectImage(original); |
This file contains hidden or 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
| // cuts a closed freehand selection | |
| // into 2 free line selections | |
| // after selecting two points | |
| // click and drag to move selection along area | |
| // press shift to define first point | |
| // drag to define second point, release to split | |
| // see https://www.youtube.com/watch?v=qrZgbqSFv68 | |
| var shift=1; | |
| var firstPointSet=false; |
This file contains hidden or 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
| // 10PRINT rosette Processing 3 code | |
| // thanks to @shiffman ! | |
| float r=20; | |
| float s=10; | |
| void setup() { | |
| size(300, 300); | |
| frameRate(1); | |
| } |