This post has NOT been accepted by the mailing list yet.
I have a series of .hdr files (>1000) that I need to convert to .png or .bmp files so that I can merge them into a .avi or .mpeg. I want to automate this process in the python script. The first step is writing the script and importing into Opticks.
Question 1. If I have a script that I have proofed in IDLE, and saved it, how can I execute the script at the Opticks command line. I successfully set the current working directory using os.chdir(<my_scripting_dir>). I have tried to execute the script using python.exe myscript.py but did not work.
Question 2 Is there a suggested way to proof my python script (like IDLE) so I don't have to type in a line every time. Perhaps Question 1 will answer this.
Question 3 Here is the beginnings of my script.
from os.path import basename,splitext
import opticks.load_file = opticks._genwrap("loadFile", ctypes.c_uint32, ctypes.c_char_p, ctypes.c_int)
fname=[splitext(basename(i)) for i in files]
for i in range(0,len(files)):
if __name__ == '__main__':
I have successfully typed in all of the lines in the scripting window. I have demonstrate my ability to call up any filename in my directory. The problem comes when I attempt to load it into Opticks. Can you offer any assistance on the proper use of the opticks._genwrap module?