I tried to extract images to BMP using dcmtk and then using img2dcm to create a dicom, but the problem was that the image quality was different.
this code was used to write each frame:
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: ");
}
Max Absolute Error = 2985
Mean Absolute Error (MAE) = 384.874
Root Mean Square Error (RMSE) = 639.142
Peak Signal to Noise Ratio (PSNR) [dB] = 13.9475
Signal to Noise Ratio (SNR) [dB] = 0.55674
What can I do to fix that issue?
Best Regards
George