当前位置: 首页>>代码示例>>Python>>正文


Python Info.output_type_to_ext方法代码示例

本文整理汇总了Python中nipype.interfaces.fsl.Info.output_type_to_ext方法的典型用法代码示例。如果您正苦于以下问题:Python Info.output_type_to_ext方法的具体用法?Python Info.output_type_to_ext怎么用?Python Info.output_type_to_ext使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在nipype.interfaces.fsl.Info的用法示例。


在下文中一共展示了Info.output_type_to_ext方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setup_infile

# 需要导入模块: from nipype.interfaces.fsl import Info [as 别名]
# 或者: from nipype.interfaces.fsl.Info import output_type_to_ext [as 别名]
def setup_infile():
    global tmp_infile, tmp_dir
    ext = Info.output_type_to_ext(Info.output_type())
    tmp_dir = tempfile.mkdtemp()
    tmp_infile = os.path.join(tmp_dir, "foo" + ext)
    open(tmp_infile, "w")
    return tmp_infile, tmp_dir
开发者ID:amoliu,项目名称:nipype,代码行数:9,代码来源:test_preprocess.py

示例2: setup_infile

# 需要导入模块: from nipype.interfaces.fsl import Info [as 别名]
# 或者: from nipype.interfaces.fsl.Info import output_type_to_ext [as 别名]
def setup_infile():
    global tmp_infile, tmp_dir
    ext = Info.output_type_to_ext(Info.output_type())
    tmp_dir = tempfile.mkdtemp()
    tmp_infile = os.path.join(tmp_dir, 'foo' + ext)
    file(tmp_infile, 'w')
    return tmp_infile, tmp_dir
开发者ID:satra,项目名称:NiPypeold,代码行数:9,代码来源:test_preprocess.py

示例3: setup_flirt

# 需要导入模块: from nipype.interfaces.fsl import Info [as 别名]
# 或者: from nipype.interfaces.fsl.Info import output_type_to_ext [as 别名]
def setup_flirt(tmpdir):
    ext = Info.output_type_to_ext(Info.output_type())
    infile = tmpdir.join("infile"+ext)
    infile.open("w")
    reffile = tmpdir.join("reffile"+ext)
    reffile.open("w")
    return (tmpdir, infile.strpath, reffile.strpath)
开发者ID:bpinsard,项目名称:nipype,代码行数:9,代码来源:test_preprocess.py

示例4: setup_infile

# 需要导入模块: from nipype.interfaces.fsl import Info [as 别名]
# 或者: from nipype.interfaces.fsl.Info import output_type_to_ext [as 别名]
def setup_infile(tmpdir):
    ext = Info.output_type_to_ext(Info.output_type())
    tmp_dir = str(tmpdir)
    tmp_infile = os.path.join(tmp_dir, 'foo' + ext)
    open(tmp_infile, 'w')

    return (tmp_infile, tmp_dir)
开发者ID:mick-d,项目名称:nipype,代码行数:9,代码来源:test_preprocess.py

示例5: setup_flirt

# 需要导入模块: from nipype.interfaces.fsl import Info [as 别名]
# 或者: from nipype.interfaces.fsl.Info import output_type_to_ext [as 别名]
def setup_flirt(tmpdir):
    ext = Info.output_type_to_ext(Info.output_type())
    tmp_dir = str(tmpdir)
    _, infile = tempfile.mkstemp(suffix=ext, dir=tmp_dir)
    _, reffile = tempfile.mkstemp(suffix=ext, dir=tmp_dir)

    return (tmp_dir, infile, reffile)
开发者ID:mick-d,项目名称:nipype,代码行数:9,代码来源:test_preprocess.py

示例6: setup_infile

# 需要导入模块: from nipype.interfaces.fsl import Info [as 别名]
# 或者: from nipype.interfaces.fsl.Info import output_type_to_ext [as 别名]
def setup_infile():
    global tmp_infile, tmp_dir, cwd
    cwd = os.getcwd()
    ext = Info.output_type_to_ext(Info.output_type())
    tmp_dir = tempfile.mkdtemp()
    tmp_infile = os.path.join(tmp_dir, 'foo' + ext)
    open(tmp_infile, 'w')
    os.chdir(tmp_dir)
    return tmp_infile, tmp_dir
开发者ID:DimitriPapadopoulos,项目名称:nipype,代码行数:11,代码来源:test_model.py

示例7: create_files_in_directory_plus_output_type

# 需要导入模块: from nipype.interfaces.fsl import Info [as 别名]
# 或者: from nipype.interfaces.fsl.Info import output_type_to_ext [as 别名]
def create_files_in_directory_plus_output_type(request, tmpdir):
    func_prev_type = set_output_type(request.param)
    origdir = tmpdir.chdir()
    filelist = ['a.nii', 'b.nii']
    nifti_image_files(tmpdir.strpath, filelist, shape=(3,3,3,4))

    out_ext = Info.output_type_to_ext(Info.output_type())

    def fin():
        set_output_type(func_prev_type)
        origdir.chdir()

    request.addfinalizer(fin)
    return (filelist, tmpdir.strpath, out_ext)
开发者ID:mfalkiewicz,项目名称:nipype,代码行数:16,代码来源:fixtures.py

示例8: create_files_in_directory

# 需要导入模块: from nipype.interfaces.fsl import Info [as 别名]
# 或者: from nipype.interfaces.fsl.Info import output_type_to_ext [as 别名]
def create_files_in_directory():
    testdir = os.path.realpath(mkdtemp())
    origdir = os.getcwd()
    os.chdir(testdir)

    filelist = ['a.nii', 'b.nii']
    for f in filelist:
        hdr = nb.Nifti1Header()
        shape = (3, 3, 3, 4)
        hdr.set_data_shape(shape)
        img = np.random.random(shape)
        nb.save(nb.Nifti1Image(img, np.eye(4), hdr),
                os.path.join(testdir, f))

    out_ext = Info.output_type_to_ext(Info.output_type())
    return filelist, testdir, origdir, out_ext
开发者ID:amoliu,项目名称:nipype,代码行数:18,代码来源:test_maths.py

示例9: fsl_name

# 需要导入模块: from nipype.interfaces.fsl import Info [as 别名]
# 或者: from nipype.interfaces.fsl.Info import output_type_to_ext [as 别名]
def fsl_name(obj, fname):
    """Create valid fsl name, including file extension for output type.
    """
    ext = Info.output_type_to_ext(obj.inputs.output_type)
    return fname + ext
开发者ID:satra,项目名称:NiPypeold,代码行数:7,代码来源:test_preprocess.py

示例10: setup_infile

# 需要导入模块: from nipype.interfaces.fsl import Info [as 别名]
# 或者: from nipype.interfaces.fsl.Info import output_type_to_ext [as 别名]
def setup_infile(tmpdir):
    ext = Info.output_type_to_ext(Info.output_type())
    tmp_infile = tmpdir.join('foo' + ext)
    tmp_infile.open("w")
    return (tmp_infile.strpath, tmpdir.strpath)
开发者ID:bpinsard,项目名称:nipype,代码行数:7,代码来源:test_preprocess.py


注:本文中的nipype.interfaces.fsl.Info.output_type_to_ext方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。