root.withdraw()
	workingPath = askdirectory(initialdir=pathInit)	# title='choose bout folder')

# get path to save folder for tiff stacks...
if savePath=='':
	# ask for bout folder location with GUI...
	print 'Please choose save folder...'
	root = Tkinter.Tk()
	root.withdraw()
	savePath = askdirectory(initialdir=pathInit)	# title='choose bout folder')

#if warpFile ext is .tif, calculate a .warp file
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)
	
Exemple #2
0
import os
#import socket		# for getting system name
#from focal_stacker import findNonStackedRaws
from focal_stacker import saveWarp, applyWarp


# stimulation record processer
#f = '/Users/todicus/Documents/LF/Data/20100603 - ogb1/visual stimulation/'
#name = '1.01 response_tester.txt (23-12-23).txt'


rectTiff = '/Users/logangrosenick/Documents/Data/20100720_ogb1/Raw_60x/AVG_2.01.tif'
rectTiffName = os.path.split(rectTiff)[1]
rectTiffFolder = os.path.split(rectTiff)[0]
warpFileName = rectTiffName[:-len(os.path.splitext(rectTiffName)[1])]+'.warp'
print(rectTiffFolder+'  |  '+warpFileName)
saveWarp(rectTiff, 9, rectTiffFolder+'/'+warpFileName)