Git Product home page Git Product logo

Comments (10)

dannyrb avatar dannyrb commented on August 12, 2024

@kuehlc are you making sure the server has the appropriate CORS headers set? Do you have a snippet/example?

from cornerstonewebimageloader.

kuehlc avatar kuehlc commented on August 12, 2024

@dannyrb The call is to the same code server side as the one that works with the same image in an older version of the project. The only difference that I can tell is the version of cornerstone. Are you asking for a snippet of the server side code, or which part do you want to see?

from cornerstonewebimageloader.

kuehlc avatar kuehlc commented on August 12, 2024

@dannyrb when I've looked at the dev tools for the return, the headers are the same for the one that works. They both allow for CORS. The blob for the one that doesn't work never finishes being created, so it doesn't show. It fails during cornerstone.loadImage call.

from cornerstonewebimageloader.

kuehlc avatar kuehlc commented on August 12, 2024

@dannyrb Were you able to see the example links from my first comment where it works in the old, but not the new, and how the same link that works in the old one doesn't work in the rawgit page? I don't want to rush you or anything. I get that this is an open source project. I just want to make sure what I posted was clear enough so you could see the issue.

from cornerstonewebimageloader.

dannyrb avatar dannyrb commented on August 12, 2024

@kuehlc, using the default JPEG image, I see these return headers:

image

Using your provided link, I see the following headers:

image

You can either match the response, or create a new loader that works with the response your API is using.

I do see where the application at the RSNA domain is successfully using the API endpoint in question, but because the source is minified, I'm not sure if they're doing any extra magic to decode the response.

It does look like both the web and wado image loaders are registered, and an older version of the libraries is being used. I don't believe any changes to the web image loader would have broken the the response parsing; to my knowledge, it's expected jpeg/png response for years.

from cornerstonewebimageloader.

kuehlc avatar kuehlc commented on August 12, 2024

@dannyrb So you're saying you believe that the working RSNA link is using JavaScript to manipulate the response? Thanks for the answer. I'll look more into these.

from cornerstonewebimageloader.

kuehlc avatar kuehlc commented on August 12, 2024

@dannyrb We found that they modified how they were handling the response as you mentioned. I'm going to modify the php. Does load image just expect the base64 string back directly, or what does it want? I'm looking at the code for the loadImage, but the answer is evading me for some reason for how the blob is created. Thanks in advance.

from cornerstonewebimageloader.

kuehlc avatar kuehlc commented on August 12, 2024

After this, I'll close the ticket.

from cornerstonewebimageloader.

dannyrb avatar dannyrb commented on August 12, 2024

Create Image is where the magic happens: https://github.com/cornerstonejs/cornerstoneWebImageLoader/blob/master/src/createImage.js#L57-L79

from cornerstonewebimageloader.

kuehlc avatar kuehlc commented on August 12, 2024

Okay, thank you.

from cornerstonewebimageloader.

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.