本文整理匯總了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)')