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

DICOM image to JPEG #401

Closed
jagjotwadali opened this issue Sep 27, 2017 · 24 comments
Closed

DICOM image to JPEG #401

jagjotwadali opened this issue Sep 27, 2017 · 24 comments
Labels
question Further information is requested
Milestone

Comments

@jagjotwadali
Copy link

jagjotwadali commented Sep 27, 2017

I need to convert DICOM image to JPEG image and then display it on the web page.
Is there any dwv library to do this.
Kindly help .

@ivmartel ivmartel added the question Further information is requested label Sep 29, 2017
@ivmartel ivmartel added this to the 0.22.0 milestone Sep 29, 2017
@ivmartel
Copy link
Owner

This is not something dwv can do for now, but it should not be that complicated to implement. Basically you need to convert an HTML canvas to a JPEG image.

@anoob09
Copy link

anoob09 commented May 25, 2018

@ivmartel @jagjotwadali I have the same question. Any solution?

@jagjotwadali
Copy link
Author

jagjotwadali commented May 26, 2018 via email

@anoob09
Copy link

anoob09 commented May 26, 2018

@jagjotwadali I need php or javascipt if you can help me with that.. it would be awesome. Can you show me how to display DICOM image using location of the DICOM file. Basically any help would be appreciated. I don't have much knowledge about this. I just need to show the image in html.. I don't require other functionalities.

@jagjotwadali
Copy link
Author

jagjotwadali commented May 26, 2018 via email

@anoob09
Copy link

anoob09 commented May 26, 2018

@jagjotwadali Can you help me in displaying it as JPEG using html5 and php and javascript. I really need your help right now. Any article, repo blogs will do too.

@jagjotwadali
Copy link
Author

jagjotwadali commented May 26, 2018 via email

@anoob09
Copy link

anoob09 commented May 26, 2018

I had gone through the library but couldn't find anyway to upload the DICOM file.
And which index.html you are referring to in the above comment?
Could you provide me the link?

@jagjotwadali
Copy link
Author

jagjotwadali commented May 26, 2018 via email

@anoob09
Copy link

anoob09 commented May 26, 2018

@jagjotwadali
sure thanks for the help. I couldn't find which index you were talking about. But I can wait till monday. Enjoy the weekend .

@anoob09
Copy link

anoob09 commented May 28, 2018

about that index page code ? Can you get it now?

@ivmartel
Copy link
Owner

ivmartel commented May 28, 2018

Hi, I created a fiddle to show how you can do it with dwv: https://jsfiddle.net/ivmartel/cuz4tsun/

It uses the canvas and its toDataURL method. Right click on the link and choose Save link as... to download as png.

@anoob09
Copy link

anoob09 commented May 28, 2018

@ivmartel I want to use local address of the DICOM file, not the URL. How to do that?

@pandrode
Copy link

pandrode commented May 28, 2018 via email

@anoob09
Copy link

anoob09 commented May 29, 2018

@AbdoulazizMaharou which javascript files do I need to include if I want to run this code https://jsfiddle.net/ivmartel/cuz4tsun/ on my web app ?

@ivmartel
Copy link
Owner

The only resource needed to run the code of this fiddle is dwv-0.23.4.min.js.

@anoob09
Copy link

anoob09 commented May 29, 2018

@ivmartel when I am using the local address http://localhost/0002.DCM. I am getting the following error.
Error: No JPEG Baseline decoder provided
at H.image.SynchPixelBufferDecoder.decode (dwv-0.23.4.min.js:3:278951)
at H.image.PixelBufferDecoder.decode (dwv-0.23.4.min.js:3:279685)
at H.image.DicomBufferToView.convert (dwv-0.23.4.min.js:3:280876)
at H.io.DicomDataLoader.load (dwv-0.23.4.min.js:3:321542)
at XMLHttpRequest. (dwv-0.23.4.min.js:3:321851) (15:10:10:582 | error, null)
at dwv-0.23.4.min.js:3

And also I really need to use the local address of the file. Please tell me how to do that?

@ivmartel
Copy link
Owner

This simple example does not handle DICOM file with JPEG encoding, check out one of the more advanced examples such as dwv-jqmobile and look for dwv.image.decoderScripts.

I answered your second question in #506.

@jagjotwadali
Copy link
Author

jagjotwadali commented May 29, 2018 via email

@anoob09
Copy link

anoob09 commented May 29, 2018

@jagjotwadali I will try that..
And I want to store the annotation and its coordinates in database using php and mysql and javascript... Is it possible?

Sorry, I couldn't locate dwv-master->viewers->mobile->index.html folder.
I don't even have dwv-master. I have dwv-develop. Do you have link to dwv-master ?

@ivmartel
Copy link
Owner

You can export a state.json file with the annotations.

The mobile demo was moved to dwv-jqmobile.

@anoob09
Copy link

anoob09 commented May 29, 2018

and state.json file will have coordinates and all the other data that I can use to create annotations again when I launch the app ?

@jagjotwadali
Copy link
Author

jagjotwadali commented May 29, 2018 via email

@anoob09
Copy link

anoob09 commented May 29, 2018

Yeah sure
I sent you an e-mail. Please check.

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

No branches or pull requests

4 participants