Hello, I am developing a "CT Viewer" using DCMTK.
I have been trying to load "Lossy Image Compression" DCM data.
However, since the data is not decompressed, the data is not loaded.
How to load "Lossy Image Compression" data?
Note. TAG Information
(0028, 2110) Lossy Image Compression : 1
(0028, 2112) Lossy Image Compression Ratio : 0
(0028, 2114) Lossy Image Compression Method : ISO_10918_1
thanks.
How to load "Lossy Image Compression" data?
Moderator: Moderator Team
-
- OFFIS DICOM Team
- Posts: 1445
- Joined: Tue, 2004-11-02, 17:22
- Location: Oldenburg, Germany
- Contact:
Re: How to load "Lossy Image Compression" data?
This question is not related to the DCMJP2K module, which is about JPEG 2000 compression. Will move it to the General discussion forum.
-
- OFFIS DICOM Team
- Posts: 1445
- Joined: Tue, 2004-11-02, 17:22
- Location: Oldenburg, Germany
- Contact:
Re: How to load "Lossy Image Compression" data?
I would suggest that you look at the source code of dcm2pnm.cc, an application that renders DICOM images and does support lossy compression.
The most important aspect is that you need to register the JPEG decoder in the DICOM parser before loading a dataset:
You can then either use the DicomImage class to render the image
or, if you prefer to implement you own display pipeline, you can just call the decoder and convert the compressed dataset into an uncompressed one:
The most important aspect is that you need to register the JPEG decoder in the DICOM parser before loading a dataset:
Code: Select all
DJDecoderRegistration::registerCodecs();
Code: Select all
DicomImage *di = new DicomImage(dfile, xfer);
Code: Select all
DcmDataset *dataset = dfile.getDataset();
error = dataset->chooseRepresentation(EXS_LittleEndianExplicit, NULL);
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], Majestic-12 [Bot] and 1 guest