REF: reorganized the script and renamed some functions
REF: reorganized the script and renamed some functions

Former-commit-id: 86e38f9ed5685ff716dad5fee9830b4c78b15cbf [formerly 23f5042ef74e97bb7c96fb69ebc8fd35c7154b4d]
Former-commit-id: 72527a867cbc18f96ab9d98c04981e70662e0e42
Former-commit-id: 920a3ad985302051c1d7f3c9c8ae750705088a71
neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox