Previous Message |
Next Message Previous in Topic | Next in Topic Previous by Same Author | Next by Same Author Previous Page (July 2004) | Back to Main IMAGEJ Page | |
|
Reply
| Post a New Message |
Join or Leave IMAGEJ, or Change Options
|
Search |
|
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: Fri, 23 Jul 2004 18:20:14 +0200 Reply-To: ImageJ Interest Group <[log in to unmask]> Sender: ImageJ Interest Group <[log in to unmask]> From: Paulo Magalh�es <[log in to unmask]> Subject: Wand-selected ROI coordinates in pluginHello all, I'm writing a plugin that requires the coordinates of a ROI. During the initial writing stages I used the Freehand tool to draw a ROI. Eventually I got the plugin to do exactly what I needed and in subsequent tests I used the Polygon tool to draw a ROI; also in this case the plugin performs perfectly. Now I've selected a ROI with the Wand tool and the plugin spat out a lot of garbage results... :-( I've tracked down the problem to the ROI coordinates. In the plugin, I use // Get the ROI Roi r = imp.getRoi(); [...] // Get the polygon PolygonRoi pr = (PolygonRoi)r; [...] // Get the coordinates int[] xROItemp = pr.getXCoordinates(); int[] yROItemp = pr.getYCoordinates(); This works well with traced ROIs (Freehand tool) and ROIs draw with the Polygon tool, but collapses with the Wand tool... If I look at the XY coordinates in the two arrays, they are different from the (real) XY coordinates that I get if I export the ROI as "Save as... XY coordinates"... I suspect that this is simply a reflex of my limited Java/ImageJ programming repertoire :-) I shouldn't be using PolygonROI for a wand selection, I guess... But I've tried looking through other plugins and I haven't managed to find a solution. Any help is much appreciated. All the best from Padua, Paulo Paulo Magalhaes, Ph.D. University of Padua Dept. Biomedical Sciences Viale G. Colombo, 3 Tel: +39 049 827 6065 I-35121 Padua - Italy Fax: +39 049 827 6049 http://www.bio.unipd.it/~pozzan/home.html http://www.azuleon.com -----------------------------------------------------
Center for Information Technology National Institutes of Health Bethesda, Maryland 20892 301 594 6248 (v) 301 496 8294 (TDD) Comments and Assistance Accessibility |