#include <vector>
int
main(int, char *[])
{
std::vector<itk::NeighborhoodOperator<float, 2> *> operators;
operators.push_back(new DerivativeOperatorType);
operators.push_back(new ForwardDifferenceOperatorType);
operators.push_back(new GaussianDerivativeOperatorType);
operators.push_back(new GaussianOperatorType);
operators.push_back(new ImageKernelOperatorType);
operators.push_back(new LaplacianOperatorType);
operators.push_back(new SobelOperatorType);
operators.push_back(new AnnulusOperatorType);
operators.push_back(new BackwardDifferenceOperatorType);
for (auto & operatorId : operators)
{
operatorId->SetDirection(0);
operatorId->CreateToRadius(radius);
for (auto i = -operatorId->GetSize()[0] / 2; i <= operatorId->GetSize()[0] / 2; i++)
{
for (auto j = -operatorId->GetSize()[1] / 2; j <= operatorId->GetSize()[1] / 2; j++)
{
offset[0] = i;
offset[1] = j;
unsigned int neighborhoodIndex = operatorId->GetNeighborhoodIndex(offset);
std::cout << operatorId->
GetElement(neighborhoodIndex) <<
" ";
}
std::cout << std::endl;
}
}
return EXIT_SUCCESS;
}