Re: Using Brush Tool in Java

Posted by Michael Schmid on
URL: http://imagej.273.s1.nabble.com/Using-Brush-Tool-in-Java-tp5002648p5002674.html

Hi Michael,

did you try the 'threshold color' command? You can select a color range with it.
When doing it manually, adjust the sliders until you have selected only the color you like, then press 'select' to convert it into a region of interest. With 'Area' checked in the measurement options, 'Measure' will give you the area.
You can also create a macro creating a mask image (Macro button), then use
  run("Create Selection");
Beware: the macro destroys the original image, so work on a copy.
You can run everything in the macro starting from 'min[0]=0;' in a loop to get it done for each of your colors.

Michael
________________________________________________________________
On Apr 15, 2013, at 18:21, jck wrote:

> Hello,
>
> i know it is only RGB.
> But the colors are display togehter, so in i can see other colors, like Yellow, Purple, (Black).
>
> The Color_Deconvolution Plugin can already do this, it does split by every 3 colors i want.
>
> My problem is:
> I have a picture (scan) with circles in different colors (up to 10 colors). I want to know the area of every color, so for example all red circles include an area of 10mm^2.
> But i have to split the image to only measure one color.
>
>
> Michael.
>
>
>
> On 04/15/2013 at 5:40 PM, "Herbie-2 [via ImageJ]" <[hidden email]> wrote:
>>
>> Good day Michael,
>>
>> regarding colors, I assume that you deal with RGB images that are
>> composed of (only) three 8bit images: a red, a green, and a blue.
>>
>> Another story are stacks composed of more than these three
>> color-specific images...
>>
>> HTH
>>
>> Herbie
>> ____________________________
>> On 15.04.13 16:40, jck wrote:
>>> Hi,
>>>
>>> i want to use the Brush tool of ImageJ in my own Java programm.
>>> It is no problem to set the tool, but i cannot use it.
>>> When a image is open i can draw on it, but all i get is an
>> yellow frame,
>>> where the color should be.
>>>
>>> I already tried to set up the color with:
>>> Toolbar.setBackgroundColor() und Toolbar.setForegroundColor()
>>>
>>> Maybe someone can help, or show me a tutorial how to do it, i
>> could not find
>>> one.
>>>
>>> This is how i call the Toolbar/Tool:
>>>
>>>
>>> Another question:
>>> Is there a plugin that splits an Image by Colors? (About 10
>> Colors, i only
>>> found the Color_Deconvolution, but it only can split 3 different
>> colors).
>>>
>>>
>>> Thanks in advance.
>>> Michael.
>>>
>>>
>>>
>>> --
>>> View this message in context:
>> http://imagej.1557.x6.nabble.com/Using-Brush-Tool-in-Java-
>> tp5002648.html
>>> Sent from the ImageJ mailing list archive at Nabble.com.
>>>
>>> --
>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>>
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>>
>>
>>
>> _______________________________________________
>> If you reply to this email, your message will be added to the
>> discussion below:
>> http://imagej.1557.x6.nabble.com/Using-Brush-Tool-in-Java-
>> tp5002648p5002650.html
>>
>> To unsubscribe from Using Brush Tool in Java, visit
>> http://imagej.1557.x6.nabble.com/template/NamlServlet.jtp?macro=uns
>> ubscribe_by_code&node=5002648&code=bWVuemVsQGh1c2guY29tfDUwMDI2NDh8
>> MzU4NDEwMDM0
>
>
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Using-Brush-Tool-in-Java-tp5002648p5002652.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

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