Check at this:
http://homepages.inf.ed.ac.uk/rbf/HIPR2/dilate.htm#1
Figure 2.0 I am a bit confused if the 3x3 structuring element is put on top of it, wouldnt everything to the right of the first pixel it finds be white? if its going left to right, top to bottom?
Because it sets a pixel to white, goes right, sees the left pixel that has just be set white is white so sets the next one right and repeats