then storedStructure will have 3 fields, one that contains each variable you saved. You can get then back to individual variables from the structure if you do this
To convert images to .dat format see the link below:
You can also use the ImajeJ software. Upload the image (I mean 2D), then go to Analyze tool bar, then Tools and Save X,Y coordinates. It will generate a txt file with X,Y coordinates and pixel values.
I hope it help you as other colleagues referred to matlab.
I think in MATLAB (and perhaps in Octave, as well), you can use imread, and that would be enough, but it wouldn't be in the typical double precision format that you can manipulate on MATLAB, but on a format uint8. If you want the double you should use a function like, im2double or double, (they do essentially the same thing, with the difference that im2double rescales the intensities so they belong in an interval [0 1], that can be useful for image processing). Here are the official Mathworks links explaining this in more detail: