I am trying to find a probelm source.
I make lossless compression for a grayscale 16 bit image.
First imagerow pixels valuesare zero.
Problem is that when I open thecompressed image with Rubo viewer or Osiris I get corrupt result.
In case first pixel of the first row isn't zeroresult is ok.
It mean that the source of the problem can be the IPP compression module orthe DICOM viewers I use.
Can anyone check the IPP side.
What version of IPP and sample package do you use?
Can you attach here this image - best variant is one image before compression and one after. it wil be very helpfull in the invistigation of this issue. Because i can`t reproduce problem in my own pictures.
IPP version I use is 6.1.2.041
Please see attached files:
BufferBeforeCompression is a dump of a buffer before compression done.
After.jpg is the compressed file, this file open correctly using the picnic.
Compress.dcm file is the compressed dcm file, image open corrupt using osiris or rubo viewer. picnic fail to open this file.
Assuming you obtain After.jpg file with UIC codec and it seems to be generated ok, the natural question is what tool did you use to generate this DICOM file? Are you sure it was created correctly?
Generate DICOM file done using mergecom DICOM engine.
Problem is that in case I compress an image thatthe first row pixels values are zero, the DICOM viewers I use display the image corrupt and in case first row pixels values aren't zero then image display correctly.
I think thatfact that the picnic open After.jpg file correctly doensn't say that file generated correctly because there is an option that the IPP encoder/decoder make different job from other jpeg decoders.
Can you find why picnic fail to open this dcm file?
we can check of course. Most probably it is due to some unsupported DICOM tag. The DICOM parser we use in picnic application is very simple in terms of supporting all DICOM file format features.
I re-check it and I can tell that corruption occur in the DICOM viewers I use only in case firstimage row pixels values are zero.
In order to increase corruption it better to zero first two image rows pixels values.
In case I zero pixels for other image row corruption not occur what strengthen that problem is with the IPP encoder.
Can youtest IPP jpeg encoding with other jpeg decoder except IPP decoder (you can use After.jpg file for that)?
Are you saying that compressed image you put in Compress.dcm file is compressed by IPP JPEG encoder? I'm not aware of how mergecom tool works, so if it capable to take a compressed JPEG file and put it into DICOM format without recompression then we may need to check our encoder. Otherwise I do not see what we can check on our side.
Compress.dcm file compressed by IPP encoder and the dcm file created by mergecom DICOM engine.
mergecom DICOM engine set IPP compression buffer result as the pixel data value in the dcm file.