Code Monkey home page Code Monkey logo

Comments (14)

hackermd avatar hackermd commented on June 1, 2024

Thanks for reporting the issue @lassoan. Are you sure the message is formatted correctly, i.e., does the payload of the response message has media type multipart/related as specified by the standard?

from dicomweb-client.

lassoan avatar lassoan commented on June 1, 2024

I use https://github.com/dcmjs-org/dicomweb-server. I don't know if the implementation is correct.

I just had a quick look at documentation of Google's implementation (https://cloud.google.com/healthcare/docs/how-tos/dicomweb#retrieving_an_instance). Based on this I can imagine that if the client declares that it can accept multipart/related then the server can still decide to use application/dicom or multipart/related, but maybe Google's or my interpretation is not correct. Can you give a link to a DICOMweb specification that tells that the server must send instances as multipart/related?

@pieper can you comment on this?

from dicomweb-client.

hackermd avatar hackermd commented on June 1, 2024

Unfortunately, the latest version of Part 18 is really bad shape. Supplement 183 created havoc.

The /study/{studyUID}, /series/{seriesUID}, and /instance/{instanceUID} resources represent collections of DICOM instances and the response message is supposed to have a payload with multipart/related media type.

from dicomweb-client.

hackermd avatar hackermd commented on June 1, 2024

Closing this, since it is a issue with the origin server rather than the client.

from dicomweb-client.

hackermd avatar hackermd commented on June 1, 2024

@lassoan the 2018 version of the standard (prior to Supplement 183) is pretty explicit about the media type of response messages of WADO-RS - RetrieveInstance: http://dicom.nema.org/medical/dicom/2018e/output/chtml/part18/sect_6.5.3.2.html

from dicomweb-client.

pieper avatar pieper commented on June 1, 2024

@hackermd thanks for your help with this. It's a shame the standard is hard to parse on this topic. From the point of view of the dicomweb-client code I would argue we should relax this point in order to be compatible with some real world implementation features.

But as Andras points out, Google clearly offers the application/dicom option on their instance endpoint and that's a common enough use case to consider supporting in the client.

If you are retrieving an instance, you can avoid having to parse multipart boundaries by using the Accept: application/dicom HTTP header.

Alternatively, can the client be used ask for wadu-uri to get the part-10 binary directly?

I agree that dicomweb-server should be fixed to be compliant, that in our control to do (I added this as an issue).

from dicomweb-client.

hackermd avatar hackermd commented on June 1, 2024

@pieper I agree that it's unfortunate that Part 18 is so hard to parse. I am actively working with WG 26 and 27 on improving the documentation. However, I am against providing workarounds for things that are clearly not compliant with the standard.

from dicomweb-client.

lassoan avatar lassoan commented on June 1, 2024

It could also make sense to change or extend the DICOM standard if it is unnecessarily complex to implement.

from dicomweb-client.

hackermd avatar hackermd commented on June 1, 2024

@lassoan There are reasons why /instances/{instanceUID} requires content type multipart/related. For example, different media types (e.g., application/octet-stream or image/*) are acceptable for this resource and not all of them can represent the resource in a single message part. Personally, I think that these media types should not be used for retrieval of an instance and that the standard should be changed. However, changing the standard requires a larger discussion with the DICOM standard committee. I encourage you to participate in WG 27 and propose changes to simplify the standard.

from dicomweb-client.

hackermd avatar hackermd commented on June 1, 2024

I just realized that the Azure DICOM server also got it wrong: https://github.com/microsoft/dicom-server/blob/master/docs/resources/conformance-statement.md#retrieve-an-instance

If most implementations got it "wrong", we should potentially re-consider.

from dicomweb-client.

hackermd avatar hackermd commented on June 1, 2024

@lassoan @pieper I created PR #43 to address this issue. Could you kindly take a look and let me know whether this works for you?

from dicomweb-client.

hackermd avatar hackermd commented on June 1, 2024

The client will currently still request the instance by specifying multipart/related; type="application/dicom" as acceptable media type. However, it will parse the response payload if the server sends only a single part in media type with "application/dicom" content type. We may have to add "application/dicom" to the list of acceptable media types, but I would prefer not to do that unless we receive a 406, since I am unsure whether other implementations will handle this correctly. They should according to content negotiation rules, but who knows..

from dicomweb-client.

pieper avatar pieper commented on June 1, 2024

I think it looks good, but I agree with Niels's suggestion.

from dicomweb-client.

hackermd avatar hackermd commented on June 1, 2024

Included in version 0.51.0

from dicomweb-client.

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.