Patch median filter

Median Filter added. GenerateCLP used, macro SEMMacro.
I don't think you need this anymore