Login  Register

editing an overlay

Posted by Kenneth Sloan on Jan 29, 2015; 9:41pm
URL: http://imagej.273.s1.nabble.com/editing-an-overlay-tp5011378.html

I have a plugin which creates a binary image from a grayscale image, and then does a few clean-up operations on the binary image.  After that, a trained observer is given the task of editing the binary image.  In it’s current, crude state, the observer has very little help from the original data - at best, the observer can see the two images side-by-side.

This is no longer acceptable - I would like to display the binary version as a transparent mask overlaid on top of the original grayscale image (say, coloring the grayscale in shades of red where the binary mask is 1).  But, I also want the observer to be able to edit the mask.

It’s not clear to me precisely how to do this.  I would appreciate pointers to appropriate places in the API, or sample snippets of (Java, please) plug-in code that I can use as building blocks.

So:
  input: 2 images, one grayscale the other a binary mask
         (original input is just the grayscale - I already generate the binary mask)

  behavior: display the grayscale image with shades of red where the mask is 1 and gray otherwise
            EDIT the mask (draw and erase - or, draw with either 0 or 1)
            an alternate view : color the grayscale GREEN where the mask is 0 and RED where
                                the mask is 1 - allow the observer to “draw” in GREEN or RED
  output: the modified binary mask.

Environment: FIJI - latest major, stable release.

It may well be that this is trivial with ordinary FIJI controls - if so, I’m just ignorant of these.

It would be acceptable to output the grayscale image (tinted in shades of RED or GREEN - mutually exclusively) - If this is easier, I will happily convert that image to a binary mask.  My problem is in editing the mask information on a display which shows the grayscale and the mask in perfect overlay registration.

Mostly, I’m trying to avoid the pain of writing yet-another-drawing-program - hoping that I can use a built-in process to allow the observer to use standard drawing tools to modify the mask.

--
Kenneth Sloan
[hidden email]
"La lutte elle-même vers les sommets suffit à remplir un coeur d'homme; il faut imaginer Sisyphe heureux."



--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html