Added support for fit2D mask.