non-local-means: add script to manage memory
non-local-means: comment unused line
non-local-means: add function to restore output volume to original range