image analysis help (diffusion)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

image analysis help (diffusion)

Adam Huttenlocker
Dear all,

A few weeks ago I sent out a request and have yet to find a solution,
although I'm sure a simple one exists. I am interested in whether there is
a script that can randomly pick out 1000 black pixels in a black & white
thresholded image and calculate the distance of each to its closest white
pixel, and then output a frequency diagram showing the distribution of
distances between black and white points. This is something useful from a
biomedical viewpoint for looking at tissue vascularity and Krogh diffusion.

Surely something like this must exist? Or it could be made easily? It seems
like all one would need is a bitmap image and the coordinates for the black
& white pixels in the image.

Thanks in advance,

-Adam Huttenlocker

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: image analysis help (diffusion)

Gabriel Landini
On Wednesday 06 May 2015 16:18:40 Adam Huttenlocker wrote:
> a script that can randomly pick out 1000 black pixels in a black & white
> thresholded image and calculate the distance of each to its closest white
> pixel, and then output a frequency diagram showing the distribution of
> distances between black and white points.
Hi,
You can do what you want by computing the Euclidean distance of the
background. So depending on what colour are the foreground and background you
might need to invert the image.

The command that does that is Distance map.
http://rsbweb.nih.gov/ij/docs/guide/146-29.html#toc-Subsection-29.8

A histogram of the result image gives your the frequency of shortest distances
to foreground pixels.

If you want 1000 points, then you will need to get the values of those points
in the distance map, instead of getting them all.
Hope this helps

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: image analysis help (diffusion)

Robert Dougherty
In reply to this post by Adam Huttenlocker
Adam,

Why isn't this just the histogram of the Euclidean distance map?

run("Dot Blot (7K)");
setOption("BlackBackground", false);
run("Make Binary");
run("Duplicate...", "title=Dot_Blot-1.jpg");
run("Distance Map");
run("Histogram");

Bob

On May 6, 2015, at 3:18 PM, Adam Huttenlocker wrote:

> Dear all,
>
> A few weeks ago I sent out a request and have yet to find a solution,
> although I'm sure a simple one exists. I am interested in whether there is
> a script that can randomly pick out 1000 black pixels in a black & white
> thresholded image and calculate the distance of each to its closest white
> pixel, and then output a frequency diagram showing the distribution of
> distances between black and white points. This is something useful from a
> biomedical viewpoint for looking at tissue vascularity and Krogh diffusion.
>
> Surely something like this must exist? Or it could be made easily? It seems
> like all one would need is a bitmap image and the coordinates for the black
> & white pixels in the image.
>
> Thanks in advance,
>
> -Adam Huttenlocker
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

Robert Dougherty, Ph.D.
President, OptiNav, Inc.
1414 127th Place NE #106
Bellevue, WA 98005
Tel. (425)891-4883
FAX (425)467-1119
www.optinav.com
[hidden email]

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: image analysis help (diffusion)

Jeremy Adler
The histogram of the distance transform is your answer

But for vascularity you might also consider
How making the measurement in 3D would affect the answer - a 2D measurement will overestimate distances as there may be a closer foreground pixel in a adjacent Z image. A 3D distance transform is available in ImageJ
Another complication is edge effects - the nearest pixel may be outside the image or image stack, so you need to make the distance histogram from a subregion of the image - exclude areas closer to the edge than the furthest 'true' distance you find.


-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Robert Dougherty
Sent: den 7 maj 2015 02:03
To: [hidden email]
Subject: Re: image analysis help (diffusion)

Adam,

Why isn't this just the histogram of the Euclidean distance map?

run("Dot Blot (7K)");
setOption("BlackBackground", false);
run("Make Binary");
run("Duplicate...", "title=Dot_Blot-1.jpg"); run("Distance Map"); run("Histogram");

Bob

On May 6, 2015, at 3:18 PM, Adam Huttenlocker wrote:

> Dear all,
>
> A few weeks ago I sent out a request and have yet to find a solution,
> although I'm sure a simple one exists. I am interested in whether
> there is a script that can randomly pick out 1000 black pixels in a
> black & white thresholded image and calculate the distance of each to
> its closest white pixel, and then output a frequency diagram showing
> the distribution of distances between black and white points. This is
> something useful from a biomedical viewpoint for looking at tissue vascularity and Krogh diffusion.
>
> Surely something like this must exist? Or it could be made easily? It
> seems like all one would need is a bitmap image and the coordinates
> for the black & white pixels in the image.
>
> Thanks in advance,
>
> -Adam Huttenlocker
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

Robert Dougherty, Ph.D.
President, OptiNav, Inc.
1414 127th Place NE #106
Bellevue, WA 98005
Tel. (425)891-4883
FAX (425)467-1119
www.optinav.com
[hidden email]

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html