BUG: fixed bug with masking
BUG: fixed bug with masking

Former-commit-id: e70ed5fcf2e48997b3abaabd3c995bb54717352f [formerly 4424d0ea2a716d28c30898516844a28c7e7288b2]
Former-commit-id: 1d0ec8f89676f44ed9a8b2d1b6f58e252f8423bc
Former-commit-id: 6de45a219003455f71a50f46832aa21dce1171a5
neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox