int
main(int argc, char * argv[])
{
if (argc < 6)
{
std::cerr << "Missing parameters." << std::endl;
std::cerr << "Usage: " << argv[0] << " inputImageFile outputImageFile alpha beta radius" << std::endl;
return EXIT_FAILURE;
}
using PixelType = unsigned char;
const auto input = itk::ReadImage<ImageType>(argv[1]);
float alpha = std::stod(argv[3]);
adaptiveHistogramEqualizationImageFilter->SetAlpha(alpha);
float beta = std::stod(argv[4]);
adaptiveHistogramEqualizationImageFilter->SetBeta(beta);
int radiusSize = std::stoi(argv[5]);
AdaptiveHistogramEqualizationImageFilterType::ImageSizeType radius;
radius.Fill(radiusSize);
adaptiveHistogramEqualizationImageFilter->SetRadius(radius);
adaptiveHistogramEqualizationImageFilter->SetInput(input);
adaptiveHistogramEqualizationImageFilter->Update();
itk::WriteImage(adaptiveHistogramEqualizationImageFilter->GetOutput(), argv[2]);
return EXIT_SUCCESS;
}