Login  Register

Re: Macro Help

Posted by Robert Baer on Jan 26, 2018; 4:07pm
URL: http://imagej.273.s1.nabble.com/Macro-Help-tp5019946p5019951.html

Reading the docs is always good, but your skill set seems particularly
well suited to using Plugins > Marcos > Record to record the steps as
you manually analyze a typical image.  This macro may not be a finished
piece of work, but looking at what gets recorded will help you move
forward from there.

Rob


On 1/24/2018 4:35 PM, macastronomer wrote:

> I need to learn to write Macros, but I'm not even sure where to start with
> this task. I'm familiar with some C++ and some Python, but not enough that I
> know where to begin. I'm pretty good at understanding code that is already
> written.
>
> Here is the task I have, and an image to help clarify. Autodetecting the
> membrane width will not work, which is why we need to multiple lines drawn
> manually. The following are the script steps that would be needed:
>
> Open an image, set the scale off of a micron bar.
>
> Ask for the measurement frequency in distance.
>
> Ask for a freehand line (in image it is the yellow line) down the center of
> the membrane.
>
> Ask for a freehand line on one side of the membrane (first cyan line).
>
> Ask for a second freehand line on the other side of the membrane (second
> cyan line).
>
> Points should be created down the yellow line at the above given distance
> until the end of the line is reached.
>
> Straight line segments created between each point.
>
> Then a perpendicular line drawn (the Red line) bisecting each line segment,
> extending only to the cyan lines.
>
> The length of each red line returned in the results (measurement) window.
>
> Ask to make another measurement or end.
>
> Burn lines into image and save.
>
> <http://imagej.1557.x6.nabble.com/file/t381898/measure.png>
>
>
>
> --
> Sent from: http://imagej.1557.x6.nabble.com/
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--


--
Robert W. Baer, Ph.D.
Professor of Physiology
Kirksville College of Osteopathic Medicine
A T Still University of Health Sciences
800 W. Jefferson St
Kirksville, MO 63501
660-626-2321 Department
660-626-2965 FAX

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html