painting an overlay

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

painting an overlay

Kenneth Sloan-2
I am looking for help on a feature that I think exists, but I have never used.
The answer is probably RTFM, but I would appreciate a few hints.

Here’s what I want to do:

a) I have a plugin that accepts any type of image, makes a copy, converts to 8-bit
   and then uses auto local thresholding to create a binary mask
b) I would like to give a trained observer the option to PAINT in the thresholded image
   to correct errors made by the auto local threshold
c) That works now - except that the user has little guidance correlating the gray-scale
   image with the binary mask
d) So…I would like to OVERLAY the binary mask on the grayscale image and allow the observer
   to paint the OVERLAY
e) and then…at the end…I need to convert the overlay to an independent binary mask image.

The parts I don’t know how to do are:

* convert binary mask to an overlay on the original gray-scale image
  (it’s ok, of course, to do this on a COPY of the original, since the original
   may not be 8-bit in the first place)
* draw/erase the overlay (are there paintbrush tools available to work on an overlay?)
* convert the final overlay to a binary image.

Pointers to the documentation, or example code that does something even vaguely similar, would be
most appreciated.

--
Kenneth Sloan
[hidden email]

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: painting an overlay

Kenneth Sloan-2
RTFM lead me to the conclusion that this is not a “stock operation” in ImageJ.  Unless I’m missing something, a current Overlay can only consist of stroke graphics elements.  I need a RasterOverlay.
It doesn’t look all that hard for me to implement, but it will mean implementing “yet another paintbrush tool”.
Before I start - has anyone done this?  Is anyone working on it?

And, of course, is this a reasonable feature to request in future versions?

I’m taking “No Answer” to the previous query as an indication that this isn’t “stock ImageJ”.

Again, I think the core operations are:

a) convert binary image to “RasterOverlay” and back again
b) use standard paintbrush tools to paint on the overlay

I’d also like to specify the opacity of the overlay - that may already exist for the current overlay
feature, but I haven’t found it yet, and I’ve stopped looking because it looks like I’ll be
writing my own version.

Before I start - anyone with a “wish list” of features?  At first glance I’ll want draw/erase, set color, set opacity, perhaps turn “overlay” on/off, and convert “overlay” to/from 8-bit Binary image.  Anything else? Are there standard conventions on what to do if, say, the input Binary image has a size that is different from the gray-scale image being overlaid?  Could this be done with a heterogeneous Stack (containing two images, gray-scale and binary, with some wort of blending rule)?

All clues gratefully rented.  I’ll probably start on this…Wednesday, 7 May.

In case anyone cares, what I’m doing is building a tool to allow a trained observer to edit a binary mask.  The binary mask produced by automatic means is very good - but not *quite* good enough.  So, there will be a single plugin to
produce the initial mask and then allow the observer to edit it.  Final output is simply the edited mask, written as a .png file.  Programs further down the pipeline (probably *not* ImageJ programs) will start from the original image and the binary mask and do …whatever…

The point is that it is useful to see the gray values under the mask, especially when making decisions about ERASING parts of the mask.  Right now, we’re doing this “side-by-side”, which works fairly well, just not as nicely as I’d like.

…on the road to ARVO…if any ImageJ hackers will be there…let’s do lunch.

--
Kenneth Sloan
[hidden email]


On Apr 29, 2014, at 18:15 , Kenneth Sloan <[hidden email]> wrote:

