i have membranes imaged. i want to put a straight line through the center of the image vertically and through the center horizontally and count how many times the straight lines intersects the membranes. i have tried thresholding the image and creating an outline but beyond this point, i am stuck. how do i make imagej count the number of times the straight lines intersect the membranes? is this even possible? thanks!
|
Dear Noname,
your request is difficult to meet without seeing a typical image. From your description I'd try to analyze profiles along the desired lines that of course must be line selections. How this 1D-analysis has to be performed depends on the image... Best Herbie ::::::::::::::::::::::::::::::::::::::: On 04.09.14 18:09, redcarnations wrote: > i have membranes imaged. i want to put a straight line through the center of > the image vertically and through the center horizontally and count how many > times the straight lines intersects the membranes. i have tried thresholding > the image and creating an outline but beyond this point, i am stuck. how do > i make imagej count the number of times the straight lines intersect the > membranes? is this even possible? thanks! > > > > -- > View this message in context: http://imagej.1557.x6.nabble.com/Count-intersection-lines-tp5009504.html > Sent from the ImageJ mailing list archive at Nabble.com. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi all,
This question came up in the fiji-devel IRC channel today. The log and a link to a partial solution can be found in the fiji-devel chat log <http://code.imagej.net/chatlogs/fiji-devel?times=prefix&start-date=2014-09-04&start-time=0400&end-date=2014-09-05&end-time=0400> . Regards, Mark On Thu, Sep 4, 2014 at 12:03 PM, Herbie <[hidden email]> wrote: > Dear Noname, > > your request is difficult to meet without seeing a typical image. > > From your description I'd try to analyze profiles along the desired lines > that of course must be line selections. How this 1D-analysis has to be > performed depends on the image... > > Best > > Herbie > > ::::::::::::::::::::::::::::::::::::::: > > On 04.09.14 18:09, redcarnations wrote: > >> i have membranes imaged. i want to put a straight line through the center >> of >> the image vertically and through the center horizontally and count how >> many >> times the straight lines intersects the membranes. i have tried >> thresholding >> the image and creating an outline but beyond this point, i am stuck. how >> do >> i make imagej count the number of times the straight lines intersect the >> membranes? is this even possible? thanks! >> >> >> >> -- >> View this message in context: http://imagej.1557.x6.nabble. >> com/Count-intersection-lines-tp5009504.html >> Sent from the ImageJ mailing list archive at Nabble.com. >> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Herbie-4
for example, an histology of lung alveoli.
if i wanted to see how many alveolar membranes the line intersected with |
On Friday 05 Sep 2014 18:30:59 you wrote:
> for example, an histology of lung alveoli. > if i wanted to see how many alveolar membranes the line intersected with I do not have the exact code, but here is an idea: If the membranes are stained unequivocally, then take they profile of the line. That profile should be bright where there is "air" and dark when it is a stained membrane. So counting the number of "regional minima" of at least a certain size (so you do not get spurious ones) should be the number you are after. Something like: run("Tree Rings (48K)"); //setTool("line"); makeLine(929, 62, 1169, 64); run("Plot Profile"); You get 9 regional minima. Since you can get the pixel values of the profile into an array (there was a posting in the last few weeks exactly on this) then you can compute the number of minima in the array. You might also want to apply a running average to the array (or on the image) to smooth out small perturbances (like the last one on the right generated from the code above, which looks like a double valley. Hope it helps. Gabriel -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Here's an idea:
Create a binary Image( with the same dimensions as your specimen images) of your probing lines. Next perform an Arithmetic "AND" with the image calculator between line image and thresholded outline image. The resulting will contain series of objects composed of the pixels where the lines from the first image intersect the outlines from. Count the objects and you will have your count. Stoyan --- Dr. Stoyan P. Pavlov, MD, PhD Departament of Anatomy, Histology and Embryology Medical University "Prof. Dr. Paraskev Stoyanov", Varna Prof. Marin Drinov Str.55 9002 Varna Bulgaria Tel: +359 (0) 52 - 677 - 052 e-mail: [hidden email] [hidden email] 2014-09-06 11:40 GMT+03:00 Gabriel Landini <[hidden email]>: > On Friday 05 Sep 2014 18:30:59 you wrote: >> for example, an histology of lung alveoli. >> if i wanted to see how many alveolar membranes the line intersected with > > I do not have the exact code, but here is an idea: > If the membranes are stained unequivocally, then take they profile of the > line. That profile should be bright where there is "air" and dark when it is a > stained membrane. > So counting the number of "regional minima" of at least a certain size (so you > do not get spurious ones) should be the number you are after. > > Something like: > run("Tree Rings (48K)"); > //setTool("line"); > makeLine(929, 62, 1169, 64); > run("Plot Profile"); > > You get 9 regional minima. Since you can get the pixel values of the profile > into an array (there was a posting in the last few weeks exactly on this) then > you can compute the number of minima in the array. > You might also want to apply a running average to the array (or on the image) > to smooth out small perturbances (like the last one on the right generated > from the code above, which looks like a double valley. > Hope it helps. > > Gabriel > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |