non-local-means: add a windowed implementation of NLM