int
main(int argc, char ** argv)
{
if (argc < 3)
{
std::cerr << "Usage: " << std::endl;
std::cerr << argv[0] << " inputRGBImageFile outputRGBImageFile "
<< std::endl;
return EXIT_FAILURE;
}
ReaderType::Pointer reader = ReaderType::New();
WriterType::Pointer writer = WriterType::New();
const char * inputFilename = argv[1];
const char * outputFilename = argv[2];
reader->SetFileName(inputFilename);
writer->SetFileName(outputFilename);
ImageType::Pointer image = reader->GetOutput();
writer->SetInput(image);
writer->Update();
return EXIT_SUCCESS;
}