<div>Hi,</div> <div> </div> <div>Dan was right, <FONT face="Courier New">setting ErodeValue to 255 solves the problem.</FONT></div> <div><FONT face="Courier New"></FONT> </div> <div><FONT face="Courier New">Thanks,</FONT></div> <div><FONT face="Courier New">Dan</FONT></div> <div><BR><BR><B><I>Dan Mueller <d.mueller@qut.edu.au></I></B> wrote:</div> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Date: Fri, 14 Jul 2006 07:35:58 +1000<BR>From: Dan Mueller <d.mueller@qut.edu.au><BR>To: Dan Rico <dan_rico_to@yahoo.com><BR>Subject: Re: [Insight-users] 3D BinaryErodeImageFilter<BR><BR><FONT face="Helvetica, Arial, sans-serif"><SMALL>Hi Dan,<BR><BR>I think your problem is with your input and the following line:<BR><FONT face="Courier New, Courier, monospace">binaryErode->SetErodeValue(1);</FONT><BR><BR>The documentation states that <FONT face="Courier New, Courier,
monospace">SetErodeValue</FONT> "sets the value in the image to consider as 'foreground'. Defaults to maximum value of PixelType".<BR><BR>What input data are you passing in? If your binary image is <FONT face="Courier New, Courier, monospace">background=0=black</FONT> and <FONT face="Courier New, Courier, monospace">foreground=255=white</FONT> then setting the <FONT face="Courier New, Courier, monospace">ErodeValue=1</FONT> will not work (you would need to set <FONT face="Courier New, Courier, monospace">ErodeValue=255</FONT>, which is the default anyway). If your input image is <FONT face="Courier New, Courier, monospace">background=0</FONT> and <FONT face="Courier New, Courier, monospace">foreground=1</FONT> then it will work with <FONT face="Courier New, Courier, monospace">ErodeValue=1</FONT>.<BR><BR>Hope this helps.<BR><BR>Cheers<BR><BR>Dan Mueller</SMALL><BR><BR><BR>Dan Rico wrote:</FONT> <BLOCKQUOTE cite=mid20060713172108.17095.qmail@web31802.mail.mud.yahoo.com
type="cite"> <DIV><FONT face="Helvetica, Arial, sans-serif"><SPAN style="COLOR: black"><FONT size=3>Hi,<?xml:namespace prefix = o /><o:p></o:p></FONT></SPAN></FONT></DIV> <DIV class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><FONT face="Helvetica, Arial, sans-serif"><SPAN style="COLOR: black"><FONT size=3> <o:p></o:p></FONT></SPAN></FONT></DIV> <DIV class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><FONT face="Helvetica, Arial, sans-serif"><SPAN style="COLOR: black"><FONT size=3>still waiting for an answer related to the "BinaryErodeImage" filter that applied to a 3D binary image produces an output identical to the input.<o:p></o:p></FONT></SPAN></FONT></DIV> <DIV class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><FONT face="Helvetica, Arial, sans-serif"><SPAN style="COLOR: black"><FONT size=3>Is there a way to overcome this problem?<o:p></o:p></FONT></SPAN></FONT></DIV> <DIV class=MsoNormal style="MARGIN: 0in 0in
0pt"><FONT face="Helvetica, Arial, sans-serif"><o:p><FONT size=3> </FONT></o:p></FONT></DIV> <DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Helvetica, Arial, sans-serif" size=3>Thanks,</FONT></DIV> <DIV class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Helvetica, Arial, sans-serif" size=3>Dan</FONT></DIV> <DIV> <DIV><FONT face="Helvetica, Arial, sans-serif"><BR> </FONT></DIV></DIV> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid"><FONT face="Helvetica, Arial, sans-serif">Date: Wed, 12 Jul 2006 09:21:01 -0700 (PDT)<BR>From: Dan Rico <A class=moz-txt-link-rfc2396E href="mailto:dan_rico_to@yahoo.com"><dan_rico_to@yahoo.com></A><BR>Subject: BinaryErodeImageFilter<BR>To: <A class=moz-txt-link-abbreviated href="mailto:insight-users@itk.org">insight-users@itk.org</A><BR><BR></FONT> <DIV><FONT face="Helvetica, Arial, sans-serif">Hi,</FONT></DIV> <DIV><FONT face="Helvetica, Arial,
sans-serif"></FONT> </DIV> <DIV><FONT face="Helvetica, Arial, sans-serif">while testing the output of the "itkBinaryErodeImageFilter" on a 3D binary images I found out that the output is identical to the input.</FONT></DIV> <DIV><FONT face="Helvetica, Arial, sans-serif">Does anyone have experienced similar problems with the erosion filter?</FONT></DIV> <DIV><FONT face="Helvetica, Arial, sans-serif"></FONT> </DIV> <DIV><FONT face="Helvetica, Arial, sans-serif">The tests have been performed on version 2.4.1.</FONT></DIV> <DIV><FONT face="Helvetica, Arial, sans-serif"></FONT> </DIV> <DIV><FONT face="Helvetica, Arial, sans-serif">Sample code:</FONT></DIV> <DIV><FONT face="Helvetica, Arial, sans-serif"></FONT> </DIV><FONT face="Helvetica, Arial, sans-serif">typedef unsigned char CharPixelType; </FONT> <DIV><FONT face="Helvetica, Arial, sans-serif">typedef itk::Image <CharPixelType, 3> Input3DImageType;</FONT></DIV> <DIV><FONT
face="Helvetica, Arial, sans-serif">typedef itk::BinaryBallStructuringElement<CharPixelType, 3> StructuringElementType3D;</FONT></DIV> <DIV><FONT face="Helvetica, Arial, sans-serif">typedef itk::BinaryErodeImageFilter<Input3DImageType, <BR> Input3DImageType,<BR> StructuringElementType3D> ErodeFilterTypeInt2Int3D;<BR></FONT></DIV> <DIV><FONT face="Helvetica, Arial, sans-serif">....</FONT></DIV> <DIV><FONT face="Helvetica, Arial, sans-serif"></FONT> </DIV> <DIV><FONT face="Helvetica, Arial, sans-serif">inputBinaryVolume = readerBinary->GetOutput(); </FONT></DIV> <DIV><FONT face="Helvetica, Arial, sans-serif"></FONT> </DIV> <DIV><FONT face="Helvetica, Arial, sans-serif"> unsigned char TubeRadiusSE = 2;<BR> StructuringElementType3D
structuringElement;<BR> structuringElement.SetRadius(TubeRadiusSE);<BR> structuringElement.CreateStructuringElement();</FONT></DIV> <DIV><FONT face="Helvetica, Arial, sans-serif"></FONT> </DIV> <DIV><FONT face="Helvetica, Arial, sans-serif"> ErodeFilterTypeInt2Int3D::Pointer binaryErode = ErodeFilterTypeInt2Int3D::New();<BR> binaryErode->SetKernel(structuringElement);<BR> binaryErode->SetInput(inputBinaryVolume);<BR> binaryErode->SetErodeValue(1);<BR> binaryErode->Update(); <BR></FONT></DIV> <DIV><FONT face="Helvetica, Arial, sans-serif"></FONT> </DIV> <DIV><FONT face="Helvetica, Arial, sans-serif">Thanks,</FONT></DIV> <DIV><FONT face="Helvetica, Arial, sans-serif">Dan</FONT></DIV> <DIV><FONT face="Helvetica, Arial, sans-serif"></FONT> </DIV> <DIV><FONT face="Helvetica, Arial, sans-serif"></FONT> </DIV> <DIV> <HR SIZE=1> <FONT face="Helvetica, Arial, sans-serif">Yahoo! Music Unlimited -
Access over 1 million songs. <A href="http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=36035/*http://music.yahoo.com/unlimited/">Try it free.</A></FONT> </DIV></BLOCKQUOTE><FONT face="Helvetica, Arial, sans-serif"><BR></FONT> <div></div> <HR SIZE=1> <FONT face="Helvetica, Arial, sans-serif">Do you Yahoo!?<BR>Next-gen email? Have it all with the <A href="http://us.rd.yahoo.com/evt=42241/*http://advision.webevents.yahoo.com/handraisers">all-new Yahoo! Mail Beta.</A></FONT> <PRE wrap=""><FONT face="Helvetica, Arial, sans-serif"> </FONT><HR width="90%" SIZE=4><FONT face="Helvetica, Arial, sans-serif"> _______________________________________________ Insight-users mailing list <A class=moz-txt-link-abbreviated href="mailto:Insight-users@itk.org">Insight-users@itk.org</A> <A class=moz-txt-link-freetext href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</A> </FONT></PRE></BLOCKQUOTE><FONT face="Helvetica, Arial,
sans-serif"><BR></FONT></BLOCKQUOTE><BR><p> 
                <hr size=1>Yahoo! Music Unlimited - Access over 1 million songs.
<a href="http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=36035/*http://music.yahoo.com/unlimited/
">Try it free.</a>