Purpose: The purpose of this code is to combine several DICOM stacks on a slice-by-slice basis to create a new dataset. Specifically, this script was used to combine 3 DICOM stacks of human aortae which were created from 4D Flow-MRI data at discrete time steps (systolic acceleration, peak systole, systolic deceleration). The resultant dataset is therefore a temporal composite which combines each of these time-steps.
This code can be altered to combine any number of time steps.
Matlab version 2020b