#include "itksys/SystemTools.hxx"
int main(int argc, char * argv[])
{
if( argc < 2 )
{
std::cerr << "Usage: " << std::endl;
std::cerr << argv[0] << " inputImageFile" << std::endl;
return EXIT_FAILURE;
}
double var = 5.0;
if (argc > 2)
{
var = atof(argv[2]);
}
std::string inputFilename = argv[1];
FloatImageType, FloatImageType > FilterType;
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName( inputFilename.c_str() );
FilterType::Pointer edgeDetector = FilterType::New();
edgeDetector->SetInput( reader->GetOutput() );
FilterType::ArrayType variance;
variance.Fill(var);
edgeDetector->SetVariance(variance);
reader->GetOutput(),true,
itksys::SystemTools::GetFilenameName(inputFilename));
std::stringstream desc;
desc << "ZeroBasedEdgeDetection, variance = "
<< edgeDetector->GetVariance();
edgeDetector->GetOutput(),
true,
desc.str());
return EXIT_SUCCESS;
}