Posted by
Stoyan Pavlov on
Sep 19, 2014; 7:53am
URL: http://imagej.273.s1.nabble.com/Count-intersection-lines-tp5009504p5009694.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