Fix isodata-thresholding according to Zachary Pincus

You need a test for this... =)