Functions to save dicom files were refactored to become a single function
Merged with Helton changes
Merged, again after pull, with changes made by Helton