int main( int argc, char *argv[] )
{
if( argc < 3 )
{
std::cerr << "Usage: inputImage outputImage [sigma] [alpha_1] [alpha_2]" << std::endl;
}
const unsigned int Dimension = 3;
typedef double InputPixelType;
typedef float OutputPixelType;
InputImageType > HessianFilterType;
OutputPixelType > VesselnessMeasureFilterType;
HessianFilterType::Pointer hessianFilter = HessianFilterType::New();
VesselnessMeasureFilterType::Pointer vesselnessFilter =
VesselnessMeasureFilterType::New();
ReaderType::Pointer reader = ReaderType::New();
WriterType::Pointer writer = WriterType::New();
reader->SetFileName( argv[1] );
hessianFilter->SetInput( reader->GetOutput() );
if( argc >= 4 )
{
hessianFilter->SetSigma( static_cast< double >(atof(argv[3])) );
}
vesselnessFilter->SetInput( hessianFilter->GetOutput() );
writer->SetInput( vesselnessFilter->GetOutput() );
writer->SetFileName( argv[2] );
if( argc >= 5 )
{
vesselnessFilter->SetAlpha1( static_cast< double >(atof(argv[4])));
}
if( argc >= 6 )
{
vesselnessFilter->SetAlpha2( static_cast< double >(atof(argv[5])));
}
writer->Update();
return EXIT_SUCCESS;
}