bug fix (due to DGtal evolution) in contourGenerator

Cherry pick to avoid conflicts..