Compressing all received images in DCM4CHEE ARC

906 views
Skip to first unread message

Paul Rob

unread,
May 6, 2019, 7:48:15 PM5/6/19
to dcm4che
Hi

In DCM4CHEE 2.x we could use https://dcm4che.atlassian.net/wiki/spaces/ee2/pages/2555964/Storage+SCP#StorageSCP-CompressionRules for ensuring all received images will be stored compressed.

Is there a similar approach in DCM4CHEE ARC 5?

Thanks

Gunter Zeilinger

unread,
May 7, 2019, 2:53:58 AM5/7/19
to dcm...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "dcm4che" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dcm4che+u...@googlegroups.com.
To post to this group, send email to dcm...@googlegroups.com.
Visit this group at https://groups.google.com/group/dcm4che.
For more options, visit https://groups.google.com/d/optout.

Paul Rob

unread,
May 7, 2019, 9:54:26 PM5/7/19
to dcm4che
Dear Gunterze, thanks so much for your answer.

I tried some configurations.

For Lossless compressions, it's working fine.
But I'm having problems trying to compress as JPEG Lossy or JPEG 2000 Lossy images.
I tried:

dn: cn=JPEG 12-bit Lossy,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
objectClass: dcmArchiveCompressionRule
cn: JPEG 12-bit Lossy
dicomTransferSyntax: 1.2.840.10008.1.2.4.51
dcmImageWriteParam: compressionQuality=0.8
dcmImageWriteParam: maxPixelValueError=20.0
dcmImageWriteParam: avgPixelValueBlockSize=8.0
dcmProperty: BitsStored=9|10|11|12
dcmProperty: PhotometricInterpretation=MONOCHROME1|MONOCHROME2
dcmProperty: PixelRepresentation=0

dn: cn=JPEG 8-bit Lossy,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
objectClass: dcmArchiveCompressionRule
cn: JPEG 8-bit Lossy
dicomTransferSyntax: 1.2.840.10008.1.2.4.50
dcmImageWriteParam: compressionQuality=0.8
dcmImageWriteParam: maxPixelValueError=10.0
dcmImageWriteParam: avgPixelValueBlockSize=8.0
dcmProperty: BitsStored=8
dcmProperty: PhotometricInterpretation=MONOCHROME1|MONOCHROME2|RGB
dcmProperty: PixelRepresentation=0

dn: cn=JPEG 2000 Lossy,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org objectClass: dcmArchiveCompressionRule cn: JPEG 2000 Lossy dicomTransferSyntax: 1.2.840.10008.1.2.4.91 dcmImageWriteParam: compressionQuality=0.8 dcmImageWriteParam: maxPixelValueError=10.0 dcmImageWriteParam: avgPixelValueBlockSize=8.0

 

And I received these errors. Thanks for your help.

2019-05-08 01:42:56,912 INFO  [org.dcm4che3.net.Connection] (EE-ManagedExecutorService-default-Thread-1) Accept connection Socket[addr=/172.18.0.1,port=60766,localport=11112]
2019-05-08 01:42:56,916 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-35) DCM4CHEE<-Horos(20) >> A-ASSOCIATE-RQ
2019-05-08 01:42:56,919 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-35) DCM4CHEE<-Horos(20) << A-ASSOCIATE-AC
2019-05-08 01:42:56,922 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-35) DCM4CHEE<-Horos(20) >> 1:C-STORE-RQ[pcid=37, prior=2
  cuid=1.2.840.10008.5.1.4.1.1.1 - Computed Radiography Image Storage
  iuid=1.2.840.113564.54.192.168.254.89.1332.20190307091447955 - ?
  tsuid=1.2.840.10008.1.2.1 - Explicit VR Little Endian]
