Basic binary morphology module ... to manage masks