int main(int argc, char *argv[])
{
if(argc < 2)
{
std::cerr << "Usage: " << std::endl;
std::cerr << argv[0] << " InputImageFile [radius]" << std::endl;
return EXIT_FAILURE;
}
unsigned int radius = 2;
if (argc > 2)
{
radius = atoi(argv[2]);
}
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName(argv[1]);
ImageType::PixelType,2>;
StructuringElementType structuringElement;
structuringElement.CreateStructuringElement();
BinaryDilateImageFilterType::Pointer dilateFilter
= BinaryDilateImageFilterType::New();
dilateFilter->SetInput(reader->GetOutput());
dilateFilter->SetKernel(structuringElement);
viewer.
AddImage(dilateFilter->GetOutput());
return EXIT_SUCCESS;
}