diff options
| author | cjd24 | 2018-04-02 04:37:05 +0100 |
|---|---|---|
| committer | cjd24 | 2018-04-02 04:37:05 +0100 |
| commit | 139b0299d016f8dab6738333c767a3add47bfc14 (patch) | |
| tree | f1c87668aa3e23c9872b91135f415be967b03778 /src/conversion/czi/convertJxrs.py | |
| parent | Swapped over the zoom tier section to use vips directly (diff) | |
| download | medicine-139b0299d016f8dab6738333c767a3add47bfc14.tar.gz medicine-139b0299d016f8dab6738333c767a3add47bfc14.zip | |
Working on converting to Vips, didnt commit czi in this one as is sadly broken
Diffstat (limited to 'src/conversion/czi/convertJxrs.py')
| -rw-r--r-- | src/conversion/czi/convertJxrs.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/conversion/czi/convertJxrs.py b/src/conversion/czi/convertJxrs.py index d19a59a..2ba81b3 100644 --- a/src/conversion/czi/convertJxrs.py +++ b/src/conversion/czi/convertJxrs.py @@ -10,11 +10,16 @@ coutner = 0 def convertjxrs(filename): global counter global totalFiles - asTif = filename.rsplit('.',1)[0] + ".tif" - check_call(['./JxrDecApp', "-i", filename, "-o", asTif]) - check_call(['convert', asTif, filename.rsplit('.',1)[0] + ".png"]) - check_call(['rm', filename, asTif]) - counter += 1 + try: + asTif = filename.rsplit('.',1)[0] + ".tif" + check_call(['JxrDecApp', "-i", filename, "-o", asTif]) + check_call(['convert', asTif, filename.rsplit('.',1)[0] + ".png"]) + check_call(['rm', filename, asTif]) + counter += 1 + except: + print ("Processing Failed. Probably couldn't find decoder due to invalid system environment path, check this before debugging.") + exit(0); + print (f"> Processed File: {counter}/{totalFiles} : {filename} --> {filename.rsplit('.',1)[0]}.png") |
