Convert dicom files to ASCII files

Dear experts,
The DICOM example converts a DICOM file to a simple ASCII file. How does it do this? I want to use my own DICom file, so how do I do that?
Thank you very much for your reply

You can find the answer in the README fiel of the DICOM example