<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> </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> </div> <div>Regards</div> <div>Ravi<BR><BR><B><I>Xabier Artaechevarria Artieda <xabiarta@unav.es></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>> Hi,<BR>><BR>> I am trying to remove the background of the 3D volume using <BR>> NeighborhoodConnectedImageFilter. Here is what I am doing.<BR>><BR>> I read the series of files by using ImageSeriesReader and write <BR>> the files using Imageserieswirter. In between these, I am rescaling, <BR>> binary thresholding and inverting the images. then I tried to use <BR>> neighborhoodConnectedImage filter as follows:<BR>><BR>><BR>> <BR>> ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////<BR>><BR>> typedef signed short InputPixelType;<BR>> const unsigned int Dimension = 3;<BR>> typedef itk::Image< InputPixelType, Dimension > ImageType;<BR>><BR>> typedef itk::NeighborhoodConnectedImageFilter< ImageType, <BR>>
ImageType > ConnectedFilterType;<BR>> ConnectedFilterType::Pointer neighborhoodConnected = <BR>> ConnectedFilterType::New();<BR>><BR>> neighborhoodConnected->SetInput( *inputImage );<BR>> neighborhoodConnected->SetLower( 255 ); /*since the image is <BR>> binary, I want to extract the white part */<BR>> neighborhoodConnected->SetUpper( 255 );<BR>> ImageType::SizeType radius;<BR>><BR>> radius[0] = 2; // two pixels along X<BR>> radius[1] = 2; // two pixels along Y<BR>> radius[2] = 0;<BR>><BR>> neighborhoodConnected->SetRadius( radius );<BR>> ImageType::IndexType index;<BR>><BR>> index[0] = value[0];<BR>> index[1] = value[1];<BR>> index[2] = value[2];<BR>><BR>> neighborhoodConnected->SetSeed( index );<BR>> neighborhoodConnected->SetReplaceValue( 0 );<BR>> neighborhoodConnected->Update();<BR>> (*outputImage) = neighborhoodConnected->GetOutput();<BR>> <BR>>
/////////////////////////////////////////////////////////////////////////////////////////////////////////////<BR>><BR>> This piece of code is not working. Any suggestions.<BR>> Thanks a lot.<BR>> Ravi<BR>><BR>><BR>> ---------------------------------<BR>> 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> 
                <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.