Posted by
CARL Philippe (LBP) on
URL: http://imagej.273.s1.nabble.com/ImageJ-macro-to-Java-conversion-tp5008955p5008963.html
Dear Avital,
The answer of Jan about "re-recording the steps from the macro with the
recorder set to Java" is actually the solution of the question you asked and
given that I wasn't aware of this option (which is quite cool to know) I'm
very happy you asked your question on the list.
Nevertheless, if what you are looking for is to "write properly your code so
that other people will have an easier time using it and understanding it"
you don't need to move your code to a plugin, but can just stick with the
macro language.
The macro recorder will never generate you a "final code" as you may wish
it, but just give you the framework of a good begin.
And from this framework it is then up to you to add comments in your macro,
add functions (with adapted names for example: "function
calculateLinePointDistance(xValuesLine, yValuesLine, xPoint, yPoint)") to
make it easier and more compact to read, use parameters with adapted names
(i.e. not "a, b, c,..." but rather "pictureName, pictureWidth,
pictureHeight,...").
My best regards,
Philippe
-----Message d'origine-----
De : ImageJ Interest Group [mailto:
[hidden email]] De la part de Avital
Steinberg
Envoyé : mercredi 30 juillet 2014 12:48
À :
[hidden email]
Objet : Re: ImageJ macro to Java conversion
Dear Philippe,
We made the macro by using the macro recorder, but now we'd like it to be
written properly so that other people will have an easier time using it and
understanding our code.
Thank you,
Avital
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html