add local and global measures

This is an attempt to create more local meaaures, bridging the gap from global to per-pixel measures.

Not added to table, this is mainly for discussion.
Merge pull request #14 from simonthum/master

add local and global measures