added elastic line fitting.
Made the centroid algorithm selection a class attribute, and also made the "manual threshold" default