Rescale Multipoint selection

I used the Multipoint tool to select all “bacteria” in several pictures. (several hundred per picture)
However the pictures were taken in different resolutions.

Now I want to rescale the pictures that they all have the same resolution for analysis.

If I press ‘t’ the multipoint selection gets displayed correctly in the ROI manager.

I tried:

run(“Scale…”, “x=0.3053613 y=0.3053613 interpolation=Bilinear average create title=scaled”);
run("Scale… ", “x=0.3053613 y=0.3053613”);
// END

However it does not work on the multipoint selection. Is there a macro that “rescales” the multipoint selection ?
As I am new to this I somehow can’t wrap my head around it.


I don’t know about how to do your specific idea, but I have an idea for a workaround. If you were to save the xy coordinates to a spreadsheet using Measure, do the scaling transformation in Excel (adjusting the xy coordinates by whatever factor), and then reimport the transformed CSV using the Import Multi-Point Set macro (the source website appears to be down so I’ll attach a slightly modified version I have on handImport Multipoint FINAL.ijm (1.6 KB)), perhaps that would work? Sometimes I’ve noticed issues with this macro, for example, if I import pixel xy coordinates to a micron/pixel scaled file, it will put all of the multi-points in the corner. The way to fix this is to remove the scale on the recipient image, so xy coordinates given in raw unscaled pixels are imported to a file with raw unscaled pixels.

You’ll import a CSV file where (for the version of the macro I’ve attached) column 1 and 2 are identifiers, columns 3 and 4 are X and Y. I guess if you don’t have anything to put in those columns you could leave blank or edit the macro to change the column reference

1 Like

Thanks for the swift and helpfull answer ! It worked the way you proposed. From now on I will make sure to properly scale all images BEFORE selecting anythin with the Multi-point tool :wink:

Sweet! Glad I could help!

This bug is fixed in the latest ImageJ daily build (1.52v4). This test macro reproduces the problem:

  run("Boats (356K)");
  xpoints = newArray(193,308,582);
  ypoints = newArray(231,275,265);
  makeSelection("points xxl red cross",xpoints,ypoints);
  run("Scale...", "x=0.5 y=0.5 average create");
  run("Restore Selection");
  run("Scale... ", "x=0.5 y=0.5");

Cool, thanks for the update !