Re: measure particle distance to an arbitrary line

Posted by ctrueden on
URL: http://imagej.273.s1.nabble.com/measure-particle-distance-to-an-arbitrary-line-tp3703606p3703607.html

Hi Javier,

The scheme you describe should work. You might introduce a little bit of
error with the arbitrary rotation, but probably not enough to be much of
a problem. However, depending on the number of images you have to
analyze, it may ultimately be more work for you than just writing a
plugin or macro (or finding someone else to do so). The custom solution
has the advantage of producing results exactly the way you want them
without needing to manually load your results into Excel every time.

-Curtis

F Javier Diez Guerra wrote:

> Dear Curtis and Michael,
>
> Thanks for your input.
>
> Since my programming skills are very limited (or non-existent, to be
> fair), I have been trying an alternative to make calculations easier.
>
> Analyze>set measurements can be set to calculate the center of mass of
> each particle, which is expressed as coordinates X,Y. Since the
> shortest distance between a point and a straight line is its
> perpendicular (normal) projection, then one could rotate the whole
> image (copy-pasted in a bigger frame) so that the reference straight
> line (manually drawn) is parallel to one of the (X or Y) image axes.
>
> The angle of (arbitrary) image rotation can be seen below the toolbar
> and annotated as the reference straight line is drawn. Then, the
> center of mass for each particle is calculated by "Analyze>Analyze
> particles" in the rotated image.
>
> Finally, to calculate distances from each particle to the straight
> line we need to know  the X or Y value of the straight line (depends
> on rotation). This value is subtracted from the corresponding X or Y
> coordinate of each particle (can be done in excel).
>
> Is this correct? too easy? have I overlooked anything?
>
> Regards,
>
>
>
> F Javier Diez-Guerra, PhD
> Profesor Titular
> Centro de Biologia Molecular Severo Ochoa
> Facultad de Ciencias, Universidad Autónoma
> Ctra Colmenar Viejo Km 15
> Cantoblanco, 28049 Madrid
> SPAIN
>
> phone:  +34 91 4978051
> Fax:      +34 91 4978087
> e-mail: [hidden email]