Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
3 posts
|
Greetings. I study airway wall remodeling and fibrosis in a rat model of
asthma. My typical image is a transverse section of the rat lung, where I can see a portion of the airway wall (not the full circle around the airway, but just a sector of that circle). To quantify the staining, I would like to make an ROI of the airway wall by drawing two parallel freehand lines, outlining the inside and outside border of the wall, and defining the ROI as the area between those lines on 2 sides, and the top and bottom of the image as the other 2 sides. I have 2 questions: - When I draw the first freehand line, and click the cursor somewhere else to draw the second line, the first line disappears. How can I avoid this? - Once I have the two lines drawn, how do I define an ROI bound by lines that don't connect to one another? Thank you very much. Oleg Broytman Department of Medicine University of Wisconsin - Madison -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
1631 posts
|
Hi Oleg,
On Fri, 11 Jan 2013, Oleg Broytman wrote: > I have 2 questions: > - When I draw the first freehand line, and click the cursor somewhere > else to draw the second line, the first line disappears. How can I > avoid this? Usually, holding down the Shift key adds to the current ROI. But since you are talking about *line* ROIs, that would not do what you want to, since... > - Once I have the two lines drawn, how do I define an ROI bound by lines > that don't connect to one another? ImageJ 1.x has no notion about line ROIs with gaps... The closest you can get is to add the individual ROIs to the ROI Manager (using the "t" key) before drawing the next one. If you click "Show all" in the ROI Manager, you will see the previous ROIs in another color. To use the ROIs for analysis, you can either select them individually in the ROI Manager and then process the individual ROI (you can automate this with a macro), or you can select them all and use ROI Manager's "Measure" if that provides the analysis you seek. Ciao, Johannes -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
1064 posts
|
In reply to this post by Oleg Broytman
On Jan 11, 2013, at 11:05 PM, Oleg Broytman wrote:
> Greetings. I study airway wall remodeling and fibrosis in a rat model of > asthma. My typical image is a transverse section of the rat lung, where I > can see a portion of the airway wall (not the full circle around the > airway, but just a sector of that circle). To quantify the staining, I > would like to make an ROI of the airway wall by drawing two parallel > freehand lines, outlining the inside and outside border of the wall, and > defining the ROI as the area between those lines on 2 sides, and the top > and bottom of the image as the other 2 sides. > > I have 2 questions: > - When I draw the first freehand line, and click the cursor somewhere else > to draw the second line, the first line disappears. How can I avoid this? > > - Once I have the two lines drawn, how do I define an ROI bound by lines > that don't connect to one another? ... [show rest of quote] You can do this sort of thing using a macro set like the one attached. To use it, create a line selection, press "1", create a parallel line selection, press "2", and the two line selections will be converted into an area selection. It requires the ImageJ 1.47i daily build, which adds the Overlay.addSelection() and Overlay.activateSelection() macro functions. To upgrade, use the Help>Update ImageJ command and select "daily build" from the drop down menu. Information about the ImageJ macro language is available at http://imagej.nih.gov/ij/developer/macro/macros.html -wayne macro "Save First Line [1]" { if (!isLine()) exit("No line selection"); Overlay.remove; Overlay.addSelection; } macro "Create ROI [2]" { if (!(isLine() && Overlay.size==1)) exit("No line selection and no line overlay"); getSelectionCoordinates(x1, y1); Array.reverse(x1); Array.reverse(y1); Overlay.activateSelection(0); getSelectionCoordinates(x2, y2); x = Array.concat(x1,x2); y = Array.concat(y1,y2); makeSelection("freehand", x, y); Overlay.remove; } function isLine() { return (selectionType>=5 && selectionType<=7); } -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Disable Popup Ads | Edit this page |