Login  Register

Macro to analyze periphery rectangular areas of rotated rectangles

Posted by Roger Chang-3 on Aug 05, 2008; 11:08pm
URL: http://imagej.273.s1.nabble.com/Macro-to-analyze-periphery-rectangular-areas-of-rotated-rectangles-tp3695435.html

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