pub fn to_vec<T>(data: T) -> Result<Vec<u8>, Error>where DicomJson<T>: From<T> + Serialize,
Serialize a piece of DICOM data to a vector of bytes.