snap points in roi and draw line

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

snap points in roi and draw line

Peter Oslanec-2
Dear ImageJ users.

I would like to ask for some advice.

I would like to measure line distance between two points with line tool. I
add the points to ROI manager and would like to snap one point as a line
begining and second point as line end. Is it possible to tell the ImageJ to
take my point 1 (x1,y1) and point 2 (x2,y2) and draw line between them? I
know that I can use DrawLine(x1,y2,x2,y2) but only with manual editing of
points coordinates. Is it possible to tell the ImageJ to draw lines between
points I have added to ROI manager in some order.

Thank you for all your advices.

With best regards Peter.

--
Peter Oslanec
all about materials
materialing.com

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

Re: snap points in roi and draw line

Krs5
Dear Peter,

The macro code below draws a line between two points in the ROI-manager.

roiManager("Select", 0);
getSelectionCoordinates(x, y);
x1 = x[0];
y1 = y[0];
roiManager("Select", 1);
getSelectionCoordinates(x, y);
x2 = x[0];
y2 = y[0];
makeLine(x1, y1, x2, y2);

Best wishes

Kees


Dr Ir K.R. Straatman
Senior Experimental Officer
Advanced Imaging Facility
Centre for Core Biotechnology Services
University of Leicester
http://www2.le.ac.uk/colleges/medbiopsych/facilities-and-services/cbs/lite/aif


-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Peter Oslanec
Sent: 24 June 2014 18:57
To: [hidden email]
Subject: snap points in roi and draw line

Dear ImageJ users.

I would like to ask for some advice.

I would like to measure line distance between two points with line tool. I add the points to ROI manager and would like to snap one point as a line begining and second point as line end. Is it possible to tell the ImageJ to take my point 1 (x1,y1) and point 2 (x2,y2) and draw line between them? I know that I can use DrawLine(x1,y2,x2,y2) but only with manual editing of points coordinates. Is it possible to tell the ImageJ to draw lines between points I have added to ROI manager in some order.

Thank you for all your advices.

With best regards Peter.

--
Peter Oslanec
all about materials
materialing.com

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

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

Re: snap points in roi and draw line

Peter Oslanec-2
Kees, thank you very much for your help!!!

Best regards Peter.


2014-06-25 12:28 GMT+02:00 Straatman, Kees (Dr.) <[hidden email]>:

> Dear Peter,
>
> The macro code below draws a line between two points in the ROI-manager.
>
> roiManager("Select", 0);
> getSelectionCoordinates(x, y);
> x1 = x[0];
> y1 = y[0];
> roiManager("Select", 1);
> getSelectionCoordinates(x, y);
> x2 = x[0];
> y2 = y[0];
> makeLine(x1, y1, x2, y2);
>
> Best wishes
>
> Kees
>
>
> Dr Ir K.R. Straatman
> Senior Experimental Officer
> Advanced Imaging Facility
> Centre for Core Biotechnology Services
> University of Leicester
>
> http://www2.le.ac.uk/colleges/medbiopsych/facilities-and-services/cbs/lite/aif
>
>
> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
> Peter Oslanec
> Sent: 24 June 2014 18:57
> To: [hidden email]
> Subject: snap points in roi and draw line
>
> Dear ImageJ users.
>
> I would like to ask for some advice.
>
> I would like to measure line distance between two points with line tool. I
> add the points to ROI manager and would like to snap one point as a line
> begining and second point as line end. Is it possible to tell the ImageJ to
> take my point 1 (x1,y1) and point 2 (x2,y2) and draw line between them? I
> know that I can use DrawLine(x1,y2,x2,y2) but only with manual editing of
> points coordinates. Is it possible to tell the ImageJ to draw lines between
> points I have added to ROI manager in some order.
>
> Thank you for all your advices.
>
> With best regards Peter.
>
> --
> Peter Oslanec
> all about materials
> materialing.com
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--
Peter Oslanec
Institute of materials and machine mechanics
Slovak Academy of Sciences
Racianska  75
831 02 Bratislava
Slovakia

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