<div>Hi,</div>  <div>&nbsp;</div>  <div>I am trying to remove the background of the 3D volume using NeighborhoodConnectedImageFilter. Here is what I am doing.</div>  <div>&nbsp;</div>  <div>I read the series of files by using <FONT size=2>ImageSeriesReader and write the files using Imageserieswirter. In between these, I am rescaling, binary thresholding and inverting the images. then I tried to use neighborhoodConnectedImage filter as follows:</FONT></div>  <div><FONT size=2></FONT>&nbsp;</div>  <div><FONT size=2></FONT>&nbsp;</div>  <div><FONT size=2>///////////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT></div>  <div>&nbsp;</div><FONT color=#0000ff size=2>  <div>typedef</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>signed</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>short</FONT><FONT size=2> InputPixelType;</div></FONT><FONT color=#0000ff size=2>  <div>const</FONT><FONT size=2> </FONT><FONT
 color=#0000ff size=2>unsigned</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2> Dimension = 3;</div></FONT><FONT color=#0000ff size=2>  <div>typedef</FONT><FONT size=2> itk::Image&lt; InputPixelType, Dimension &gt; ImageType;</div></FONT><FONT size=2><FONT color=#0000ff size=2>  <div>&nbsp;</div>  <div>typedef</FONT><FONT size=2> itk::NeighborhoodConnectedImageFilter&lt; ImageType, ImageType &gt; ConnectedFilterType;</div>  <div>ConnectedFilterType::Pointer neighborhoodConnected = ConnectedFilterType::New();</div>  <div></div>  <div>neighborhoodConnected-&gt;SetInput( *inputImage ); </div>  <div>neighborhoodConnected-&gt;SetLower( 255 ); /*since the image is binary, I want to extract the white part */</div>  <div>neighborhoodConnected-&gt;SetUpper( 255 ); </div>  <div>ImageType::SizeType radius; </div>  <div></div>  <div>radius[0] = 2; </FONT><FONT color=#008000 size=2>// two pixels along X </div></FONT><FONT size=2>  <div>radius[1] = 2;
 </FONT><FONT color=#008000 size=2>// two pixels along Y </div></FONT><FONT size=2>  <div>radius[2] = 0; </div>  <div>&nbsp;</div>  <div>neighborhoodConnected-&gt;SetRadius( radius ); </div>  <div>ImageType::IndexType index;</div>  <div></div>  <div>index[0] = value[0];</div>  <div>index[1] = value[1];</div>  <div>index[2] = value[2];&nbsp; </div>  <div></FONT><FONT color=#008000 size=2>&nbsp;</div></FONT><FONT size=2>  <div>neighborhoodConnected-&gt;SetSeed( index ); </div>  <div>neighborhoodConnected-&gt;SetReplaceValue( 0 ); </div>  <div>neighborhoodConnected-&gt;Update(); </div>  <div>(*outputImage) = neighborhoodConnected-&gt;GetOutput(); </div>  <div></FONT><FONT size=2>/////////////////////////////////////////////////////////////////////////////////////////////////////////////</FONT></div>  <div>&nbsp;</div>  <div>This piece of code is not working. Any suggestions.</div>  <div>Thanks a lot.</div>  <div>Ravi</FONT></div><p>&#32;
                <hr size=1>How low will we go? Check out Yahoo! Messenger’s low <a href="http://us.rd.yahoo.com/mail_us/taglines/postman8/*http://us.rd.yahoo.com/evt=39663/*http://voice.yahoo.com"> PC-to-Phone call rates.