Make mask support optional
Make mask support optional

Also support a single shared mask image and a default mask that ignores
a border of two pixels around the image.

Kitware/super3d,Kitware/super3d,Kitware/super3d,Kitware/super3d