How to unassociate a generated ROI from a channel? Or not have it associated in the first place?

Greetings,
I have an image with 4 channels. I am trying to analyze particles in binary channel (#2). For that I have two sets of ROIs generated. First set was generated from binarized channel #3. Second set was generated from non-binarized channel #4: first I find maxima in that channel, then draw circles around point selections, and delete the point ROIs. As result, I have in my ROI manager, say, 150 ROIs from first set (channel #3), followed by 130 ROIs from second set (channel #4), I can “show all”, see my ROIs from both sets, see labels, save them to .zip, load, etc.

I then have a simple iterator that goes through ROI manager list and runs “Analyze Particles”:

numROIs= roiManager("Count");			
imgID= getImageID();
t = getTitle;
t = replace(t, ".lif", "");
for (j=0; j<numROIs; j++)
{
	selectImage(imgID);
	roiManager("select",j);
	wait(50);
	run("Duplicate...", " ");
	run("Analyze Particles...", "size=4-Infinity pixel display exclude summarize add in_situ");
	selectWindow(t+"-1.lif");
	close();
}
selectWindow("Results");
exit()

Before I start the iterator I switch to binary channel #2. Then I run the macro, and get 150 lines of output in summary - but as soon as ROI manager gets to first ROI of second set (that was generated in channel #4), the “active” channel automatically switches from binary #2 to channel #4, which is non-binarized, and macro stops, because particle analysis can’t run on 8-bit.

What I don’t understand is why this automatic switch happens. It happens outside of macro as well, if I just scroll through ROIs in manager; channel switches as soon as I select any ROI from second set, but there is no switching as I cycle ROIs in first set. All ROIs in manager look the same to me (besides their names), and I can’t find any clues to each individual ROI being “associated” with a channel, or not, or how to disable this association, so no automatic switching occurs.

ROI manager option “Associate Show All with slices” does nothing to this behavior whether switched on or off.

Try using the ROI Manager’s More>>Remove Positions command.

Hi!
The problem was with names of ROIs, a prefix like “0004-” would switch to channel 4 if ROI is selected in the manager.
This:
roiManager(“remove slice info”);
cuts off the prefix, which works.