2019-05-08 01:42:56,991 WARN  [org.dcm4chee.arc.store.impl.StoreServiceImpl] (EE-ManagedExecutorService-default-Thread-35) DCM4CHEE<-Horos(20): Failed to store received object:
: java.lang.IllegalArgumentException: com.sun.media.imageioimpl.plugins.jpeg.CLibJPEGImageWriteParam.setVgPixelValueBlockSize(double)
    at org.dcm4che3.util.Property.setAt(Property.java:148)
    at org.dcm4che3.imageio.codec.Transcoder.setCompressParams(Transcoder.java:301)
    at org.dcm4chee.arc.store.impl.StoreServiceImpl$TranscoderHandler.newOutputStream(StoreServiceImpl.java:564)
    at org.dcm4che3.imageio.codec.Transcoder.initDicomOutputStream(Transcoder.java:701)
    at org.dcm4che3.imageio.codec.Transcoder.access$100(Transcoder.java:70)
    at org.dcm4che3.imageio.codec.Transcoder$1.readValue(Transcoder.java:352)
    at org.dcm4che3.io.DicomInputStream.readAttributes(DicomInputStream.java:534)
    at org.dcm4che3.imageio.codec.Transcoder.transcode(Transcoder.java:337)
    at org.dcm4chee.arc.store.impl.StoreServiceImpl.writeToStorage(StoreServiceImpl.java:206)
    at org.dcm4chee.arc.store.impl.StoreServiceImpl.store(StoreServiceImpl.java:164)
    at org.dcm4chee.arc.store.impl.StoreServiceImpl$Proxy$_$$_WeldClientProxy.store(Unknown Source)
    at org.dcm4chee.arc.store.scp.CStoreSCP.store(CStoreSCP.java:36)
    at org.dcm4che3.net.service.BasicCStoreSCP.onDimseRQ(BasicCStoreSCP.java:72)
    at sun.reflect.GeneratedMethodAccessor136.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:38)
    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:106)
    at org.dcm4che3.net.service.DicomService$1813663827$Proxy$_$$_WeldClientProxy.onDimseRQ(Unknown Source)
    at org.dcm4che3.net.service.DicomServiceRegistry.onDimseRQ(DicomServiceRegistry.java:86)
    at org.dcm4che3.net.ApplicationEntity.onDimseRQ(ApplicationEntity.java:459)
    at org.dcm4che3.net.Association.onDimseRQ(Association.java:703)
    at org.dcm4che3.net.PDUDecoder.decodeDIMSE(PDUDecoder.java:467)
    at org.dcm4che3.net.Association.handlePDataTF(Association.java:686)
    at org.dcm4che3.net.State$4.onPDataTF(State.java:103)
    at org.dcm4che3.net.Association.onPDataTF(Association.java:682)
    at org.dcm4che3.net.PDUDecoder.nextPDU(PDUDecoder.java:177)
    at org.dcm4che3.net.Association$2.run(Association.java:521)
    at org.jboss.as.ee.concurrent.ControlPointUtils$ControlledRunnable.run(ControlPointUtils.java:105)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.glassfish.enterprise.concurrent.internal.ManagedFutureTask.run(ManagedFutureTask.java:141)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
    at org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl$ManagedThread.run(ManagedThreadFactoryImpl.java:250)
    at org.jboss.as.ee.concurrent.service.ElytronManagedThreadFactory$ElytronManagedThread.run(ElytronManagedThreadFactory.java:78)

2019-05-08 01:42:57,004 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-35) DCM4CHEE<-Horos(20): processing 1:C-STORE-RQ[pcid=37, prior=2
  cuid=1.2.840.10008.5.1.4.1.1.1 - Computed Radiography Image Storage
  iuid=1.2.840.113564.54.192.168.254.89.1332.20190307091447955 - ?
  tsuid=1.2.840.10008.1.2.1 - Explicit VR Little Endian] failed. Caused by:    : org.dcm4che3.net.service.DicomServiceException: java.lang.IllegalArgumentException: com.sun.media.imageioimpl.plugins.jpeg.CLibJPEGImageWriteParam.setVgPixelValueBlockSize(double)
    at org.dcm4chee.arc.store.impl.StoreServiceImpl.writeToStorage(StoreServiceImpl.java:213)
    at org.dcm4chee.arc.store.impl.StoreServiceImpl.store(StoreServiceImpl.java:164)
    at org.dcm4chee.arc.store.impl.StoreServiceImpl$Proxy$_$$_WeldClientProxy.store(Unknown Source)
    at org.dcm4chee.arc.store.scp.CStoreSCP.store(CStoreSCP.java:36)
    at org.dcm4che3.net.service.BasicCStoreSCP.onDimseRQ(BasicCStoreSCP.java:72)
    at sun.reflect.GeneratedMethodAccessor136.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:38)
    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:106)
    at org.dcm4che3.net.service.DicomService$1813663827$Proxy$_$$_WeldClientProxy.onDimseRQ(Unknown Source)
    at org.dcm4che3.net.service.DicomServiceRegistry.onDimseRQ(DicomServiceRegistry.java:86)
    at org.dcm4che3.net.ApplicationEntity.onDimseRQ(ApplicationEntity.java:459)
    at org.dcm4che3.net.Association.onDimseRQ(Association.java:703)
    at org.dcm4che3.net.PDUDecoder.decodeDIMSE(PDUDecoder.java:467)
    at org.dcm4che3.net.Association.handlePDataTF(Association.java:686)
    at org.dcm4che3.net.State$4.onPDataTF(State.java:103)
    at org.dcm4che3.net.Association.onPDataTF(Association.java:682)
    at org.dcm4che3.net.PDUDecoder.nextPDU(PDUDecoder.java:177)
    at org.dcm4che3.net.Association$2.run(Association.java:521)
    at org.jboss.as.ee.concurrent.ControlPointUtils$ControlledRunnable.run(ControlPointUtils.java:105)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.glassfish.enterprise.concurrent.internal.ManagedFutureTask.run(ManagedFutureTask.java:141)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
    at org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl$ManagedThread.run(ManagedThreadFactoryImpl.java:250)
    at org.jboss.as.ee.concurrent.service.ElytronManagedThreadFactory$ElytronManagedThread.run(ElytronManagedThreadFactory.java:78)
