comparison jython_script.py @ 0:0219a764e425 draft

planemo upload commit 7195716d447effc5bc32154279de4b84369eccdb-dirty
author iuc
date Fri, 19 Jun 2015 17:00:07 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:0219a764e425
1 import sys
2 import jython_utils
3 from ij import IJ
4
5 # Fiji Jython interpreter implements Python 2.5 which does not
6 # provide support for argparse.
7
8 source_tiff_path = sys.argv[ -3 ]
9 source_datatype = sys.argv[ -2 ]
10 source_path = sys.argv[ -1 ]
11
12 # Save the Registered Source Image.
13 registered_source_image = IJ.openImage( source_tiff_path )
14 if source_datatype == 'tiff':
15 registered_source_image = jython_utils.convert_before_saving_as_tiff( registered_source_image )
16 IJ.saveAs( registered_source_image, source_datatype, source_path )