Mercurial > repos > iuc > imagej2_make_binary
comparison imagej2_bunwarpj_elastic_transform_jython_script.py @ 3:bb7bfa5bc1b0 draft default tip
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/image_processing/imagej2 commit 8ea6a4271431c05c82b09c0d3e629b13e6ea7936
| author | iuc |
|---|---|
| date | Fri, 22 Jul 2016 23:21:29 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 2:c026d0eddc3e | 3:bb7bfa5bc1b0 |
|---|---|
| 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 ) |
