int
main(int argc, char * argv[])
{
if (argc != 7)
{
std::cerr << "Usage: " << std::endl;
std::cerr << argv[0];
std::cerr << " <InputFileName> <OutputFileName>";
std::cerr << " <OutputMin> <OutputMax> <Alpha> <Beta>";
std::cerr << std::endl;
return EXIT_FAILURE;
}
const char * inputFileName = argv[1];
const char * outputFileName = argv[2];
using PixelType = unsigned char;
using ScalarType = float;
const auto outputMinimum = static_cast<PixelType>(atoi(argv[3]));
const auto outputMaximum = static_cast<PixelType>(atoi(argv[4]));
const ScalarType alpha = std::stod(argv[5]);
const ScalarType beta = std::stod(argv[6]);
const auto input = itk::ReadImage<ImageType>(inputFileName);
sigmoidFilter->SetInput(input);
sigmoidFilter->SetOutputMinimum(outputMinimum);
sigmoidFilter->SetOutputMaximum(outputMaximum);
sigmoidFilter->SetAlpha(alpha);
sigmoidFilter->SetBeta(beta);
try
{
}
catch (const itk::ExceptionObject & error)
{
std::cerr << "Error: " << error << std::endl;
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}