예제 #1
0
    for subject_label in subjects_to_analyze:
        label = 'sub-' + subject_label
        print('running pre-processing for ' + label)

        # Read DWI in BIDS derivatives folder
        all_dwi_images = glob.glob(
            os.path.join(app.args.in_dir, label, '*dwi', '*_dwi.nii*'))

        # Create output subject directory
        subject_dir = os.path.join(all_subjects_dir, subject_label)
        if not os.path.exists(subject_dir):
            os.mkdir(subject_dir)

        # Check existence output files from this analysis level
        dwi_preproc_file = os.path.join(subject_dir, 'dwi_preproc.mif')
        app.checkOutputPath(dwi_preproc_file)
        dwi_bias_file = os.path.join(subject_dir, 'dwi_preproc_bias.mif')
        app.checkOutputPath(dwi_bias_file)
        output_mask = os.path.join(subject_dir, 'mask.mif')
        app.checkOutputPath(output_mask)

        # DW gradient files
        grad_prefix = os.path.join(app.args.in_dir, label, 'dwi',
                                   label + '_dwi')
        if not (os.path.isfile(grad_prefix + '.bval')
                and os.path.isfile(grad_prefix + '.bvec')):
            grad_prefix = os.path.join(app.args.in_dir, 'dwi')
            if not (os.path.isfile(grad_prefix + '.bval')
                    and os.path.isfile(grad_prefix + '.bvec')):
                app.error('Unable to locate valid diffusion gradient table')
        grad_import_option = ' -fslgrad ' + grad_prefix + '.bvec ' + grad_prefix + '.bval'
예제 #2
0
def checkOutputPaths():  #pylint: disable=unused-variable
    from mrtrix3 import app
    app.checkOutputPath(app.args.output)
예제 #3
0
파일: manual.py 프로젝트: ssheybani/mrtrix3
def checkOutputPaths():
    from mrtrix3 import app
    app.checkOutputPath(app.args.output)
예제 #4
0
파일: fa.py 프로젝트: MRtrix3/mrtrix3
def checkOutputPaths(): #pylint: disable=unused-variable
  from mrtrix3 import app
  app.checkOutputPath(app.args.output)
예제 #5
0
파일: fa.py 프로젝트: richardbeare/mrtrix3
def checkOutputPaths():
  from mrtrix3 import app
  app.checkOutputPath(app.args.output)
예제 #6
0
def checkOutputPaths():
  from mrtrix3 import app
  app.checkOutputPath(app.args.out_sfwm)
  app.checkOutputPath(app.args.out_gm)
  app.checkOutputPath(app.args.out_csf)
예제 #7
0
def checkOutputPaths():
    from mrtrix3 import app
    app.checkOutputPath(app.args.out_sfwm)
    app.checkOutputPath(app.args.out_gm)
    app.checkOutputPath(app.args.out_csf)