Posted by
chintalapati Padmavathi on
Feb 19, 2011; 9:22am
URL: http://imagej.273.s1.nabble.com/Re-Fwd-Erode-Dilate-tp3685617.html
Hello!
Thank you very much for your response in solving my problem of damage area
measurement. Special thanks to Peter Haub for a macro code and giving the
procedure step wise. I followed that procedure and got good result. I also
would like to thank Lim Soon Yew who took interest and pasted the processed
leaves. But somehow I am not able to download the "Color
deconvolution" plugin from the  site. 
http://www.dentistry.bham.ac.uk/landinig/software/cdeconv/cdeconv.htmlThank you for all those who took interest in solving my problem of damage area
measurement.
Ch. Padmavathi
On Fri, 18 Feb 2011 21:22:46 +0530 Peter Haub <
[hidden email]> wrote
>Late answer .. maybe it still helps.
>
>Here is an easy version of a DILATE function with a configurable 3x3
>structuring element (hot spot in center).
>(It is a modified version of a sample code which is available in origin
>as part of the book "Digital Image Processing - An Algorithmic
>Introduction using Java by Wilhelm Burger and Mark J. Burge)
>
>To use the filter copy the files Dilate_SE.java and Dilate_SE.class into
>the \plugins folder.
>
>The Dilate_SE filter can be used from the PlugIns menu.
>The structuring element can be changed in the java code. After changing
>the element the plugin has to be recompiled with the "Plugins/Compile
>and Run .." function.
>
>The Dilate_SE filter can also be used inside a macro with the macro code:
>run("Dilate SE", "000110000");
>In the macro function the 3x3 structuring element will be passed as a
>string with exactly 9 elements (0 or 1).
>
>The logic of the structuring element string is
>A B C
>D E F = ABCDEFGHI
>G H I
>
>A horizontal dilation can be defined as
>0 0 0
>1 1 0 = 000110000
>0 0 0
>
>A vertical dilation can be defined as
>0 1 0
>0 1 0 = 010010000
>0 0 0
>
>A diagonal dilation can be defined as
>1 0 0
>0 1 0 = 100010000
>0 0 0
>
>
>The ERODE function can be derived from the DILATE function by inverting
>the image before and after dilation.
>In the macro code you can use, for example:
>run("Invert");
>run("Dilate SE", "000110000");
>run("Invert");
>
>best regards,
>peter
>
>
>Am 17.02.2011 18:56, schrieb Alfred Wagner:
>> Hello ImageJ Users,
>>
>> Is there any way to dilate or erode a binary image in one axis/direction
>> only, rather than symmetrically around the objects?
>> The binary images I'm using are primarily shapes with 90 or 180 degree
>> corners, i.e. not many rounded shapes.
>>
>> I've considered shifting duplicate images along one axis and ORing with
>> the original image, but the run time starts to get very long when
>> processing large numbers of images.
>>
>> Any suggestions would be much appreciated.
>>
>> Thanks.
>>
>> Al Wagner
>> IBM Watson Research Center
>>
>
>