Re: Roi color selection

Posted by Michael Schmid on
URL: http://imagej.273.s1.nabble.com/Roi-color-selection-tp3691957p3691958.html

Hi Ashish,

the API documentation is at
   http://rsb.info.nih.gov/ij/developer/api/index.html

In the ImageProcessor class, you will find, e.g.,
   setColor(java.awt.Color color)
     Sets the default fill/draw value to the pixel value closest to  
the specified color.

If the API documentation is insufficient, it always pays off to have  
a look at the sources of the current ImageJ version at http://
rsb.info.nih.gov/ij/source/ij/


Michael
________________________________________________________________

On 1 Jul 2009, at 07:53, ashish ram wrote:

> Hello everyone!!!!
>
> I am a new user of ImageJ and I want to know how the roi cal be  
> filled with
> a color.
> the part of the code i am using for selection is like the following,
> *
>   ip.setRoi(new OvalRoi(50, 50, 30, 30));
>                 ip.fill();
>                  ip.reset(ip.getMask());
>     im.updateAndDraw();
>     IJ.wait(1000);
>     ip.reset();
> im.updateAndDraw(); // redisplay modified imageI
>     IJ.wait(1000)
> *
>
> But everytime the rio is filled by a black colour but i want to  
> fill it with
> different colour (say White).
> Please let me know how can it be done in a proper way.
>
> Thank you,
> Ashish