> I am looking for help on a feature that I think exists, but I have never used.
> The answer is probably RTFM, but I would appreciate a few hints.
>
> Here’s what I want to do:
>
> a) I have a plugin that accepts any type of image, makes a copy, converts to 8-bit
>   and then uses auto local thresholding to create a binary mask
> b) I would like to give a trained observer the option to PAINT in the thresholded image
>   to correct errors made by the auto local threshold
> c) That works now - except that the user has little guidance correlating the gray-scale
>   image with the binary mask
> d) So…I would like to OVERLAY the binary mask on the grayscale image and allow the observer
>   to paint the OVERLAY
> e) and then…at the end…I need to convert the overlay to an independent binary mask image.
>
> The parts I don’t know how to do are:
>
> * convert binary mask to an overlay on the original gray-scale image
>  (it’s ok, of course, to do this on a COPY of the original, since the original
>   may not be 8-bit in the first place)
> * draw/erase the overlay (are there paintbrush tools available to work on an overlay?)
> * convert the final overlay to a binary image.
>
> Pointers to the documentation, or example code that does something even vaguely similar, would be
> most appreciated.
>
> --
> Kenneth Sloan
> [hidden email]
>
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: painting an overlay

Rasband, Wayne (NIH/NIMH) [E]
On May 2, 2014, at 12:53 PM, Kenneth Sloan wrote:

> RTFM lead me to the conclusion that this is not a “stock operation” in ImageJ.  Unless I’m missing something, a current Overlay can only consist of stroke graphics elements.  I need a RasterOverlay.
> It doesn’t look all that hard for me to implement, but it will mean implementing “yet another paintbrush tool”.
> Before I start - has anyone done this?  Is anyone working on it?

Using an ImageRoi in an overlay would be a good starting point. An ImageRoi can be any image, including binary images, and the opacity can be set. It would probably not be hard to get the existing drawing tools to work with an ImageRoi in an overlay.

There are several existing commands that you can use to experiment with ImageRois. The Edit>Selection>Image to Selection command converts an image into an ImageRoi. The Image>Overlay>Add Image command converts an image to an ImageRoi and adds it to an overlay. You can change the opacity of an ImageRoi using the Edit>Selection>Properties dialog. There is an example plugin at

   http://imagej.nih.gov/ij/plugins/image-overlay/index.html

that creates an ImageRoi from an image, adds it to an overlay and rotates it 360 degrees. The source code for the ImageRoi class is at

   http://imagej.nih.gov/ij/developer/source/ij/gui/ImageRoi.java.html

-wayne

> And, of course, is this a reasonable feature to request in future versions?
>
> I’m taking “No Answer” to the previous query as an indication that this isn’t “stock ImageJ”.
>
> Again, I think the core operations are:
>
> a) convert binary image to “RasterOverlay” and back again
> b) use standard paintbrush tools to paint on the overlay
>
> I’d also like to specify the opacity of the overlay - that may already exist for the current overlay
> feature, but I haven’t found it yet, and I’ve stopped looking because it looks like I’ll be
> writing my own version.
>
> Before I start - anyone with a “wish list” of features?  At first glance I’ll want draw/erase, set color, set opacity, perhaps turn “overlay” on/off, and convert “overlay” to/from 8-bit Binary image.  Anything else? Are there standard conventions on what to do if, say, the input Binary image has a size that is different from the gray-scale image being overlaid?  Could this be done with a heterogeneous Stack (containing two images, gray-scale and binary, with some wort of blending rule)?
>
> All clues gratefully rented.  I’ll probably start on this…Wednesday, 7 May.
>
> In case anyone cares, what I’m doing is building a tool to allow a trained observer to edit a binary mask.  The binary mask produced by automatic means is very good - but not *quite* good enough.  So, there will be a single plugin to
> produce the initial mask and then allow the observer to edit it.  Final output is simply the edited mask, written as a .png file.  Programs further down the pipeline (probably *not* ImageJ programs) will start from the original image and the binary mask and do …whatever…
>
> The point is that it is useful to see the gray values under the mask, especially when making decisions about ERASING parts of the mask.  Right now, we’re doing this “side-by-side”, which works fairly well, just not as nicely as I’d like.
>
> …on the road to ARVO…if any ImageJ hackers will be there…let’s do lunch.
>
> --
> Kenneth Sloan
> [hidden email]
>
>
> On Apr 29, 2014, at 18:15 , Kenneth Sloan <[hidden email]> wrote:
>
>> I am looking for help on a feature that I think exists, but I have never used.
>> The answer is probably RTFM, but I would appreciate a few hints.
>>
>> Here’s what I want to do:
>>
>> a) I have a plugin that accepts any type of image, makes a copy, converts to 8-bit
>>  and then uses auto local thresholding to create a binary mask
>> b) I would like to give a trained observer the option to PAINT in the thresholded image
>>  to correct errors made by the auto local threshold
>> c) That works now - except that the user has little guidance correlating the gray-scale
>>  image with the binary mask
>> d) So…I would like to OVERLAY the binary mask on the grayscale image and allow the observer
>>  to paint the OVERLAY
>> e) and then…at the end…I need to convert the overlay to an independent binary mask image.
>>
>> The parts I don’t know how to do are:
>>
>> * convert binary mask to an overlay on the original gray-scale image
>> (it’s ok, of course, to do this on a COPY of the original, since the original
>>  may not be 8-bit in the first place)
>> * draw/erase the overlay (are there paintbrush tools available to work on an overlay?)
>> * convert the final overlay to a binary image.
>>
>> Pointers to the documentation, or example code that does something even vaguely similar, would be
>> most appreciated.
>>
>> --
>> Kenneth Sloan
>> [hidden email]
>>
>>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: painting an overlay

