26 lines
1.0 KiB
Python
26 lines
1.0 KiB
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
|
|
|
|
# it is necassary to add lipase's root path to the path if run from fiji as script otherwise jython fails to find lipase's modules such as catalog
|
|
sys.path.append(lipase_src_root_path) # pylint: disable=undefined-variable
|
|
|
|
# from lipase import Lipase, ImageLogger
|
|
from preprocessing import test_preprocessing # noqa: E402 pylint: disable=import-error,wrong-import-position
|
|
|
|
|
|
def run_script():
|
|
test_preprocessing(raw_images_root_path) # eg '/Users/graffy/ownCloud/ipr/lipase/raw-images' pylint: disable=undefined-variable
|
|
|
|
# note : when launched from fiji, __name__ doesn't have the value "__main__", as when launched from python
|
|
run_script()
|