add dilate, erode, getSnapshot, and invert