int main( int argc, char * argv[] )
{
if( argc < 4 )
{
std::cerr << "Usage: " << std::endl;
std::cerr << argv[0] << " inputImageFile outputImageFile radiusX radiusY" << std::endl;
return EXIT_FAILURE;
}
typedef unsigned char InputPixelType;
typedef unsigned char OutputPixelType;
ReaderType::Pointer reader = ReaderType::New();
WriterType::Pointer writer = WriterType::New();
reader->SetFileName( argv[1] );
writer->SetFileName( argv[2] );
InputImageType, OutputImageType > FilterType;
FilterType::Pointer filter = FilterType::New();
const unsigned int radiusX = atoi( argv[3] );
const unsigned int radiusY = atoi( argv[4] );
InputImageType::SizeType indexRadius;
indexRadius[0] = radiusX;
indexRadius[1] = radiusY;
filter->SetRadius( indexRadius );
filter->SetInput( reader->GetOutput() );
writer->SetInput( filter->GetOutput() );
writer->Update();
return EXIT_SUCCESS;
}