int main(int argc, char *argv[])
{
if(argc < 2)
{
std::cerr << "Usage: ";
std::cerr << argv[0] << " inputImageFile [alpha] [beta]" << std::endl;
return EXIT_FAILURE;
}
double alpha = 5.0;
double beta = 10.0;
if (argc > 2)
{
alpha = atof(argv[2]);
}
if (argc > 3)
{
beta = atof(argv[3]);
}
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName(argv[1]);
SigmoidImageFilterType::Pointer sigmoidFilter
= SigmoidImageFilterType::New();
sigmoidFilter->SetInput(reader->GetOutput());
sigmoidFilter->SetOutputMinimum(0);
sigmoidFilter->SetOutputMaximum(255);
sigmoidFilter->SetAlpha(alpha);
sigmoidFilter->SetBeta(beta);
reader->GetOutput(),true,
itksys::SystemTools::GetFilenameName(argv[1]));
std::stringstream desc;
desc << "SigmoidImageFilter\nalpha = " << alpha
<< " beta = " << beta;
sigmoidFilter->GetOutput(),
true,
desc.str());
return EXIT_SUCCESS;
}