0

I'm creating a GUI using PyQt4 and Python 2.7, I have to process different images with advanced techniques. The images are processed as NumPy arrays, however, in the program there are more than one image and other data (dictionaries, tuples, lists, NumPy arrays) that should be stored preferably in just one file. It would be great that all this data could be stored in a file as file_name.project (with a custom extension). I don't know how to do this. There is an easy way to do this stuff? What do you recommend me?

osjerick
  • 626
  • 2
  • 8
  • 20
  • 1
    you could create a header for the file that contains all the fields associated with a particular set of images. A good example of this kind of thing is [dicom](https://en.wikipedia.org/wiki/DICOM#Data_format) – DrBwts Jul 01 '15 at 21:49
  • 1
    To save and load Python objects in general you should take a look at Python's [`pickle`](https://docs.python.org/2/library/pickle.html) module. You can even write more than one object to the pickle-file (which can have any extension you wish) as shown in this [SO answer](http://stackoverflow.com/a/20725705/3991125) – albert Jul 01 '15 at 21:52

0 Answers0