int
main(int argc, char ** argv)
{
if (argc < 3)
{
std::cerr << "Usage: " << std::endl;
std::cerr << argv[0] << " inputImageFile outputImageFile " << std::endl;
return EXIT_FAILURE;
}
using InputPixelType = float;
using OutputPixelType = unsigned char;
using FilterType =
filter->SetOutputMinimum(0);
filter->SetOutputMaximum(255);
filter->SetInput(reader->GetOutput());
writer->SetInput(filter->GetOutput());
const char * inputFilename = argv[1];
const char * outputFilename = argv[2];
reader->SetFileName(inputFilename);
writer->SetFileName(outputFilename);
try
{
writer->Update();
}
{
std::cerr << "ExceptionObject caught !" << std::endl;
std::cerr << err << std::endl;
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
Standard exception handling object.
Data source that reads image data from a single file.
Writes image data to a single file.
Templated n-dimensional image class.
Applies a linear transformation to the intensity levels of the input Image.
constexpr unsigned int Dimension