-
Notifications
You must be signed in to change notification settings - Fork 126
Open
Description
The VRInstances used by createByTypeString cause logging of 'Invalid vr type - using UN' when missing.
static createByTypeString(type) {
var vr = VRinstances[type];
if (vr === undefined) {
if (type == "ox") {
// TODO: determine VR based on context (could be 1 byte pixel data)
// https://github.com/dgobbi/vtk-dicom/issues/38
validationLog.error("Invalid vr type", type, "- using OW");
vr = VRinstances["OW"];
} else if (type == "xs") {
validationLog.error("Invalid vr type", type, "- using US");
vr = VRinstances["US"];
} else {
validationLog.error("Invalid vr type", type, "- using UN");
vr = VRinstances["UN"];
}
}
return vr;
}
During write this vr value is used to write bytes, but I think the VR value is preserved in writing and the writing of the raw bytes seems harmless for these types.
However, either the VRInstances should support writing OL, OV, SV, and UV with their own writers or if they map to using the UN write function then createByTypeString should not log a validation error for those VR strings.
Metadata
Metadata
Assignees
Labels
No labels