Generalized Directional Morphological Filter Design for Noise Removal