imagejfiji

Converting colours and black background removal


enter image description hereI have an 8-bit black and white image and want to convert the few black spots to blue on a white background.

When I use Image->Lookup Tables->blue it creates a black background that I am unable to remove. Any better solutions hugely appreciated


Solution

  • If you don't mind a resulting RGB-image, i.e. no LUT-colouring, then the following ImageJ macro code should work:

    //
    setOption("BlackBackground",true);
    run("Convert to Mask");
    run("Create Selection");
    setForegroundColor(255,255,0);
    run("RGB Color");
    run("Fill","slice");
    run("Select None");
    run("Invert");
    //