int main(int argc, char * argv[])
{
if( argc < 2 )
{
std::cerr << "Usage: " << std::endl;
std::cerr << argv[0] << " inputImageFile [sigma]" << std::endl;
return EXIT_FAILURE;
}
double sigma = 4.0;
if (argc > 2)
{
sigma = atof(argv[2]);
}
const unsigned int Dimension = 2;
typedef unsigned char PixelComponentType;
Dimension > ColorImageType;
ReaderType;
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName( argv[1] );
reader->Update();
ColorImageType, ColorImageType > FilterType;
FilterType::Pointer smoothingRecursiveGaussianImageFilter = FilterType::New();
smoothingRecursiveGaussianImageFilter->SetInput(reader->GetOutput());
smoothingRecursiveGaussianImageFilter->SetSigma(sigma);
smoothingRecursiveGaussianImageFilter->Update();
reader->GetOutput(),true,
itksys::SystemTools::GetFilenameName(argv[1]));
std::stringstream desc;
desc << "SmoothingRecursiveGaussian\n sigma = " << sigma;
smoothingRecursiveGaussianImageFilter->GetOutput(),
true,
desc.str());
return EXIT_SUCCESS;
}