REF: simplified code
REF: simplified code

Former-commit-id: bb77afbc58cf842507a9f254650f5e5d3b497035
Former-commit-id: 1e1060a69a5cc1468380f5041b03bf8ad729b4b5
3324fr/spinalcordtoolbox,3324fr/spinalcordtoolbox,3324fr/spinalcordtoolbox,3324fr/spinalcordtoolbox,3324fr/spinalcordtoolbox,3324fr/spinalcordtoolbox,3324fr/spinalcordtoolbox