[Insight-users] binary erosion does not take effect...
a.bongers at mediri.com
a.bongers at mediri.com
Mon Feb 16 08:27:50 EST 2009
Hi,
I currently have the problem that the binary erosion filter does not show any effect. Did anyone experience the same problem ?
Here is my code: Which I believe is correct - since I copied it from the manual...
But maybe I still forgot some update or so ?!
typedef itk::BinaryBallStructuringElement<InputPixelType,3 > StructuringElementType;
typedef itk::BinaryErodeImageFilter<ImageType,ImageType,StructuringElementType > ErFilterType;
ErFilterType::Pointer binErode = ErFilterType::New();
StructuringElementType binBall;
binBall.CreateStructuringElement();
binBall.SetRadius( 9);
binErode->SetKernel( binBall );
binErode->SetInput( outMaskImage );
binErode->Update();
// my outMaskImage is of type unsinged short and contains //a "0 an 1 mask"
ImageType::Pointer outErodedMaskImage = binErode->GetOutput();
itkUtil::WriteImage<ImageType>(outErodedMaskImage, "C:/erode.mhd" );
Thanks for the help!
Andre
More information about the Insight-users
mailing list