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


Python Brain.animate方法代码示例

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


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

示例1: test_animate

# 需要导入模块: from surfer import Brain [as 别名]
# 或者: from surfer.Brain import animate [as 别名]
def test_animate():
    """Test animation."""
    _set_backend('auto')
    brain = Brain(*std_args, size=100)
    brain.add_morphometry('curv')
    tmp_name = mktemp() + '.avi'
    brain.animate(["m"] * 3, n_steps=2)
    brain.animate(['l', 'l'], n_steps=2, fname=tmp_name)
    # can't rotate in axial plane
    assert_raises(ValueError, brain.animate, ['l', 'd'])
    brain.close()
开发者ID:mwaskom,项目名称:PySurfer,代码行数:13,代码来源:test_viz.py

示例2: test_animate

# 需要导入模块: from surfer import Brain [as 别名]
# 或者: from surfer.Brain import animate [as 别名]
def test_animate(tmpdir):
    """Test animation."""
    _set_backend('auto')
    brain = Brain(*std_args, size=100)
    brain.add_morphometry('curv')
    tmp_name = str(tmpdir.join('test.avi'))
    brain.animate(["m"] * 3, n_steps=2)
    brain.animate(['l', 'l'], n_steps=2, fname=tmp_name)
    # can't rotate in axial plane
    pytest.raises(ValueError, brain.animate, ['l', 'd'])
    brain.close()
开发者ID:nipy,项目名称:PySurfer,代码行数:13,代码来源:test_viz.py

示例3: test_animate

# 需要导入模块: from surfer import Brain [as 别名]
# 或者: from surfer.Brain import animate [as 别名]
def test_animate():
    """Test animation
    """
    mlab.options.backend = 'auto'
    brain = Brain(*std_args, config_opts=small_brain)
    brain.add_morphometry('curv')
    tmp_name = mktemp() + '.avi'
    brain.animate(["m"] * 3, n_steps=2)
    brain.animate(['l', 'l'], n_steps=2, fname=tmp_name)
    # can't rotate in axial plane
    assert_raises(ValueError, brain.animate, ['l', 'd'])
    brain.close()
开发者ID:arokem,项目名称:PySurfer,代码行数:14,代码来源:test_viz.py

示例4: Brain

# 需要导入模块: from surfer import Brain [as 别名]
# 或者: from surfer.Brain import animate [as 别名]
============================
Animate brain and save movie
============================

"""
print __doc__

from surfer import Brain

sub = 'fsaverage'
hemi = 'lh'
surf = 'inflated'

brain = Brain(sub, hemi, surf)

brain.animate(['l', 'c'])

# control number of steps
brain.animate(['l', 'm'], n_steps=30)

# any path you can think of
brain.animate(['l', 'c', 'm', 'r', 'c', 'r', 'l'], n_steps=45)

# full turns
brain.animate(["m"] * 3)

# movies
brain.animate(['l', 'l'], n_steps=10, fname='simple_animation.avi')

# however, rotating out of the axial plane is not allowed
try:
开发者ID:hanke,项目名称:PySurfer,代码行数:33,代码来源:rotate_animation.py


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