<div>Hi Xabi,</div>  <div>Thanks for the reply. </div>  <div>My understanding is the 0 is for 0 slice as the slice number starts from 0. Well I got its solved, I am a fool....was giving wrong seed point.</div>  <div>&nbsp;</div>  <div>I have one more question:</div>  <div>In neighborhoodConnectedThresholdFilter, It fills the region which is outside the two threshold values with zero pixels by default. Is there a way to change this to a value specified by user, similar to the value specified for the region included within two threshold values.</div>  <div>&nbsp;</div>  <div>Regards</div>  <div>Ravi<BR><BR><B><I>Xabier Artaechevarria Artieda &lt;xabiarta@unav.es&gt;</I></B> wrote:</div>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Hi Ravi,<BR>you are setting the radius to (2,2,0). Should not it be (2,2,1)?<BR>I hope that this helps.<BR>Regards,<BR>Xabi<BR><BR>-- <BR>Xabier Artaechevarria<BR>Cancer Imaging
 Laboratory<BR>Centre for Applied Medical Research<BR>www.cima.es<BR><BR><BR><BR>Ravinder Singh <RSCHAUHAN18@YAHOO.COM>ha escrito:<BR><BR>&gt; Hi,<BR>&gt;<BR>&gt; I am trying to remove the background of the 3D volume using <BR>&gt; NeighborhoodConnectedImageFilter. Here is what I am doing.<BR>&gt;<BR>&gt; I read the series of files by using ImageSeriesReader and write <BR>&gt; the files using Imageserieswirter. In between these, I am rescaling, <BR>&gt; binary thresholding and inverting the images. then I tried to use <BR>&gt; neighborhoodConnectedImage filter as follows:<BR>&gt;<BR>&gt;<BR>&gt; <BR>&gt; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////<BR>&gt;<BR>&gt; typedef signed short InputPixelType;<BR>&gt; const unsigned int Dimension = 3;<BR>&gt; typedef itk::Image&lt; InputPixelType, Dimension &gt; ImageType;<BR>&gt;<BR>&gt; typedef itk::NeighborhoodConnectedImageFilter&lt; ImageType, <BR>&gt;
 ImageType &gt; ConnectedFilterType;<BR>&gt; ConnectedFilterType::Pointer neighborhoodConnected = <BR>&gt; ConnectedFilterType::New();<BR>&gt;<BR>&gt; neighborhoodConnected-&gt;SetInput( *inputImage );<BR>&gt; neighborhoodConnected-&gt;SetLower( 255 ); /*since the image is <BR>&gt; binary, I want to extract the white part */<BR>&gt; neighborhoodConnected-&gt;SetUpper( 255 );<BR>&gt; ImageType::SizeType radius;<BR>&gt;<BR>&gt; radius[0] = 2; // two pixels along X<BR>&gt; radius[1] = 2; // two pixels along Y<BR>&gt; radius[2] = 0;<BR>&gt;<BR>&gt; neighborhoodConnected-&gt;SetRadius( radius );<BR>&gt; ImageType::IndexType index;<BR>&gt;<BR>&gt; index[0] = value[0];<BR>&gt; index[1] = value[1];<BR>&gt; index[2] = value[2];<BR>&gt;<BR>&gt; neighborhoodConnected-&gt;SetSeed( index );<BR>&gt; neighborhoodConnected-&gt;SetReplaceValue( 0 );<BR>&gt; neighborhoodConnected-&gt;Update();<BR>&gt; (*outputImage) = neighborhoodConnected-&gt;GetOutput();<BR>&gt; <BR>&gt;
 /////////////////////////////////////////////////////////////////////////////////////////////////////////////<BR>&gt;<BR>&gt; This piece of code is not working. Any suggestions.<BR>&gt; Thanks a lot.<BR>&gt; Ravi<BR>&gt;<BR>&gt;<BR>&gt; ---------------------------------<BR>&gt; How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates.<BR><BR><BR><BR>----------------------------------------------------------------<BR>Este mensaje ha sido enviado desde https://webmail.unav.es<BR><BR></BLOCKQUOTE><BR><p>&#32;
                <hr size=1>Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. <a href="http://us.rd.yahoo.com/mail_us/taglines/postman7/*http://us.rd.yahoo.com/evt=39666/*http://messenger.yahoo.com"> Great rates starting at 1¢/min.