Rewrite texture computation for FeatureExtraction application (ScalarImageTextureFunctor is doing too many allocations)
Use the itkScalarImageTextureCalculator, itkGreyLevelCoocurenceMatrixTextureCoefficientClaculator to create neighborhood functors and functions that compute:
Inertia : equal to contrast
Haralick descriptors, see  (use Scott formula for bin computation):
Angular second moment Contrast Correlation: need validation Sum of squares: Variance Inverse difference moment (Homogeneity) Sum average Sum variance Sum entropy Entropy Difference variance Difference entropy Information measure of correlation(1) Information measure of correlation(2)
Cherry onthe cake:
To gather the code used by the functors and functions, a TextureFunctorBase was made. It is templated with NeighborhoodIterators (one for the neighborhood, one for the offset neighborhood).
The method operator(), loops over each component of the pointed pixel, creates 2 Neighbordhoods that are given to a method ComputeOverSingleChannel declared pure virtual. The function class, calls directly this method using it.GetNeighborhood(). Each texture functor inherits from TextureFunctorBase and only has to overload ComputeOverSingleChannel.
Moreover, TextureFunctorBase deals with the offset setting (used in the computation).