Caused by: java.lang.IllegalArgumentException: com.sun.media.imageioimpl.plugins.jpeg.CLibJPEGImageWriteParam.setVgPixelValueBlockSize(double)
    at org.dcm4che3.util.Property.setAt(Property.java:148)
    at org.dcm4che3.imageio.codec.Transcoder.setCompressParams(Transcoder.java:301)
    at org.dcm4chee.arc.store.impl.StoreServiceImpl$TranscoderHandler.newOutputStream(StoreServiceImpl.java:564)
    at org.dcm4che3.imageio.codec.Transcoder.initDicomOutputStream(Transcoder.java:701)
    at org.dcm4che3.imageio.codec.Transcoder.access$100(Transcoder.java:70)
    at org.dcm4che3.imageio.codec.Transcoder$1.readValue(Transcoder.java:352)
    at org.dcm4che3.io.DicomInputStream.readAttributes(DicomInputStream.java:534)
    at org.dcm4che3.imageio.codec.Transcoder.transcode(Transcoder.java:337)
    at org.dcm4chee.arc.store.impl.StoreServiceImpl.writeToStorage(StoreServiceImpl.java:206)
    ... 28 more

2019-05-08 01:42:57,005 INFO  [org.dcm4che3.net.Dimse] (EE-ManagedExecutorService-default-Thread-35) DCM4CHEE<-Horos(20) << 1:C-STORE-RSP[pcid=37, status=110H, errorComment=java.lang.IllegalArgumentException: com.sun.media.imageioimpl.pl
  tsuid=1.2.840.10008.1.2.1 - Explicit VR Little Endian]
2019-05-08 01:42:57,007 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-35) DCM4CHEE<-Horos(20) >> {}: A-ABORT[source: 0 - service-user, reason: 0]
    at org.dcm4che3.net.PDUDecoder.nextPDU(PDUDecoder.java:196)
    at org.dcm4che3.net.Association$2.run(Association.java:521)
    at org.jboss.as.ee.concurrent.ControlPointUtils$ControlledRunnable.run(ControlPointUtils.java:105)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.glassfish.enterprise.concurrent.internal.ManagedFutureTask.run(ManagedFutureTask.java:141)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
    at org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl$ManagedThread.run(ManagedThreadFactoryImpl.java:250)
    at org.jboss.as.ee.concurrent.service.ElytronManagedThreadFactory$ElytronManagedThread.run(ElytronManagedThreadFactory.java:78)

2019-05-08 01:42:57,008 INFO  [org.dcm4che3.net.Association] (EE-ManagedExecutorService-default-Thread-35) DCM4CHEE<-Horos(20): close Socket[addr=172.18.0.1/172.18.0.1,port=60766,localport=11112]




Em terça-feira, 7 de maio de 2019 03:53:58 UTC-3, gunterze escreveu:
On Tue, May 7, 2019 at 1:48 AM Paul Rob <paulrob...@gmail.com> wrote:
Hi

In DCM4CHEE 2.x we could use https://dcm4che.atlassian.net/wiki/spaces/ee2/pages/2555964/Storage+SCP#StorageSCP-CompressionRules for ensuring all received images will be stored compressed.

Is there a similar approach in DCM4CHEE ARC 5?

Thanks

--
You received this message because you are subscribed to the Google Groups "dcm4che" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dcm...@googlegroups.com.

Surupira

unread,
May 7, 2019, 10:01:44 PM5/7/19
to dcm...@googlegroups.com
Hello Rob,

Can u show tour losless configuration please?

Um trying to do, but it doesnt work.

Thank you 

To unsubscribe from this group and stop receiving emails from it, send an email to dcm4che+u...@googlegroups.com.

To post to this group, send email to dcm...@googlegroups.com.
Visit this group at https://groups.google.com/group/dcm4che.

Paul Rob

unread,
May 9, 2019, 7:56:05 PM5/9/19
to dcm4che
Dear Sucupira,

Please find attached the configuration I'm using for compressing with JPEG 2000 Lossless.

Best regards

Screen Shot 2019-05-09 at 20.49.02.png

JUAN CARLOS QUINTANA

unread,
Nov 12, 2022, 2:09:34 PM11/12/22
to dcm4che
Hello
Thank you for this detailed answer.
I got dcm4chee-arc-light running in a docker without problems (ubuntu 22.04 server), following the instructions of this page (https://github.com/dcm4che/dcm4chee-arc-light/wiki/Run-minimum-set-of-archive-services-on-a-single-host
I would like to store all my images with lossless compression.
I got an error message when I click save in the child process in the last step of this tutorial (https://github.com/dcm4che/dcm4chee-arc-light/wiki/Compression-of-received-images)
"AuditRecordRepositoryDevice not initialized"
I follow your instructions to create an audit record repository but with no luck. 
Can I create this rule without that repository?
Regards,
Juan Carlos
Reply all
Reply to author
Forward
0 new messages