#include "itkOilPaintingImageFilter.h"
#ifdef ENABLE_QUICKVIEW
#endif
int
main(int argc, char * argv[])
{
if (argc < 2)
{
std::cerr << "Usage: " << argv[0] << " inputFile [bins [radius]]" << std::endl;
return EXIT_FAILURE;
}
unsigned int numberOfBins = 50;
if (argc >= 3)
{
numberOfBins = std::stoi(argv[2]);
}
unsigned int radius = 2;
if (argc >= 4)
{
radius = std::stoi(argv[3]);
}
using FilterType = itk::OilPaintingImageFilter<ImageType>;
std::string inputFileName = argv[1];
const auto input = itk::ReadImage<ImageType>(inputFileName);
filter->SetInput(input);
filter->SetNumberOfBins(numberOfBins);
filter->SetRadius(radius);
filter->Update();
#ifdef ENABLE_QUICKVIEW
viewer.
AddImage(input.GetPointer(),
true, itksys::SystemTools::GetFilenameName(inputFileName));
std::stringstream desc;
desc << "OilPaintingImageFilter, bins = " << numberOfBins << " radius = " << radius;
viewer.
AddImage(filter->GetOutput(),
true, desc.str());
#endif
return EXIT_SUCCESS;
}