int
main(int argc, char * argv[])
{
if (argc < 3)
{
std::cerr << "Usage: " << std::endl;
std::cerr << argv[0] << " inputImage outputImage " << std::endl;
return EXIT_FAILURE;
}
const char * inputFilename = argv[1];
const char * outputFilename = argv[2];
using CharPixelType = unsigned char;
using RescaleFilter =
using LaplacianSharpeningFilter =
reader->SetFileName(inputFilename);
writer->SetFileName(outputFilename);
lapFilter->SetInput(reader->GetOutput());
rescale->SetInput(lapFilter->GetOutput());
writer->SetInput(rescale->GetOutput());
rescale->SetOutputMinimum(0);
rescale->SetOutputMaximum(255);
try
{
writer->Update();
}
{
std::cout << "ExceptionObject caught !" << std::endl;
std::cout << err << std::endl;
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}