cannot change the size of dicom image
Mostrar comentarios más antiguos
Hi there,
I am trying some algorithms on jpeg image compression. I started from basic structures. For instance I take a jpeg image (uint8), apply dct transform, then quantization and idct to reconstruct the image. I obtained good results that I reduced 7MB to kilobytes. As you know i call "imread" and "imwrite" while reading and writing.
Then I wanted to apply this basic algorithm to a dicom image which has 29MB size. When I "imshow" the results I see the difference when compared to original image. Well, then I call "dicomwrite" the image. I see that the compressed image is still 29MB. Why is that?
I thought maybe this happens because the dicom image is in "uint16" form, on the other hand the quantization table is for 8bit images. However, I multiplied all the pixels of the original dicom by zero. So I have just a black image with the sizes of original image, then I write it. But the new image is still 29MB. So i think it is not about the compression algorithm.
Please help, I have to figure it out Thanks in advance
2 comentarios
Walter Roberson
el 25 de Ag. de 2016
Which compression are you commanding DICOM to use? http://www.dclunie.com/papers/MIIT_2009_DicomCompression_Clunie.pdf
If I recall correctly the default is "none".
Huseyin
el 25 de Ag. de 2016
Respuesta aceptada
Más respuestas (1)
Walter Roberson
el 25 de Ag. de 2016
0 votos
You need to add the 'CompressionMode' option to the dicomwrite() call.
The data you pass to dicomwrite() needs to be the full array, not data that is already fully compressed. The data you pass might have been pre-filtered to make it easier to compress, but it still needs to be full precision and an array. The 'CompressionMode' option tells dicomwrite which compression algorithm to apply to the data to find the byte stream to write to the file.
Categorías
Más información sobre DICOM Format en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!