本文整理汇总了Python中surfer.Brain.hide_colorbar方法的典型用法代码示例。如果您正苦于以下问题:Python Brain.hide_colorbar方法的具体用法?Python Brain.hide_colorbar怎么用?Python Brain.hide_colorbar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类surfer.Brain
的用法示例。
在下文中一共展示了Brain.hide_colorbar方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: vizify
# 需要导入模块: from surfer import Brain [as 别名]
# 或者: from surfer.Brain import hide_colorbar [as 别名]
def vizify(self):
for hemi in self.hemis:
print "visualize %s" % hemi
# Bring up the beauty (the underlay)
brain = Brain(self.subject_id, hemi, self.surf, \
config_opts=self.config_opts, \
subjects_dir=self.subjects_dir)
surf_data = io.read_scalar_data(self.overlay_surf[hemi])
if (sum(abs(surf_data)) > 0):
# Overlay another hopeful beauty (functional overlay)
brain.add_overlay(self.overlay_surf[hemi], name=self.overlay_name,
min=self.min, max=self.max, sign=self.sign)
# Update colorbar
#brain.overlays[self.overlay_name].pos_bar.lut_mode = self.colorbar
tmp = brain.overlays[self.overlay_name]
lut = tmp.pos_bar.lut.table.to_array()
lut[:,0:3] = self.colorbar
tmp.pos_bar.lut.table = lut
# Refresh
brain.show_view("lat")
brain.hide_colorbar()
# Save the beauts
brain.save_imageset("%s_%s" % (self.outprefix, hemi), self.views,
'jpg', colorbar=None)
# End a great journey, till another life
brain.close()
return
示例2: overlay
# 需要导入模块: from surfer import Brain [as 别名]
# 或者: from surfer.Brain import hide_colorbar [as 别名]
config_opts=dict(background="white"),
subjects_dir="/home2/data/PublicProgram/freesurfer")
"""Get the volume => surface file"""
cwas_file = path.join(mdmr_dir, "surf_lh_fdr_logp_%s.nii.gz" % factor)
"""
You can pass this array to the add_overlay method for
a typical activation overlay (with thresholding, etc.)
"""
brain.add_overlay(cwas_file, min=2, max=max_zvals[i], name="%s_lh" % factor)
## get overlay and color bar
tmp1 = brain.overlays["%s_lh" % factor]
lut = tmp1.pos_bar.lut.table.to_array()
## update color scheme
lut[:,0:3] = cols
tmp1.pos_bar.lut.table = lut
## refresh view
brain.show_view("lat")
brain.hide_colorbar()
"""Save Pictures"""
brain.save_imageset(path.join(odir, "zpics_%s_%s_surface_lh" % (sample, factor)),
['med', 'lat', 'ros', 'caud'], 'jpg')
brain.close()