[ITK-users] BinaryDilateImageFilter has an issue?
Hui Tang
tanghui.seu at gmail.com
Fri Oct 31 04:53:53 EDT 2014
Dear all,
I can not get dilation or erosion from BinaryDilateImageFilter or
BinaryErodeImageFilter
I mostly copied from the example and thought it should work without any
problems.
Here is my code.
Anyone knows what is wrong here? Thanks a lot in advance !
unsigned int radius = 7;
typedef itk::BinaryBallStructuringElement<int, 3> StructuringElementType;
StructuringElementType structuringElement;
structuringElement.SetRadius(radius);
structuringElement.CreateStructuringElement();
typedef itk::BinaryDilateImageFilter <Image3DIntType, Image3DIntType,
StructuringElementType> BinaryDilateImageFilterType;
BinaryDilateImageFilterType::Pointer dilateFilter =
BinaryDilateImageFilterType::New();
dilateFilter->SetInput(readerint->GetOutput());
dilateFilter->SetKernel(structuringElement);
dilateFilter->Update();
Best,
Hui
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20141031/ab03c4c4/attachment.html>
More information about the Insight-users
mailing list