This doesn't block or use a callback, so the histogram values may not be ready by the time finishEdit() is called.  Won't that be a problem?