Polygon selection tools stops working when overlaying images

Hello,

I am working on cleaning up SEM images of collagen fibers that were segmented using the DiameterJ Segmentation tool. I overlayed the original image with the segmented image to facilitate this process, and originally the polygon selection tool enables me to select regions of fibers or backgrounds to fill (Edit -> fill). However, eventually the polygon tool becomes unresponsive in letting me select regions to fill when the overlayed image is on top. The tool works again if I move the overlayed image out of the way, but I need the image to stay in place for effective editing.

How should I go about fixing this problem? Thank you!

Hi @alemkuil

You could try merging both images as different channels in a composite image by using >Image >Color > Merge Channels.
Keeping them as composite gives you a certain visibility on both images and lets you create selections

I am unable to reproduce this problem. I used the following macro for testing. It opens the “Line Graph” sample image, inverts it, converts it to binary, uses Process>Binary>Options to dilate the lines, resizes the image to 300x207, opens the “M51 Galaxy” sample image, and uses Image>Overlay>Add Image to add the line graph as an image overlay.

-wayne

  run("Close All");
  run("Line Graph (21K)");
  run("Invert");
  run("Make Binary");
  run("Options...", "iterations=1 count=1 black do=Dilate");
  run("Size...", "width=300 height=207");
  run("M51 Galaxy (177K, 16-bits)");
  setMinAndMax(0, 3500);
  run("Add Image...", "image=LineGraph.jpg x=10 y=150 zero");

Hello,

I was able to successfully clean up my pictures after many rounds of adding the overlay image and removing it (Image->Overlay->Remove Overlay.) It is not an issue with the overlay feature, but rather the polygon selection tool-- but this can be avoided after opening and closing the program multiple times, in case anyone else encounters this same issue.

Thank you for your help!

Update: I realized the polygon selection tool wasn’t working because the software thought I had selected the overlaid image on top and I could not deselect it!

Very easy fix: Edit-> Selection -> Select None.

Thanks again!

1 Like