[ITK] [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/community/attachments/20141031/ab03c4c4/attachment.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list