Kenneth Sloan-2
Thanks, Wayne - those look like useful pointers.

I suspect I’ll still have to do the painting myself (about the 100th paint program I’ve written, one more won’t hurt) - but I’ll try to do things in a way that *could* leverage the standard paint tools, if someone closer to the core development ever extends them.

How about ImageROI -> image?  I need to export the binary mask in something like .png.

--
Kenneth Sloan
[hidden email]


On May 2, 2014, at 22:47 , Rasband, Wayne (NIH/NIMH) [E] <[hidden email]> wrote:

> On May 2, 2014, at 12:53 PM, Kenneth Sloan wrote:
>
>> RTFM lead me to the conclusion that this is not a “stock operation” in ImageJ.  Unless I’m missing something, a current Overlay can only consist of stroke graphics elements.  I need a RasterOverlay.
>> It doesn’t look all that hard for me to implement, but it will mean implementing “yet another paintbrush tool”.
>> Before I start - has anyone done this?  Is anyone working on it?
>
> Using an ImageRoi in an overlay would be a good starting point. An ImageRoi can be any image, including binary images, and the opacity can be set. It would probably not be hard to get the existing drawing tools to work with an ImageRoi in an overlay.
>
> There are several existing commands that you can use to experiment with ImageRois. The Edit>Selection>Image to Selection command converts an image into an ImageRoi. The Image>Overlay>Add Image command converts an image to an ImageRoi and adds it to an overlay. You can change the opacity of an ImageRoi using the Edit>Selection>Properties dialog. There is an example plugin at
>
>   http://imagej.nih.gov/ij/plugins/image-overlay/index.html
>
> that creates an ImageRoi from an image, adds it to an overlay and rotates it 360 degrees. The source code for the ImageRoi class is at
>
>   http://imagej.nih.gov/ij/developer/source/ij/gui/ImageRoi.java.html
>
> -wayne
>
>> And, of course, is this a reasonable feature to request in future versions?
>>
>> I’m taking “No Answer” to the previous query as an indication that this isn’t “stock ImageJ”.
>>
>> Again, I think the core operations are:
>>
>> a) convert binary image to “RasterOverlay” and back again
>> b) use standard paintbrush tools to paint on the overlay
>>
>> I’d also like to specify the opacity of the overlay - that may already exist for the current overlay
>> feature, but I haven’t found it yet, and I’ve stopped looking because it looks like I’ll be
>> writing my own version.
>>
>> Before I start - anyone with a “wish list” of features?  At first glance I’ll want draw/erase, set color, set opacity, perhaps turn “overlay” on/off, and convert “overlay” to/from 8-bit Binary image.  Anything else? Are there standard conventions on what to do if, say, the input Binary image has a size that is different from the gray-scale image being overlaid?  Could this be done with a heterogeneous Stack (containing two images, gray-scale and binary, with some wort of blending rule)?
>>
>> All clues gratefully rented.  I’ll probably start on this…Wednesday, 7 May.
>>
>> In case anyone cares, what I’m doing is building a tool to allow a trained observer to edit a binary mask.  The binary mask produced by automatic means is very good - but not *quite* good enough.  So, there will be a single plugin to
>> produce the initial mask and then allow the observer to edit it.  Final output is simply the edited mask, written as a .png file.  Programs further down the pipeline (probably *not* ImageJ programs) will start from the original image and the binary mask and do …whatever…
>>
>> The point is that it is useful to see the gray values under the mask, especially when making decisions about ERASING parts of the mask.  Right now, we’re doing this “side-by-side”, which works fairly well, just not as nicely as I’d like.
>>
>> …on the road to ARVO…if any ImageJ hackers will be there…let’s do lunch.
>>
>> --
>> Kenneth Sloan
>> [hidden email]
>>
>>
>> On Apr 29, 2014, at 18:15 , Kenneth Sloan <[hidden email]> wrote:
>>
>>> I am looking for help on a feature that I think exists, but I have never used.
>>> The answer is probably RTFM, but I would appreciate a few hints.
>>>
>>> Here’s what I want to do:
>>>
>>> a) I have a plugin that accepts any type of image, makes a copy, converts to 8-bit
>>> and then uses auto local thresholding to create a binary mask
>>> b) I would like to give a trained observer the option to PAINT in the thresholded image
>>> to correct errors made by the auto local threshold
>>> c) That works now - except that the user has little guidance correlating the gray-scale
>>> image with the binary mask
>>> d) So…I would like to OVERLAY the binary mask on the grayscale image and allow the observer
>>> to paint the OVERLAY
>>> e) and then…at the end…I need to convert the overlay to an independent binary mask image.
>>>
>>> The parts I don’t know how to do are:
>>>
>>> * convert binary mask to an overlay on the original gray-scale image
>>> (it’s ok, of course, to do this on a COPY of the original, since the original
>>> may not be 8-bit in the first place)
>>> * draw/erase the overlay (are there paintbrush tools available to work on an overlay?)
>>> * convert the final overlay to a binary image.
>>>
>>> Pointers to the documentation, or example code that does something even vaguely similar, would be
>>> most appreciated.
>>>
>>> --
>>> Kenneth Sloan
>>> [hidden email]
>>>
>>>
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: painting an overlay

