BUG: fixed the problem of physical dimensions and rearranged code properly
BUG: fixed the problem of physical dimensions and rearranged code properly

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