Skip to content

How to get initial JPEG from DICOM? #18

Answered by nroduit
ncioj10 asked this question in Q&A
Discussion options

You must be logged in to vote

If the image is read and re-compressed into jpeg it is normal to lose the metadata and moreover the image will be different because it is recompressed (jpeg is lossy even at 100% quality).

To convert from jpeg to dcm, it is better to use the function of the dicomizer class with the noAPPn parameter set to false (preserves the metadata). Then you just have to extract the jpeg file from the dicom (note that this code must be improved to handle all situations).

If a jpeg has an orientation flag then most dicom viewer will read the image with the orientation according to the data. The dicomization done in Weasis Dicomizer takes this into account and applies the rotation of the data when neces…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ncioj10
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants