Create quality jpeg image
Moderator: Moderator Team
-
- Posts: 10
- Joined: Tue, 2019-07-16, 12:17
Create quality jpeg image
I converted Dicom to JPEG using dcmj2pnm (dcmj2pnm --write-jpeg input.dcm output.jpeg), but image quality were very loosed,how can convert Dicom to JPEG without losing image quality
-
- DCMTK Developer
- Posts: 2073
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: Create quality jpeg image
Hi,
what do you mean by quality loss?
Note that some DICOM images have more grayscale values than JPEG can actually store i.e. there is inherent loss when converting to JPEG in such cases.
In many cases, however, dcmj2pnm can help selecting those grayscales that are most interesting and/or meaningful for a human viewer. For that look at the options regarding windowing. Try for example option +Wm or +Wi 1 with dcmj2pnm.
Best regards,
Michael
what do you mean by quality loss?
Note that some DICOM images have more grayscale values than JPEG can actually store i.e. there is inherent loss when converting to JPEG in such cases.
In many cases, however, dcmj2pnm can help selecting those grayscales that are most interesting and/or meaningful for a human viewer. For that look at the options regarding windowing. Try for example option +Wm or +Wi 1 with dcmj2pnm.
Best regards,
Michael
-
- DCMTK Developer
- Posts: 2549
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Create quality jpeg image
JPEG Baseline, the output format of dcmj2pnm --write-jpeg, is always lossy. In case you want to store the rendered image with best quality, you should use another output format.
Of course, the answer also depends on what you mean by "without losing image quality"...
Of course, the answer also depends on what you mean by "without losing image quality"...
-
- Posts: 10
- Joined: Tue, 2019-07-16, 12:17
Re: Create quality jpeg image
Thank you, I have used "+Wi 1 with dcmj2pnm" option to convert dicom to jpg file and the result was what i expected .
The comment as follows dcmj2pnm --write-jpeg +Wi 1 input.dcm output.jpeg.
Thanks again for your great suggestion
The comment as follows dcmj2pnm --write-jpeg +Wi 1 input.dcm output.jpeg.
Thanks again for your great suggestion
-
- Posts: 2
- Joined: Fri, 2024-05-17, 08:34
- Location: India
Re: Create quality jpeg image
Hey hi, try using the dcm2jpg command from the DICOM toolkit with high-quality settings
you can use an online tool like Jpeg Compressor which support various image format and compress without losing their quality.
Code: Select all
dcm2jpg --write-jpeg input.dcm output.jpeg
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 1 guest