本文整理匯總了Python中fos.Window.refocus_camera方法的典型用法代碼示例。如果您正苦於以下問題:Python Window.refocus_camera方法的具體用法?Python Window.refocus_camera怎麽用?Python Window.refocus_camera使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類fos.Window
的用法示例。
在下文中一共展示了Window.refocus_camera方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: Init
# 需要導入模塊: from fos import Window [as 別名]
# 或者: from fos.Window import refocus_camera [as 別名]
if __name__ == '__main__':
import nibabel as nib
dname = '/usr/share/fsl/data/standard/'
fname = dname + 'FMRIB58_FA_1mm.nii.gz'
fname = '/home/eg309/Data/trento_processed/subj_01/MPRAGE_32/rawbet.nii.gz'
img=nib.load(fname)
data = img.get_data()
data = np.interp(data, [data.min(), data.max()], [0, 255])
from fos import Init, Run
Init()
window = Window(caption="[F]OS", bgcolor=(0.4, 0.4, 0.9))
scene = Scene(activate_aabb=False)
guil = Guillotine('VolumeSlicer', data)
scene.add_actor(guil)
window.add_scene(scene)
window.refocus_camera()
#window = Window()
window.show()
#print get_ipython()
Run()
示例2: Line
# 需要導入模塊: from fos import Window [as 別名]
# 或者: from fos.Window import refocus_camera [as 別名]
"""
streamlines = Line('fornix',tracks,colors,line_width=2)
from fos import Window, Scene
from fos.actor.axes import Axes
from fos.actor.text import Text3D
title='Bundle Picker'
w = Window(caption = title,
width = 1200,
height = 800,
bgcolor = (0.,0.,0.2) )
scene = Scene( scenename = 'Main',
extent_min = np.array([-5.0, -5, -5]),
extent_max = np.array([5, 5 ,5]))
ax = Axes(name = "3 axes", linewidth=2.0)
vert = np.array( [[2.0,3.0,0.0]], dtype = np.float32 )
ptr = np.array( [[.2,.2,.2]], dtype = np.float32 )
tex = Text3D( "Text3D", vert, "Reg", 10, 2, ptr)
scene.add_actor(ax)
scene.add_actor(tex)
scene.add_actor(streamlines)
#w.screenshot( 'red.png' )
w.add_scene(scene)
w.refocus_camera()