I have to design a general conversion for different kind of scientific image files. These files include binary images as well as metadata. Since these files have their own structure, and in order to make my solution extensible, I have decided to ask from the data providers, to provide me a reader and writer. When I want to convert file A to file B, I call A reader , store data in an intermediate file and then call Writer B to write the intermediate file in format B.
My question is which design patterns I can apply to make this solution clean. Or do you suggest a better solution. I already have difficulty in defining the structure of intermediate file, so there should be a better solution.