Code Monkey home page Code Monkey logo

Comments (2)

PantelisGeorgiadis avatar PantelisGeorgiadis commented on June 23, 2024 3

Thank you @dmlambo! Your explanation made me realize that it was easier than I thought! dcmjs-dimse is now using the latest dcmjs release and all unit tests are updated accordingly!

from dcmjs.

dmlambo avatar dmlambo commented on June 23, 2024

The type (json/part10) depends on whether you call toString or you call JSON.stringify on it. The former creates a part10 string (A^B==C), the latter a DICOM json string ({Alphabetic: 'A^B', Phoenetic='c'}). The tests should give good examples of this:

            jsonDataset.PerformingPhysicianName = { Alphabetic: "Doe^John" };

            expect(String(jsonDataset.PerformingPhysicianName)).toEqual(
                "Doe^John"
            );
            expect(JSON.stringify(jsonDataset.PerformingPhysicianName)).toEqual(
                '[{"Alphabetic":"Doe^John"}]'
            );

(This applies to denaturalized datasets as well.)

In terms of adding an option to change the behaviour, it seems like an anti-pattern. You'd probably be better off adding a fix on the client side. Can you point out the exact scenario where this breaks in dcmjs-dimse? I might be able to provide guidance on a fix.

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.