DICOMWRITE creates correctly formatted DICOM files that contain meaningful metadata.
The missing fields are all related to group lengths. These specify how many bytes of data for a given group of elements will follow. Group length attributes are not commonly used by the community using the DICOM standard. The DICOMWRITE function has been designed not to copy fields related to group length.
Also note that some DICOM attributes that are a bit different are the following:
a. MediaStorageSOPInstanceUID
b. ImplementationClassUID
c. ImplementationVersionName
d. SOPInstanceUID
It is not considered good practice to override the four values listed above. The “unique identifiers” are intended to be unique across the universe of all DICOM files and only shared by DICOM files that are exact metadata/pixel copies of each other. Keeping this information the same when writing a new file indicates that the image was passed along from the reader to the writer without any modifications.
For making exact copies of DICOM files, the COPYFILE function is a better choice than DICOMWRITE.