#   copyright and license terms.
#
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
import argparse as arg
import os
import logging
import sys

sys.path.insert(
    1,
    '/group_shares/PSYCH/code/development/pipelines/HCP_NHP_generic/src/gradient_unwarping'
)
from gradunwarp.core import (globals, coeffs, utils)
from gradunwarp.core.unwarp_resample import Unwarper

log = globals.get_logger()


def argument_parse_gradunwarp():
    '''Arguments parser from the command line
    '''
    # initiate
    p = arg.ArgumentParser(version=globals.VERSION, usage=globals.usage)

    # required arguments
    p.add_argument('infile',
                   action='store',
                   help='The input warped file (nifti or mgh)')
    p.add_argument(
        'outfile',
        action='store',
Example #2
0
#!/usr/bin/env python
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
#   See COPYING file distributed along with the gradunwarp package for the
#   copyright and license terms.
#
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
import argparse as arg
import os
import logging
from gradunwarp.core import (globals, coeffs, utils)
from gradunwarp.core.unwarp_resample import Unwarper

log = globals.get_logger()


def argument_parse_gradunwarp():
    '''Arguments parser from the command line
    '''
    # initiate
    p = arg.ArgumentParser(version=globals.VERSION, usage=globals.usage)

    # required arguments
    p.add_argument('infile', action='store',
                  help='The input warped file (nifti or mgh)')
    p.add_argument('outfile', action='store',
                  help='The output unwarped file (extension should be .nii/.nii.gz/.mgh/.mgz)')
    p.add_argument('vendor', action='store', choices=['siemens', 'ge'], 
                  help='vendor (either "ge" or "siemens" for now)')

    coef_grp = p.add_mutually_exclusive_group(required=True)