Hi Johannes,
many thanks for your quick answer.
I've found a plugin which does all the job : ROI_Importer.java
Have a nice day.
Yours faithfully
Philippe
Johannes Schindelin <
[hidden email]> a écrit :
> Hi Philippe,
>
> On Mon, 24 Oct 2011, Pouletaut wrote:
>
>> is there a way to import a xy coordinates file in order to plot and
>> overlay a contour on a image ? The file consists of two columns of float
>> coordinates in ASCII format, gathering ordered points of a contour.
>
> The easiest method would probably to write a macro. It would use the
> following functions:
>
> - File.openAsString() (or File.openAsRawString() if the file is larger
> than 5000 bytes) to read in the contents
>
> - split() to separate the lines
>
> - newArray() to make one array for the x and one for the y coordinates
>
> - a loop iterating over all the lines
>
> - inside the loop another split() to separate the numbers
>
> - parseFloat() to convert the textual representation of the numbers into
> numeric values
>
> - after the loop, makeSelection() to turn the arrays into a ROI
>
> - run() to call the "Add selection..." plugin to add the ROI to the overlay
>
> Ciao,
> Johannes
>
--
*--------------------------------------*
Philippe POULETAUT
Université de Technologie de Compiègne
Dpt Génie Biologique. UMR CNRS 6600
BP 20529
F 60205 Compiègne Cedex - France
bureau : RD201c (Centre de Recherches)
Tél.: +33 (0)3.44.23.44.23 poste 53.11 (CR)
courrier : CR / GB
courriel :
[hidden email]
site :
http://www.utc.fr/~pouletau/fax : 03.44.20.79.04
*--------------------------------------*