added erode and dilate as slot function