Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null value for tag VR=DT #77

Open
olivier-med opened this issue Jul 28, 2020 · 0 comments
Open

Null value for tag VR=DT #77

olivier-med opened this issue Jul 28, 2020 · 0 comments

Comments

@olivier-med
Copy link

olivier-med commented Jul 28, 2020

Hi,

I think I've found an issue for tags with VR=DT at least for AcquisitionDateTime.
The reader found the tag 0008,002A, but as you can see in the screenshot, the value is null.
image

I've tested with several series from different sources, and at least the 0008002A tag always has the problem.

And here is how I access the tags;

var elements = DICOMObject
                .Read(dicomFilename).Elements
                .ToList();

foreach (IDICOMElement element in elements)
{
    var vm = 0;
    var value = new StringBuilder();

    if (element.DatType != typeof(byte))
    {
        foreach (var e in element.DData_)
        {
            if (value.Length > 0)
                value.Append("\\");

                vm += 1;
                value.Append(e.ToString());
    }
    else
    {
        var array = (element.DData_ as List<byte>).ToArray();
        value.Append(ByteHelper.ByteArrayToHexString(array));
        vm = 1;
    }

    ...
}

And here what I expect
image

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant