fo-dicom.Codecs icon indicating copy to clipboard operation
fo-dicom.Codecs copied to clipboard

JPEG2000 compression rate is not obeyed

Open kundanashish opened this issue 1 year ago • 3 comments

Owner's note: The issue subject has changed. Please jump to: https://github.com/Efferent-Health/fo-dicom.Codecs/issues/81#issuecomment-2270736377

Previous description:

Hi @cbeltran1306 This issue doesn't seems to be fixed. I am using the latest version 5.14.2 the sample image and code are as below

image-000001.zip

DicomFile dicomFile = await DicomFile.OpenAsync("inputfilepath"); var codecParams = new FellowOakDicom.Imaging.NativeCodec.DicomJpeg2000Params { Rate = 20}; DicomFile compressed = dicomFile.Clone(DicomTransferSyntax.JPEG2000Lossy, codecParams); await compressed.SaveAsync("outfilepath");

It would be great help if you can take a look. Thanks

Originally posted by @kundanashish in https://github.com/Efferent-Health/fo-dicom.Codecs/issues/24#issuecomment-2245979878

kundanashish avatar Aug 05 '24 12:08 kundanashish

Hi @kundanashish the latest version is 5.14.4 (https://www.nuget.org/packages/fo-dicom.Codecs/5.14.4). I've tested this dicom file without problems.

cbeltran1306 avatar Aug 05 '24 13:08 cbeltran1306

Hi @cbeltran1306

Thanks for pointing it out.

Looks like 5.14.4 is able to convert the file. But I see the compression issue rate is not obeyed image

I want quality to be 20. Am I missing something. Thanks

kundanashish avatar Aug 06 '24 08:08 kundanashish

Actually previously we were using this https://github.com/dcm4che/dcm4che/blob/master/dcm4che-tool/dcm4che-tool-dcm2dcm/README.md

passing -Q as 20 resulting the quality to be 20

kundanashish avatar Aug 06 '24 09:08 kundanashish

Hello @kundanashish, this issue has been solved. Please use the latest nuget version 5.14.5 (https://www.nuget.org/packages/fo-dicom.Codecs/5.14.5)

cbeltran1306 avatar Aug 21 '24 20:08 cbeltran1306

@cbeltran1306 Yeah it did thanks a lot for support

kundanashish avatar Aug 22 '24 07:08 kundanashish