Hi Siddharth, You may want to look at the top hat and bottom hat implementations in the example Insight/Examples/Filtering/MorphologicalImageEnhancement.cxx I hope this helps Lino