NIH LISTSERV
NIH LISTSERV
IMAGEJ archives -- February 2001 (#94)

Go to: Previous Message | Next Message
Previous in Topic | Next in Topic
Previous by Same Author | Next by Same Author
Previous Page (February 2001) | 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)
*

User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.02.2022
Content-type: text/plain; charset="US-ASCII"
Message-ID:  <[log in to unmask]>
Date:         Mon, 26 Feb 2001 14:51:25 +1100
Reply-To:     ImageJ Interest Group <[log in to unmask]>
Sender:       ImageJ Interest Group <[log in to unmask]>
From:         Greg Joss <[log in to unmask]>
Subject:      segmented line or POLYLINE ROI

Wayne, I would like to create a segmented line or POLYLINE ROI. The constructor public PolygonRoi(int[] xPoints, int[] yPoints, int nPoints, ImagePlus imp, int type) {... allows me to specify the points and have the resultant ROI drawn as a polygon with closed endpoints but I have been unable to find an interface to POLYLINE ROI's. public FreehandRoi(int x, int y, ImagePlus imp) { accepts type = FREELINE; but then I cant supply the points list. Getting access to the "Graphics g" object public void draw(Graphics g) { if (state!=CONSTRUCTING) { updatePolygon(); g.setColor(ROIColor); if (type==POLYLINE || type==FREELINE) g.drawPolyline(xp2, yp2, nPoints); so that I can do my own g.drawPolyline seems problematic as I get an awt diagnostic in response to Graphics graphics = this.imp.getImage().getGraphics(); which says image must be off screen for getGraphics() call to be valid. PolygonRoi is a workaround at the moment but I would prefer to leave the drawn line open-ended. The essesntial code is in 'gui', not 'plugins' so override is not an option(?). I presume that, in the longer term, you would intend to support a segmented line roi, so perhaps you would again be kind enough to make this minor adjustment to your priorities. :-) Regards and thanks, Greg -- Greg Joss, Department of Biological Sciences, Phone: (61)(2) 9850 8212 Fax: 9850 8245 Macquarie University, Email: [log in to unmask] North Ryde, (Sydney,) NSW 2109, Australia




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