Added support to save stack of images as dicom image.