How to color only a selected area

I have greyscale SEM images that I am trying to color only a selected area. I’m using the wand tool to select my image, but having no success when trying to fill the area with the LUT options. I’ve tried on both Fiji and ImageJ, with no luck. I’m also [very] new to both SEM and ImageJ. Any help would be much appreciated!

Hi
@maclark11

newImage ("Untitled", "8-bit ramp", 512, 512, 1);
//setTool("rectangle");
makeRectangle(66, 53, 60, 86);
roiManager("Add");
roiManager("Select", 0);
roiManager("Set Fill Color", "blue");
//setTool("oval");
makeOval(231, 129, 84, 96);
roiManager("Add");
roiManager("Select", 1);
roiManager("Set Fill Color", "red");
//setTool("polygon");
makePolygon(389,206,311,279,418,284);
roiManager("Add");
roiManager("Select", 2);
roiManager("Set Fill Color", "yellow");
roiManager("Show All");

Can this help?

Hi, thank you! I was able to follow your instructions to change the general colors (which helped a lot!!), but I was hoping to fill the shapes using the LUT color selections.

Hi
@maclark11

Maybe this?

run("Blobs (25K)");
run("Duplicate...", "title=1");
close("\\Others");
run("Duplicate...", "title=2");
run("BRGBCMYW");
selectWindow("1");
run("RGB Color");
selectWindow("2");
//setTool("oval");
makeOval(83, 38, 103, 148);
roiManager("Add");
run("Copy");
roiManager("Select", 0);
selectWindow("1");
run("Restore Selection");
run("Paste");
roiManager("Set Color", "black");
roiManager("Set Line Width", 3);
selectWindow("2");
roiManager("Set Color", "black");
roiManager("Set Line Width", 3);

This works for me
Thanks @biovoxxel

2 Likes