NIH LISTSERV
NIH LISTSERV
IMAGEJ archives -- August 2003 (#63)

Go to: Previous Message | Next Message
Previous in Topic | Next in Topic
Previous by Same Author | Next by Same Author
Previous Page (August 2003) | Back to Main IMAGEJ Page


Options: Reply | Post a New Message | Join or Leave IMAGEJ, or Change Options | Search
View: Chronologically | Most Recent First | Wrap Text (Proportional Font) | Don't Wrap Text (Non-proportional Font)
*

Content-Type: text/plain; charset=US-ASCII; format=flowed
Message-ID:  <[log in to unmask]>
Date:         Mon, 11 Aug 2003 14:50:30 -0400
Reply-To:     ImageJ Interest Group <[log in to unmask]>
Sender:       ImageJ Interest Group <[log in to unmask]>
From:         Wayne Rasband <[log in to unmask]>
Subject:      Re: Measure distance
In-Reply-To:  <[log in to unmask]>

> Dear users, > I have a given shape in an image which I can select with the > wand tool. I need the x-,y- coordinates of the pixel with the > largest perpendicular distance to the x-axis. Performing by > hand is simple but I am looking for an automated process > because I have a lot of stacks. I experimented with the the > macro function getBoundingRect(x, y, width, height) but this > gives me only the y-coordinate. My mind is blocked, therefore > I am grateful for any hint. Here is a macro that finds the x and y coordinates of the pixel inside the selection with the smallest y coordinate. -wayne macro "FindTopPixel" { getSelectionCoordinates(x, y); minx =getWidth(); miny =getHeight(); for (i=0; i<x.length; i++) { if (y[i]<miny) { minx = x[i]; miny = y[i]; } } print(minx+" "+miny); }




Back to: Top of message | Previous page | Main IMAGEJ page

NIH LISTSERV Home Page

CIT
Center for Information Technology
National Institutes of Health
Bethesda, Maryland 20892
301 594 6248 (v) 301 496 8294 (TDD)
Comments and Assistance
Accessibility wheelchair icon