Code Monkey home page Code Monkey logo

Comments (4)

jbocce avatar jbocce commented on September 22, 2024

FYI @pieper

from dcmjs.

sedghi avatar sedghi commented on September 22, 2024

Sorry for tagging you Steve, we meant to see if @dmlambo has any comment on this

from dcmjs.

pieper avatar pieper commented on September 22, 2024

Sorry for tagging you Steve, we meant to see if @dmlambo has any comment on this

Thanks, I'm very happy for someone else to investigate this. 👍

For background:

When I click on one of the error message I get to this code:

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;
}
}

Which reference this issue thread for background:

dgobbi/vtk-dicom#38

But I don't know why the latest changes would trigger more of those cases. Can you maybe bisect between 0.29.5 and 0.29.11 to see exactly which commit leads to the extra logging?

f0dc199

from dcmjs.

dmlambo avatar dmlambo commented on September 22, 2024

Ah, yeah that would be my change -- it's a symptom of variable VR types, which I just found out were possible: SmallestImagePixelValue, for example.

What my change introduces is the ability to access values differently than their backing data structure, to allow PN (PersonName) type values to return dicom+json when json stringifying, and formatted strings when writing part10 dcm. As part of that change I obtain the ValueRepresentation class for the VR type and call into a function which can add the required accessors. This actually only happens with PN currently (and may indeed forever stay that way).

The good news is this doesn't affect anything; it's safe to ignore it for the time being. The bad news is the dicom standard is a bit messier than I originally thought. I'll have a look at supressing this accessor step for unknown VRs.

from dcmjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.