Add mask on Roicounter with helper for arcs

Compilation fixes for windows