本文整理汇总了Python中ij.io.DirectoryChooser.endswith方法的典型用法代码示例。如果您正苦于以下问题:Python DirectoryChooser.endswith方法的具体用法?Python DirectoryChooser.endswith怎么用?Python DirectoryChooser.endswith使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ij.io.DirectoryChooser
的用法示例。
在下文中一共展示了DirectoryChooser.endswith方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: bAlignFolder
# 需要导入模块: from ij.io import DirectoryChooser [as 别名]
# 或者: from ij.io.DirectoryChooser import endswith [as 别名]
elif type == 'srcDir':
alignFolder = bAlignFolder(path)
if alignFolder:
alignFolder.run()
else:
#ask user for folder, this is a folder that contains folders with single image .tif files
# this asks for a folder
path = DirectoryChooser("Please Choose A Directory Of .lsm Files").getDirectory()
# this asks for a file
#path = OpenDialog("xxx").getPath()
if (path):
print 'path:', path
# '''
if path.endswith('/'):
alignFolder = bAlignFolder(path)
if alignFolder:
alignFolder.run()
elif path.endswith('_ch2.tif'):
alignFile = bAlignFile(path)
if alignFile:
alignFile.run()
# '''
else:
bPrintLog('Canceled by user', 0)
stopTime = time.time()
elapsedSeconds = round(stopTime-startTime,2)
elapsedMinutes = round(elapsedSeconds/60.0,2)
bPrintLog('Finished bAlignFolder_.py in ' + str(elapsedSeconds) + ' seconds (' + str(elapsedMinutes) + ' minutes)')