2019-07-17 16:56:05 +02:00
|
|
|
"""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
|
2019-07-17 19:11:14 +02:00
|
|
|
#@String lipase_src_root_path
|
2019-07-17 16:56:05 +02:00
|
|
|
#@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
|
|
|
|
|
2019-07-17 19:11:14 +02:00
|
|
|
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
|
2019-07-17 16:56:05 +02:00
|
|
|
|
|
|
|
from ij import IJ
|
2019-09-16 15:53:27 +02:00
|
|
|
# from lipase import Lipase, ImageLogger
|
2019-07-17 16:56:05 +02:00
|
|
|
from catalog import ImageCatalog
|
2019-09-13 15:15:01 +02:00
|
|
|
from preprocessing import WhiteEstimator
|
2019-09-16 15:53:27 +02:00
|
|
|
from preprocessing import test_preprocessing
|
2019-07-17 16:56:05 +02:00
|
|
|
|
|
|
|
def run_script():
|
2019-09-16 15:53:27 +02:00
|
|
|
test_preprocessing(raw_images_root_path) # eg '/Users/graffy/ownCloud/ipr/lipase/raw-images'
|
2019-07-17 16:56:05 +02:00
|
|
|
|
|
|
|
# note : when launched from fiji, __name__ doesn't have the value "__main__", as when launched from python
|
|
|
|
run_script()
|