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]);
}
using PixelComponentType = unsigned char;
Dimension >;
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName( argv[1] );
reader->Update();
ColorImageType, ColorImageType >;
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;
}