Hi all,
I'm developing a series of Jython scripts intended to be run directly from Fiji's [ Plugins > Macros > Run ] command, to make them accessible to our student researchers - some of whom may have little to no programming experience. In all cases these are just Python versions of working IJ macros we use all the time.
Both of the scripts I've completed are not saving any output files to disk, and not throwing any errors, and I'm totally stumped. Help?
Here is the github repository for the short one - a ND2 to JPG batch conversion script.
The variables under process() return values like this, for example, as spit out by the IJ log during debugging:
currentDir is G:\img dir
saveDir is G:\img dir
fileName is B5.07 04b.nd2
path is G:\img dir\B5.07 04b.nd2
So the actual save command would evaluate to fs.saveAsJpeg(G:\Subdir testing\B5.07 04b.nd2), which I think should be correct, right? (Interesting: a transient .tmp file is created in the directory as the ND2 is processed, though no JPEG is created. What gives??)
The other script saves several different files and has the same problem as above:
IJ.saveAs(imp4, "Jpeg", os.path.join(saveDir, fileName))
rm = RoiManager.getInstance()
rm.runCommand("Save", fileName + ".zip")
ht = rm.getList()
ht.removeAll()
IJ.saveAs("Results", fileName+".csv")
IJ.run("Close")
IJ.selectWindow("Log")
IJ.saveAs("Text", fileName+".txt")
IJ.run("Close")
IJ.run("Clear Results")
imp4.close()
imp3.close()
imp2.close()
imp.close()
What I've tried:
-Moving everything to a local drive instead of accessing a network drive; no change
-Running Fiji in administrator mode; no change
-Checking the file permissions of both FIJI and the .py file I'm running (I made sure that it had full write/append/makedir functions for all users, but no change. I did this both using the properties menu and icacls on the Windows command line. ???)
-Running the script from the Script Editor in FIJI - no errors, but no output, either
So I'm out of ideas. Any suggestions would be much appreciated!
Thanks in advance.