本文整理汇总了Python中ij.WindowManager.setCurrentWindow方法的典型用法代码示例。如果您正苦于以下问题:Python WindowManager.setCurrentWindow方法的具体用法?Python WindowManager.setCurrentWindow怎么用?Python WindowManager.setCurrentWindow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ij.WindowManager
的用法示例。
在下文中一共展示了WindowManager.setCurrentWindow方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: loadVideoSegment
# 需要导入模块: from ij import WindowManager [as 别名]
# 或者: from ij.WindowManager import setCurrentWindow [as 别名]
def loadVideoSegment(fwin, start, reduction, label):
'''
Load a video segment, optionally trim the unused frames
in the beginning (usually the 1st segment)
- fwin: name of the window of the video file (already opened)
- start: starting frame number, default = 1
- reduction: sampling rate (i.e. frame reduction factor)
- label: label of the loaded substack
'''
WM.setCurrentWindow(WM.getWindow(fwin))
im1 = IJ.getImage()
nSlices = im1.getStack().getSize()
IJ.run(im1, 'Make Substack...',
' slices=' + str(start) + '-' + str(nSlices) + '-' + str(reduction))
im2 = IJ.getImage()
im2.setTitle('Substack ' + label)
im1.close()
return im2