Should not reparent object managed by smart pointer
calcContours in paint method