ENH: Added the option for PDFSegmenter to swap order of erosion/dilation