コード例 #1
0
if os.path.splitext(warpFile)[1] == '.tif':
	print('calculating warp parameters from image: '+warpFile)
	warpFilePath = os.path.split(warpFile[:-len(os.path.splitext(warpFile)[1])]+'.warp')[1]
	saveWarp(warpFile, pixLens, warpFilePath, linearWarp)
	warpFile = warpFilePath
elif os.path.splitext(warpFile)[1] == '.warp':
	print('using previously-calculated warp parameters from file: '+warpFile)

print('Processing the sequence in folder: ' + workingPath)
print('Saving the sequence to folder: ' + savePath)

#---------------------------------------------------------------------------
if batchMode == 0:
	print('Processing raw LF image: ')
	single_stacker(magnification, NA, workingPath, pixLens, warpFile, numSlices, umPerSlice, savePath)
	
elif batchMode == 1:
	folder_stacker(workingPath, startTP, warpFile, linearWarp, emailInterval, magnification, NA, pixLens, numSlices, umPerSlice, savePath)
	
elif batchMode == 2:	#*** needs work
	# ask for folder of folders location with GUI...
	root = Tkinter.Tk()
	root.withdraw()
	pathFolder = askdirectory(initialdir=pathInit)	# title='choose folder folder')
	print('Processing folder: ' + pathFolder)
	folder_stacker(pathFolder, startTP, usePrevWarp, emailInterval, magnification, NA, pixLens, numSlices, umPerSlice)

elif batchMode == 3:
	pathDate = workingPath
	date_stacker(pathDate, warpFile, linearWarp, emailInterval, magnification, NA, pixLens, numSlices, umPerSlice, savePath)