Dear All,
Is it possible to use different or alternating non-destructive overlays on different slices of a stack? Or for each slice the overlay should be flattened? For example, I want to put an overlay of parallel lines so that for each slice of a stack line orientation will alternate between two directions. Sincerely, Alex -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
> On Jun 13, 2016, at 8:29 AM, Aleksandr Mironov <[hidden email]> wrote:
> > Dear All, > > Is it possible to use different or alternating non-destructive overlays on different slices of a stack? Or for each slice the overlay should be flattened? For example, I want to put an overlay of parallel lines so that for each slice of a stack line orientation will alternate between two directions. You can do this. The following macro provides an example. -wayne // Create a 4 slice stack newImage("Overlay", "8-bit black", 500, 500, 4); // Use Image>Overlay>Overlay Options to // specify the line color and width run("Overlay Options...", "stroke=red width=5 set”); // Add a line to the overlay in each of the 4 slices makeLine(117, 98, 385, 379); run("Add Selection..."); run("Next Slice [>]"); makeLine(368, 100, 117, 405); run("Add Selection..."); run("Next Slice [>]"); makeLine(93, 82, 365, 367); run("Add Selection..."); run("Next Slice [>]"); makeLine(365, 77, 133, 372); run("Add Selection..."); run("Select None”); // Use Image>Overlay>List Elements to summarize // the overlay. Note how the stack position of each // line is shown in the “Pos” (position) column. run("List Elements”); // Use Image>Overlay>Flatten to flatten the stack run("Duplicate...", "title=Flattened duplicate"); run("Flatten", "stack"); -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear Wayne,
Thank you very much for all your help with bugs and macros! Sincerely, Alex On 17/06/2016 04:16, Rasband, Wayne (NIH/NIMH) [E] wrote: >> On Jun 13, 2016, at 8:29 AM, Aleksandr Mironov <[hidden email]> wrote: >> >> Dear All, >> >> Is it possible to use different or alternating non-destructive overlays on different slices of a stack? Or for each slice the overlay should be flattened? For example, I want to put an overlay of parallel lines so that for each slice of a stack line orientation will alternate between two directions. > You can do this. The following macro provides an example. > > -wayne > > // Create a 4 slice stack > newImage("Overlay", "8-bit black", 500, 500, 4); > // Use Image>Overlay>Overlay Options to > // specify the line color and width > run("Overlay Options...", "stroke=red width=5 set”); > // Add a line to the overlay in each of the 4 slices > makeLine(117, 98, 385, 379); > run("Add Selection..."); > run("Next Slice [>]"); > makeLine(368, 100, 117, 405); > run("Add Selection..."); > run("Next Slice [>]"); > makeLine(93, 82, 365, 367); > run("Add Selection..."); > run("Next Slice [>]"); > makeLine(365, 77, 133, 372); > run("Add Selection..."); > run("Select None”); > // Use Image>Overlay>List Elements to summarize > // the overlay. Note how the stack position of each > // line is shown in the “Pos” (position) column. > run("List Elements”); > // Use Image>Overlay>Flatten to flatten the stack > run("Duplicate...", "title=Flattened duplicate"); > run("Flatten", "stack"); > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- Dr. Aleksandr Mironov MD, PhD Senior Experimental Officer D.1527, M.Smith Building EM Core Facility, Faculty of Life Sciences University of Manchester Oxford Road Manchester M13 9PT UK Tel. +44-(0)161-275-5645 E-mail: [hidden email] http://www.ls.manchester.ac.uk/research/facilities/ -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |