Discussion:
Measuring distance between two points
Liliana de Jesus Duarte Ferreira
2008-06-20 15:07:42 UTC
Permalink
Dear all

Can anyone tell me how to measure the distance between two spots that are
in different sections of the same stack?

Thanks

Liliana







--
Liliana Ferreira
Plant Genetic Engineering Laboratory
Instituto de Tecnologia Química e Biológica
Av. Republica, Apartado 127
2781-901 Oeiras
Portugal

lferreira-***@public.gmane.org
phone: +351 214469648
John Oreopoulos
2008-06-20 16:57:44 UTC
Permalink
Hi Liliana,

First, I'm assuming you're talking about measuring the distance
between two points in 3D space that have been captured in a single
time point 3D stack and not a time-lapse 2D stack. A simple way to do
this is to draw a line on one image of the stack that would intersect
both spots of interest if they both occurred in the same image (You
could add all images together to make this happen, draw the line, and
then draw it again on the original stack). Then click Image->stacks-
>reslice. This produces a new image that is a cross-section side on
view of the stack along the line you drew, and you should now see
both spots separated by some vertical and horizontal pixel distance.
Now you need to know your lateral and axial pixel dimensions in order
to calculate the distance. However, I'm not exactly sure how ImageJ
draws reslice images from lines that were drawn on a diagonal. You
might have to consider that when calculating the lateral distance.
I'm sure someone out there has already produced a much better ImageJ
plugin would essentially do all of this for you by clicking on the
two points of interest in the stack, but you may have to hunt around
on the plugins part of the website to find that. Can anyone else
recommend a plugin?

John Oreopoulos


On 20-Jun-08, at 11:07 AM, Liliana de Jesus Duarte Ferreira wrote:

> Dear all
>
> Can anyone tell me how to measure the distance between two spots
> that are
> in different sections of the same stack?
>
> Thanks
>
> Liliana
>
>
>
>
>
>
>
> --
> Liliana Ferreira
> Plant Genetic Engineering Laboratory
> Instituto de Tecnologia Química e Biológica
> Av. Republica, Apartado 127
> 2781-901 Oeiras
> Portugal
>
> lferreira-***@public.gmane.org
> phone: +351 214469648
Wayne Rasband
2008-06-20 17:12:03 UTC
Permalink
> Can anyone tell me how to measure the distance between two spots that
> are
> in different sections of the same stack?

The 3D distance tool does this.

http://rsb.info.nih.gov/ij/macros/tools/3D-Distance-Tool.txt

-wayne
simon andrews (BI)
2008-06-23 08:59:46 UTC
Permalink
> -----Original Message-----
> From: ImageJ Interest Group [mailto:IMAGEJ-9srhZJH3/***@public.gmane.org] On
> Behalf Of Liliana de Jesus Duarte Ferreira
> Sent: 20 June 2008 16:08
> To: IMAGEJ-9srhZJH3/***@public.gmane.org
> Subject: Measuring distance between two points
>
> Dear all
>
> Can anyone tell me how to measure the distance between two
> spots that are in different sections of the same stack?

It's just an extension of Pythagoras' theorem to do this in 3D.

ie

sqrt((x1-x2)**2 + (y1-y2)**2 + (z1-z2)**2)

You'll need to watch out that the distance between adjacent pixels in
the same stack probably won't be the same as the distance between the
same pixel in adjacent stacks so convert to real distances as early as
possible to keep things simple.

It may well be overkill for your case, but I wrote a plugin to this a
while back. It requires fairly clean images and needs Java3D to be
installed, but it might be worth a look.

http://www.bioinformatics.bbsrc.ac.uk/projects/stackmeasure/

Simon.
Dimiter Prodanov
2008-06-23 09:47:15 UTC
Permalink
Hi,

take the Euclidean distance between points in 3D space:

D=sqrt ( (x1-x2)^2 + (y1-y2)^2 + (z1-z2)^2)

You have to calibrate x and y which will give you the focal plane
projection and the the z-axis which will give you the depth.

best regards,

Dimiter
Liliana de Jesus Duarte Ferreira
2008-06-23 12:20:32 UTC
Permalink
Thanks John Oreopoulos, Wayne Rasband, Simon Andrews and Dimitir Prodanov
for the help.

Cheers,

Liliana
radioradio
2011-09-26 19:10:55 UTC
Permalink
Hi! Is it possible to reslice a cross-sectional stack along this 3d line?

--
View this message in context: http://imagej.588099.n2.nabble.com/Measuring-distance-between-two-points-tp637546p6833099.html
Sent from the ImageJ mailing list archive at Nabble.com.
Continue reading on narkive:
Loading...