Merge dicom or nrrd or nii images

See for example this post: Set target region for image resampling