Login  Register

Re: Possible bug

Posted by Wayne Rasband on Feb 16, 2009; 3:57pm
URL: http://imagej.273.s1.nabble.com/Possible-bug-tp3693696p3693698.html

On Feb 15, 2009, at 10:39 PM, Cihat Eldeniz wrote:

> Dear all,
>
> I believe there is a bug in the two functions of ImageProcessor:  
> erode() and dilate().
>
> When I went through a stack of images [that had already been  
> converted to binary],
>
> ImageProcessor ip2 = imp2.getStack().getProcessor(counter);
> ip.dilate();
> ip.dilate();
> ..
>
> I realized that dilate() erodes and erode() dilates. Is there  
> really a bug?

These methods appear to assume that the background is white. The  
Process>Binary>Erode and Process>Binary>Dilate commands assume black  
background if "Black Background" is checked in the  
Process>Binary>Options dialog box.

-wayne