Skip to content

VRInstances missing OL, OV, SV, and UV value representation (VR) types #457

@GeoffCox

Description

@GeoffCox

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions