BUG: corrected many bugs as the function had not been tested yet with the nurbs code
BUG: corrected many bugs as the function had not been tested yet with the nurbs code

3324fr/spinalcordtoolbox,3324fr/spinalcordtoolbox,3324fr/spinalcordtoolbox,3324fr/spinalcordtoolbox,3324fr/spinalcordtoolbox,3324fr/spinalcordtoolbox,3324fr/spinalcordtoolbox