Rasband, Wayne (NIH/NIMH) [E]
On May 2, 2014, at 10:54 PM, Kenneth Sloan wrote:

> Thanks, Wayne - those look like useful pointers.
>
> I suspect I’ll still have to do the painting myself (about the 100th paint program I’ve written, one more won’t hurt) - but I’ll try to do things in a way that *could* leverage the standard paint tools, if someone closer to the core development ever extends them.

The built in brush tool in the latest ImageJ daily build (1.49a12) has a "Paint on overlay" option. Install this tool by selecting "Brush" from the toolbar's ">>" menu. Open the options dialog by double clicking on the tool icon. Hold down the alt key to erase. Source code for the brush tool is at:

  http://imagej.nih.gov/ij/developer/source/ij/plugin/tool/BrushTool.java.html

Source code for the ImageRoi class that the brush tool paints on in the overlay is at:

  http://imagej.nih.gov/ij/developer/source/ij/gui/ImageRoi.java.html

> How about ImageROI -> image?  I need to export the binary mask in something like .png.

Here is a JavaScript example that displays the ImageRoi used by the brush tool:

 imp = IJ.getImage();
 overlay = imp.getOverlay();
 imageRoi = overlay.get(0);
 image = imageRoi.getProcessor();
 new ImagePlus("overlay", image.duplicate()).show();

-wayne

