Displaying particles

I am writing a macro for the analysis of a batch of images and get thousands of particles after running “analyze particles”. As the next step, I want to filter the results based on some positions and distances in the images and get like 10 % of the original number of particles. Every particle is labeled with an ID.
My question is how do I display only the list of particles after processing in the original image as mask or outlines to create a selection of them later. I just don’t know the command to display particles like the “Analyze Particles…” plugin does. I searched for it but can’t find it and thought instead of spending some more hours searching for it, it is easier to ask you.

Thanks a lot,
Joko

You might use the ROI Manager. You can advise the analyze particles function to add the measurements as ROI’s to the ROI Manager. Then you can select those ROI’s which met you criteria, see:

https://imagej.nih.gov/ij/docs/guide/146-30.html#sub:ROI-Manager

https://imagej.nih.gov/ij/docs/guide/146-30.html

To iterate over all ROI’s, see: