コード例 #1
0
def morph_fmri(args):
    morph_from, morph_to = 'mg78', 'colin27'
    nii_template = 'non-interference-v-interference_{hemi}.mgz'
    from src.utils import freesurfer_utils as fu
    utils.make_dir(op.join(MMVT_DIR, morph_to, 'fmri'))
    for hemi in utils.HEMIS:
        fu.surf2surf(
            morph_from, morph_to, hemi, op.join(MMVT_DIR, morph_from, 'fmri', nii_template.format(hemi=hemi)),
            op.join(MMVT_DIR, morph_to, 'fmri', nii_template.format(hemi=hemi)))
コード例 #2
0
def morph_fmri(morph_from, morph_to, nii_template):
    utils.make_dir(op.join(MMVT_DIR, morph_to, 'fmri'))
    for hemi in utils.HEMIS:
        fu.surf2surf(
            morph_from, morph_to, hemi,
            op.join(MMVT_DIR, morph_from, 'fmri',
                    nii_template.format(hemi=hemi)),
            op.join(MMVT_DIR, morph_to, 'fmri',
                    nii_template.format(hemi=hemi)))
コード例 #3
0
ファイル: cics.py プロジェクト: bdthombre/mmvt
def morph_to_fsaverage(subject,
                       scan_rescan,
                       overwrite=False,
                       print_only=False):
    for hemi in utils.HEMIS:
        source_fname = op.join(FMRI_DIR, subject,
                               'CBF_{}_{}.mgz'.format(scan_rescan, hemi))
        target_fname = op.join(
            FMRI_DIR, subject,
            'CBF_{}_{}_fsaverage.mgz'.format(scan_rescan, hemi))
        if not op.isfile(target_fname) or overwrite:
            fu.surf2surf(subject,
                         'fsaverage',
                         hemi,
                         source_fname,
                         target_fname,
                         print_only=print_only)