> On May 2, 2014, at 22:47 , Rasband, Wayne (NIH/NIMH) [E] <[hidden email]> wrote:
>
>> On May 2, 2014, at 12:53 PM, Kenneth Sloan wrote:
>>
>>> RTFM lead me to the conclusion that this is not a “stock operation” in ImageJ.  Unless I’m missing something, a current Overlay can only consist of stroke graphics elements.  I need a RasterOverlay.
>>> It doesn’t look all that hard for me to implement, but it will mean implementing “yet another paintbrush tool”.
>>> Before I start - has anyone done this?  Is anyone working on it?
>>
>> Using an ImageRoi in an overlay would be a good starting point. An ImageRoi can be any image, including binary images, and the opacity can be set. It would probably not be hard to get the existing drawing tools to work with an ImageRoi in an overlay.
>>
>> There are several existing commands that you can use to experiment with ImageRois. The Edit>Selection>Image to Selection command converts an image into an ImageRoi. The Image>Overlay>Add Image command converts an image to an ImageRoi and adds it to an overlay. You can change the opacity of an ImageRoi using the Edit>Selection>Properties dialog. There is an example plugin at
>>
>> http://imagej.nih.gov/ij/plugins/image-overlay/index.html
>>
>> that creates an ImageRoi from an image, adds it to an overlay and rotates it 360 degrees. The source code for the ImageRoi class is at
>>
>> http://imagej.nih.gov/ij/developer/source/ij/gui/ImageRoi.java.html
>>
>> -wayne
>>
>>> And, of course, is this a reasonable feature to request in future versions?
>>>
>>> I’m taking “No Answer” to the previous query as an indication that this isn’t “stock ImageJ”.
>>>
>>> Again, I think the core operations are:
>>>
>>> a) convert binary image to “RasterOverlay” and back again
>>> b) use standard paintbrush tools to paint on the overlay
>>>
>>> I’d also like to specify the opacity of the overlay - that may already exist for the current overlay
>>> feature, but I haven’t found it yet, and I’ve stopped looking because it looks like I’ll be
>>> writing my own version.
>>>
>>> Before I start - anyone with a “wish list” of features?  At first glance I’ll want draw/erase, set color, set opacity, perhaps turn “overlay” on/off, and convert “overlay” to/from 8-bit Binary image.  Anything else? Are there standard conventions on what to do if, say, the input Binary image has a size that is different from the gray-scale image being overlaid?  Could this be done with a heterogeneous Stack (containing two images, gray-scale and binary, with some wort of blending rule)?
>>>
>>> All clues gratefully rented.  I’ll probably start on this…Wednesday, 7 May.
>>>
>>> In case anyone cares, what I’m doing is building a tool to allow a trained observer to edit a binary mask.  The binary mask produced by automatic means is very good - but not *quite* good enough.  So, there will be a single plugin to
>>> produce the initial mask and then allow the observer to edit it.  Final output is simply the edited mask, written as a .png file.  Programs further down the pipeline (probably *not* ImageJ programs) will start from the original image and the binary mask and do …whatever…
>>>
>>> The point is that it is useful to see the gray values under the mask, especially when making decisions about ERASING parts of the mask.  Right now, we’re doing this “side-by-side”, which works fairly well, just not as nicely as I’d like.
>>>
>>> …on the road to ARVO…if any ImageJ hackers will be there…let’s do lunch.
>>>
>>> --
>>> Kenneth Sloan
>>> [hidden email]
>>>
>>>
>>> On Apr 29, 2014, at 18:15 , Kenneth Sloan <[hidden email]> wrote:
>>>
>>>> I am looking for help on a feature that I think exists, but I have never used.
>>>> The answer is probably RTFM, but I would appreciate a few hints.
>>>>
>>>> Here’s what I want to do:
>>>>
>>>> a) I have a plugin that accepts any type of image, makes a copy, converts to 8-bit
>>>> and then uses auto local thresholding to create a binary mask
>>>> b) I would like to give a trained observer the option to PAINT in the thresholded image
>>>> to correct errors made by the auto local threshold
>>>> c) That works now - except that the user has little guidance correlating the gray-scale
>>>> image with the binary mask
>>>> d) So…I would like to OVERLAY the binary mask on the grayscale image and allow the observer
>>>> to paint the OVERLAY
>>>> e) and then…at the end…I need to convert the overlay to an independent binary mask image.
>>>>
>>>> The parts I don’t know how to do are:
>>>>
>>>> * convert binary mask to an overlay on the original gray-scale image
>>>> (it’s ok, of course, to do this on a COPY of the original, since the original
>>>> may not be 8-bit in the first place)
>>>> * draw/erase the overlay (are there paintbrush tools available to work on an overlay?)
>>>> * convert the final overlay to a binary image.
>>>>
>>>> Pointers to the documentation, or example code that does something even vaguely similar, would be
>>>> most appreciated.
>>>>
>>>> --
>>>> Kenneth Sloan
>>>> [hidden email]
>>>>
>>>>
>>>
>>> --
>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: painting an overlay

