Login  Register

Re: Flood Fill

Posted by meastwood98 on Feb 14, 2008; 7:38pm
URL: http://imagej.273.s1.nabble.com/Flood-Fill-tp3697186p3697188.html

Ok, how do i use the FloodFill() class within a imageJ plugin? Im not very experieced and im not sure what you mean? could you give me an example?

thanks
mark

Wayne Rasband wrote
> Im writing a plug-in for imageJ using Java, Im wanting to simply flood
> fill a circle with a certain color, i tried using the
> IJ.setForegroundColor();
> and then IJ.floodFill(); commands but the second one came up with
> an error. Can anyone tell me how to do this, i think this should be
> easier than it is proving to be!

The IJ class does not have a floodFill() method. The easy way to do
this would be to write a macro. In a plugin, you can use the
FloodFiller class. For an example, download the ImageJ source and look
at the floodFill() method in ij/macro/Functions.java.

-wayne