The string values for WindowCenter and Width can have multivalues separated by . The string to int in DicomImage could take this into account eg
if let v = self.dataset.string(forTag: "WindowWidth") {
self.windowWidth = Int(v.split(separator: "\")[0]) ?? self.windowWidth
}
if let v = self.dataset.string(forTag: "WindowCenter") {
self.windowCenter = Int(v.split(separator: "\")[0]) ?? self.windowCenter
}