Kenneth Sloan
Excellent!  Thank you, very much!

You have made my day.

--
Kenneth Sloan
[hidden email]



On May 4, 2014, at 18:53 , Rasband, Wayne (NIH/NIMH) [E] <[hidden email]> wrote:

> On May 2, 2014, at 10:54 PM, Kenneth Sloan wrote:
>
>> Thanks, Wayne - those look like useful pointers.
>>
>> I suspect I’ll still have to do the painting myself (about the 100th paint program I’ve written, one more won’t hurt) - but I’ll try to do things in a way that *could* leverage the standard paint tools, if someone closer to the core development ever extends them.
>
> The built in brush tool in the latest ImageJ daily build (1.49a12) has a "Paint on overlay" option. Install this tool by selecting "Brush" from the toolbar's ">>" menu. Open the options dialog by double clicking on the tool icon. Hold down the alt key to erase. Source code for the brush tool is at:
>
>  http://imagej.nih.gov/ij/developer/source/ij/plugin/tool/BrushTool.java.html
>
> Source code for the ImageRoi class that the brush tool paints on in the overlay is at:
>
>  http://imagej.nih.gov/ij/developer/source/ij/gui/ImageRoi.java.html
>
>> How about ImageROI -> image?  I need to export the binary mask in something like .png.
>
> Here is a JavaScript example that displays the ImageRoi used by the brush tool:
>
> imp = IJ.getImage();
> overlay = imp.getOverlay();
> imageRoi = overlay.get(0);
> image = imageRoi.getProcessor();
> new ImagePlus("overlay", image.duplicate()).show();
>
> -wayne
>
>> On May 2, 2014, at 22:47 , Rasband, Wayne (NIH/NIMH) [E] <[hidden email]> wrote:
>>
>>> On May 2, 2014, at 12:53 PM, Kenneth Sloan wrote:
>>>
>>>> RTFM lead me to the conclusion that this is not a “stock operation” in ImageJ.  Unless I’m missing something, a current Overlay can only consist of stroke graphics elements.  I need a RasterOverlay.
>>>> It doesn’t look all that hard for me to implement, but it will mean implementing “yet another paintbrush tool”.
>>>> Before I start - has anyone done this?  Is anyone working on it?
>>>
>>> Using an ImageRoi in an overlay would be a good starting point. An ImageRoi can be any image, including binary images, and the opacity can be set. It would probably not be hard to get the existing drawing tools to work with an ImageRoi in an overlay.
>>>
>>> There are several existing commands that you can use to experiment with ImageRois. The Edit>Selection>Image to Selection command converts an image into an ImageRoi. The Image>Overlay>Add Image command converts an image to an ImageRoi and adds it to an overlay. You can change the opacity of an ImageRoi using the Edit>Selection>Properties dialog. There is an example plugin at
>>>
>>> http://imagej.nih.gov/ij/plugins/image-overlay/index.html
>>>
>>> that creates an ImageRoi from an image, adds it to an overlay and rotates it 360 degrees. The source code for the ImageRoi class is at
>>>
>>> http://imagej.nih.gov/ij/developer/source/ij/gui/ImageRoi.java.html
>>>
>>> -wayne
>>>
>>>> And, of course, is this a reasonable feature to request in future versions?
>>>>
>>>> I’m taking “No Answer” to the previous query as an indication that this isn’t “stock ImageJ”.
>>>>
>>>> Again, I think the core operations are:
>>>>
>>>> a) convert binary image to “RasterOverlay” and back again
>>>> b) use standard paintbrush tools to paint on the overlay
>>>>
>>>> I’d also like to specify the opacity of the overlay - that may already exist for the current overlay
>>>> feature, but I haven’t found it yet, and I’ve stopped looking because it looks like I’ll be
>>>> writing my own version.
>>>>
>>>> Before I start - anyone with a “wish list” of features?  At first glance I’ll want draw/erase, set color, set opacity, perhaps turn “overlay” on/off, and convert “overlay” to/from 8-bit Binary image.  Anything else? Are there standard conventions on what to do if, say, the input Binary image has a size that is different from the gray-scale image being overlaid?  Could this be done with a heterogeneous Stack (containing two images, gray-scale and binary, with some wort of blending rule)?
>>>>
>>>> All clues gratefully rented.  I’ll probably start on this…Wednesday, 7 May.
>>>>
>>>> In case anyone cares, what I’m doing is building a tool to allow a trained observer to edit a binary mask.  The binary mask produced by automatic means is very good - but not *quite* good enough.  So, there will be a single plugin to
>>>> produce the initial mask and then allow the observer to edit it.  Final output is simply the edited mask, written as a .png file.  Programs further down the pipeline (probably *not* ImageJ programs) will start from the original image and the binary mask and do …whatever…
>>>>
>>>> The point is that it is useful to see the gray values under the mask, especially when making decisions about ERASING parts of the mask.  Right now, we’re doing this “side-by-side”, which works fairly well, just not as nicely as I’d like.
>>>>
>>>> …on the road to ARVO…if any ImageJ hackers will be there…let’s do lunch.
>>>>
>>>> --
>>>> Kenneth Sloan
>>>> [hidden email]
>>>>
>>>>
>>>> On Apr 29, 2014, at 18:15 , Kenneth Sloan <[hidden email]> wrote:
>>>>
>>>>> I am looking for help on a feature that I think exists, but I have never used.
>>>>> The answer is probably RTFM, but I would appreciate a few hints.
>>>>>
>>>>> Here’s what I want to do:
>>>>>
>>>>> a) I have a plugin that accepts any type of image, makes a copy, converts to 8-bit
>>>>> and then uses auto local thresholding to create a binary mask
>>>>> b) I would like to give a trained observer the option to PAINT in the thresholded image
>>>>> to correct errors made by the auto local threshold
>>>>> c) That works now - except that the user has little guidance correlating the gray-scale
>>>>> image with the binary mask
>>>>> d) So…I would like to OVERLAY the binary mask on the grayscale image and allow the observer
>>>>> to paint the OVERLAY
>>>>> e) and then…at the end…I need to convert the overlay to an independent binary mask image.
>>>>>
>>>>> The parts I don’t know how to do are:
>>>>>
>>>>> * convert binary mask to an overlay on the original gray-scale image
>>>>> (it’s ok, of course, to do this on a COPY of the original, since the original
>>>>> may not be 8-bit in the first place)
>>>>> * draw/erase the overlay (are there paintbrush tools available to work on an overlay?)
>>>>> * convert the final overlay to a binary image.
>>>>>
>>>>> Pointers to the documentation, or example code that does something even vaguely similar, would be
>>>>> most appreciated.
>>>>>
>>>>> --
>>>>> Kenneth Sloan
>>>>> [hidden email]
>>>>>
>>>>>
>>>>
>>>> --
>>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>>
>>> --
>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: painting an overlay

johny66
In reply to this post by Kenneth Sloan-2
Thanks for your great recommendations on painting!! I am really impressed with your thoughts and information on painting is also very valuable.

Aboriginal Art