This figure illustrates the gray-scale top-hat.
.
from morph import *
f=mmreadgray('bunch-seeds.jpg')
D=mmsedisk(3)
g=mmopen(f,D)
gth=mmopenth(f,D)
mmshow(f)
mmshow(g)
mmshow(gth)