27 lines
		
	
	
		
			967 B
		
	
	
	
		
			Python
		
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			967 B
		
	
	
	
		
			Python
		
	
	
	
"""This script is supposed to be launched from fiji's jython interpreter
 | 
						|
"""
 | 
						|
# # note: fiji's jython doesn't support encoding keyword
 | 
						|
 | 
						|
#https://imagej.net/Scripting_Headless
 | 
						|
#@String lipase_src_root_path
 | 
						|
#@String raw_images_root_path
 | 
						|
 | 
						|
# String(label="Please enter your name",description="Name field") name
 | 
						|
# OUTPUT String greeting
 | 
						|
import sys
 | 
						|
print('python version %s' % sys.version)  # prints python version
 | 
						|
 | 
						|
sys.path.append(lipase_src_root_path)  # necessary if run from fiji as script otherwise jython fails to find lipase's modules such as catalog
 | 
						|
 | 
						|
from ij import IJ
 | 
						|
# from lipase import Lipase, ImageLogger
 | 
						|
from catalog import ImageCatalog
 | 
						|
from preprocessing import WhiteEstimator
 | 
						|
from preprocessing import test_preprocessing
 | 
						|
 | 
						|
def run_script():
 | 
						|
    test_preprocessing(raw_images_root_path) # eg '/Users/graffy/ownCloud/ipr/lipase/raw-images'
 | 
						|
 | 
						|
# note : when launched from fiji, __name__ doesn't have the value "__main__", as when launched from python
 | 
						|
run_script()
 |