Added fitEdge function to ImageClass