int
main(int argc, char * argv[])
{
if (argc < 5)
{
std::cerr << "Usage: " << std::endl;
std::cerr << argv[0]
<< " inputImageFile outputImageFile domainSigma rangeSigma"
<< std::endl;
return EXIT_FAILURE;
}
using InputPixelType = unsigned char;
using OutputPixelType = unsigned char;
using FilterType =
reader->SetFileName(argv[1]);
filter->SetInput(reader->GetOutput());
constexpr
unsigned int Dimension = InputImageType::ImageDimension;
for (double & domainSigma : domainSigmas)
{
domainSigma = std::stod(argv[3]);
}
const double rangeSigma = std::stod(argv[4]);
filter->SetDomainSigma(domainSigmas);
filter->SetRangeSigma(rangeSigma);
using WritePixelType = unsigned char;
using RescaleFilterType =
rescaler->SetOutputMinimum(0);
rescaler->SetOutputMaximum(255);
writer->SetFileName(argv[2]);
rescaler->SetInput(filter->GetOutput());
writer->SetInput(rescaler->GetOutput());
writer->Update();
return EXIT_SUCCESS;
}