Hello,
sorry for this simple question but does dcmtk tools like img2dcm and the code below perform any lossless behavior in compression for the data
DicomImage *dicomImage = new DicomImage(dicomConverted.c_str(), CIF_UsePartialAccessToPixelData, frameNumber, 1 );
if (dicomImage->getStatus() != EIS_Normal)
{
LOG("Error: Unable to load DICOM file: ");
delete dicomImage;
continue;
}
.....
if ( dicomImage->writeBMP(concat.c_str(), 24) != 1)
{
LOG("Error writing BMP: ");
}
Best Regards
George
lossless
Moderator: Moderator Team
-
- DCMTK Developer
- Posts: 2073
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: lossless
img2dcm does not apply any compression or decompression, it uses the input pixel data mostly as is.
DicomImage only uses decompression if the related decompression codecs have been registered. See dcm2pnm.cc for an example.
BR Michael
DicomImage only uses decompression if the related decompression codecs have been registered. See dcm2pnm.cc for an example.
BR Michael
Re: lossless
Hello,
I have another issue, I tried to use this file after using gdcmconv on it to decompress it and then I tried to use the previous code ( added again below ), the problem is that it printed a black image instead.
The file is this one again:
https://drive.google.com/file/d/1Eld9fU ... drive_link
Best Regards
George
I have another issue, I tried to use this file after using gdcmconv on it to decompress it and then I tried to use the previous code ( added again below ), the problem is that it printed a black image instead.
Code: Select all
DicomImage *dicomImage = new DicomImage(dicomConverted.c_str(), CIF_UsePartialAccessToPixelData, frameNumber, 1 );
if (dicomImage->getStatus() != EIS_Normal)
{
LOG("Error: Unable to load DICOM file: ");
delete dicomImage;
continue;
}
.....
if ( dicomImage->writeBMP(concat.c_str(), 24) != 1)
{
LOG("Error writing BMP: ");
}
https://drive.google.com/file/d/1Eld9fU ... drive_link
Best Regards
George
-
- DCMTK Developer
- Posts: 2073
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Re: lossless
Dear George,
For a a different problem, please open a different thread please (next time).
Regarding the file: Again it looks like you have not done any analysis yourself and did not look at what I answered earlier. The given file is *not* decompressed but compressed with JPEG 2000 (easy to spot by just within the first 10 lines running dcmdump on the file, as advised earlier).
Your code does not include registration any decompression codecs that would be required to decompress a DICOM file, as advised earlier.
On top, DCMTK does not support decompression of JPEG2000 images out of the box. You can add this functionality yourself or look at the "DCMJP2K" extension sold by the colleagues at OFFIS.
Since you post a lot of questions and answering these costs a substantial amount of time, I will not answer them in this frequency any more. If you require ongoing support to this extent, it is advisable to conclude a commercial support contract with a DICOM specialist.
Best regards,
Michael
For a a different problem, please open a different thread please (next time).
Regarding the file: Again it looks like you have not done any analysis yourself and did not look at what I answered earlier. The given file is *not* decompressed but compressed with JPEG 2000 (easy to spot by just within the first 10 lines running dcmdump on the file, as advised earlier).
Your code does not include registration any decompression codecs that would be required to decompress a DICOM file, as advised earlier.
On top, DCMTK does not support decompression of JPEG2000 images out of the box. You can add this functionality yourself or look at the "DCMJP2K" extension sold by the colleagues at OFFIS.
Since you post a lot of questions and answering these costs a substantial amount of time, I will not answer them in this frequency any more. If you require ongoing support to this extent, it is advisable to conclude a commercial support contract with a DICOM specialist.
Best regards,
Michael
Who is online
Users browsing this forum: Google [Bot] and 1 guest