Posted by
Volker Baecker on
Aug 06, 2008; 8:03am
URL: http://imagej.273.s1.nabble.com/Macro-to-analyze-periphery-rectangular-areas-of-rotated-rectangles-tp3695435p3695436.html
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello Roger,
there is a rotate command for rois in ImageJ. You can find it in the
menu Edit>Selection>Rotate... The macro code to run it is
run("Rotate...", "angle=33");
This command calls a macro RotateSelection.txt that you can find in the
ij.jar.
I'm using ImageJ 1.41b but according to
http://rsbweb.nih.gov/ij/docs/all-notes.htmlthe rotate command for selections was introduced in 1.35b
Best regards,
Volker Baecker
Roger Chang a écrit :
| Dear ImageJ Listserv members,
| I am in the middle of writing an ImageJ macro to analyze the area in
rotated
| image selection rectangles' periphery rectangles. What I mean by periphery
| rectangles is taking each of the four sides of the original rotated
| rectangle selection and creating four smaller, periphery rectangles that
| "surround" the original rotated rectangle on all four sides. However,
these
| periphery rectangles do not extend out, but extend into the original
rotated
| rectangle selection area.
|
| I am having a lot of trouble calculating and defining these periphery
| rectangles with trignometric calculations. If the angle is too close to 90
| deg. or 0 deg., the periphery rectangles of the longer sides become
shorter
| or longer than the original rectangles.
|
| Do any of you have any other suggestions of another approach to define
these
| four rotated, periphery rectangles that surround the original rotated
| rectangle? Unfortunately, I have not found any mention of a rotate
function
| for image selections in the ImageJ Listserv or in the macro function list;
| although there are many rotate functions for an entire image.
|
| If any of my explanation was not clear, please feel free to reply for a
| clarification.
|
| Yours truly,
| Roger Chang
| Washington University in St. Louis BME Department: Efimov Lab
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.orgiD8DBQFImVrMxZKX7A/4oMERAiSvAKDZJS9GmAYkujsJUusDpCxzAW3ZmQCfQ49o
L3SPwPPg9OeY/gi/VCCQVyU=
=deIl
-----END PGP SIGNATURE-----
--
passerelle antivirus du campus CNRS de Montpellier
--