Fiji: Multi-point tool, load points via xy-coordinates

Dear colloeagues,

I use the Fiji’s / Imagej’s Multi-point tool to extract coordinates from a picture. This works out fine and easy: create multiple points and then “file -> save as -> XY Coordinates”.

Is it possible to also load the points again? Thus I can edit the pouints and see them in the picture again?

Thank you in advance for your replies.

Best regards,
Felix

Hi @felix.b

There might be an easier way to do this but a few lines of macro code do the job nicely:

https://bitbucket.org/snippets/davemason/bL9dGr

Basically using File.openAsString to open the tab delimited text file (this is how my version of Fiji saves out XY coords), the iterating through them with a loop, making a point selection then saving it to the ROI manager for further use.

Of course, if you just save the ROIs from the ROI manager in the first place, then you can load them back in but that’s not what you asked in the original post.
ROI_save

1 Like

You can load points saved with File->Save As->XY Coordinates using this macro:

  run("XY Coordinates... ", ""); //Import>XY Coordinates
  getSelectionCoordinates(xpoints, ypoints)
  makeSelection("point", xpoints, ypoints);

Save the points using File>Save As>Selection and you will be able to reopen them using File>Open or by dragging and dropping the saved points on the main ImageJ window. This also has the advantage of preserving the the size, color and type of the points.

2 Likes

Dear Dave and Wayne,

thank you for your replies and the hints. At the moment I am using Wayne’s solution which works out good for me.

Best regards,
Felix

1 Like