Prevent Orthanc Converting Images

I am a DICOM file that is encoded with TransferSyntaxUID of 1.2.840.10008.1.2.4.70 (JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1])).

When I request the file over C-MOVE, what I get is then encoded with Implicit VR Little Endian.

I have the following in my Orthanc config:

“DeflatedTransferSyntaxAccepted” : true,

“JpegTransferSyntaxAccepted” : true,

“Jpeg2000TransferSyntaxAccepted” : true,

“JpegLosslessTransferSyntaxAccepted” : true,

“JpipTransferSyntaxAccepted” : true,

“Mpeg2TransferSyntaxAccepted” : true,

“RleTransferSyntaxAccepted” : true,

when I negotiate the association, what transfer syntax should I say I support to prevent Orthanc from trying to covert the file?

The issue is that the DCMTK library is corrupting the file when it converts it.

Hello,

Orthanc never converts any file it receives. In other words, there are no transcoding primitives that are built in Orthanc (though such primitives could be implemented by plugins or scripts).

If Orthanc declares that it supports JPEG Lossless transfer syntax (JPEG-LS), then the source modality might (but is not obliged to) convert to JPEG-LS the DICOM files it sends to Orthanc.

If you want to be sure to receive only raw, uncompressed files, then you should disable all the transfer syntaxes in the configuration file. This is explained in the Orthanc Book:
https://orthanc.chu.ulg.ac.be/book/dicom-guide.html#c-move-query-retrieve (cf. “note 2”)

HTH,
Sébastien-

The issue seems to be that Orthanc does not close the “global SCU connection” between sends even if the needed TransferSyntaxUID on the file changes.

This is the log from requesting the same DICOM instance twice:

I0916 21:35:14.717993 14 CommandDispatcher.cpp:491] Association Received from AET ANON on IP 172.17.42.1
I0916 21:35:14.752743 14 CommandDispatcher.cpp:684] Association Acknowledged (Max Send PDV: 15988)
W0916 21:35:14.951957 18671 OrthancMoveRequestHandler.cpp:137] Move-SCU request received for AET “ANON”
I0916 21:35:14.951994 18671 OrthancMoveRequestHandler.cpp:145] (0008,0018) SOPInstanceUID = 1.3.12.2.1107.5.5.2.XXXXX.XXXXXX
I0916 21:35:14.952003 18671 OrthancMoveRequestHandler.cpp:145] (0008,0052) QueryRetrieveLevel = IMAGE
I0916 21:35:15.016211 18671 OrthancMoveRequestHandler.cpp:65] Sending resource 9568bee7 to modality “ANON”
I0916 21:35:15.016816 18671 DicomUserConnection.cpp:805] Opening a DICOM SCU connection from AET “NET” to AET “ANON” on host X.X.0.13:1234 (manufacturer: Generic)
I0916 21:35:15.211776 18671 DicomUserConnection.cpp:280] Change in the transfer syntax: the C-Store associated must be renegotiated
I0916 21:35:15.274369 18671 DicomUserConnection.cpp:294] Renegotiating a C-Store association due to a change in the parameters
I0916 21:35:15.274381 18671 DicomUserConnection.cpp:805] Opening a DICOM SCU connection from AET “NET” to AET “ANON” on host X.X.0.13:1234 (manufacturer: Generic)
I0916 21:35:15.586002 18671 CommandDispatcher.cpp:835] DUL Peer Requested Release
I0916 21:35:15.586026 18671 CommandDispatcher.cpp:842] Association Release
I0916 21:35:15.602900 14 CommandDispatcher.cpp:491] Association Received from AET ANON on IP 172.17.42.1
I0916 21:35:15.625869 14 CommandDispatcher.cpp:684] Association Acknowledged (Max Send PDV: 15988)
W0916 21:35:15.835935 18672 OrthancMoveRequestHandler.cpp:137] Move-SCU request received for AET “ANON”
I0916 21:35:15.835959 18672 OrthancMoveRequestHandler.cpp:145] (0008,0018) SOPInstanceUID = 1.3.12.2.XXX.X.X.X.XXXXX.XXXXXX
I0916 21:35:15.835968 18672 OrthancMoveRequestHandler.cpp:145] (0008,0052) QueryRetrieveLevel = IMAGE
I0916 21:35:15.895783 18672 OrthancMoveRequestHandler.cpp:65] Sending resource 9568bee7 to modality “ANON”
I0916 21:35:15.896484 18672 ReusableDicomUserConnection.cpp:58] Reusing the previous SCU connection
I0916 21:35:15.948045 18672 CommandDispatcher.cpp:835] DUL Peer Requested Release
I0916 21:35:15.948060 18672 CommandDispatcher.cpp:842] Association Release
I0916 21:35:20.998231 10 ReusableDicomUserConnection.cpp:95] Closing the global SCU connection after timeout

and this is the log from requesting two DICOM instances that have different TransferSyntaxUIDs:

I0916 21:36:45.027065 14 CommandDispatcher.cpp:491] Association Received from AET ANON on IP 172.17.42.1
I0916 21:36:45.057919 14 CommandDispatcher.cpp:684] Association Acknowledged (Max Send PDV: 15988)
W0916 21:36:45.251937 18673 OrthancMoveRequestHandler.cpp:137] Move-SCU request received for AET “ANON”
I0916 21:36:45.251956 18673 OrthancMoveRequestHandler.cpp:145] (0008,0018) SOPInstanceUID = 1.3.12.2.XXX.X.X.X.XXXXX.XXXXXX
I0916 21:36:45.251965 18673 OrthancMoveRequestHandler.cpp:145] (0008,0052) QueryRetrieveLevel = IMAGE
I0916 21:36:45.318447 18673 OrthancMoveRequestHandler.cpp:65] Sending resource 9568bee7 to modality “ANON”
I0916 21:36:45.318892 18673 DicomUserConnection.cpp:805] Opening a DICOM SCU connection from AET “NET” to AET “ANON” on host X.X.0.13:1234 (manufacturer: Generic)
I0916 21:36:45.461494 18673 DicomUserConnection.cpp:280] Change in the transfer syntax: the C-Store associated must be renegotiated
I0916 21:36:45.519068 18673 DicomUserConnection.cpp:294] Renegotiating a C-Store association due to a change in the parameters
I0916 21:36:45.519127 18673 DicomUserConnection.cpp:805] Opening a DICOM SCU connection from AET “NET” to AET “ANON” on host X.X.0.13:1234 (manufacturer: Generic)
I0916 21:36:45.822752 18673 CommandDispatcher.cpp:835] DUL Peer Requested Release
I0916 21:36:45.822774 18673 CommandDispatcher.cpp:842] Association Release
I0916 21:36:45.832823 14 CommandDispatcher.cpp:491] Association Received from AET ANON on IP 172.17.42.1
I0916 21:36:45.868302 14 CommandDispatcher.cpp:684] Association Acknowledged (Max Send PDV: 15988)
W0916 21:36:46.067900 18674 OrthancMoveRequestHandler.cpp:137] Move-SCU request received for AET “ANON”
I0916 21:36:46.067920 18674 OrthancMoveRequestHandler.cpp:145] (0008,0018) SOPInstanceUID = 2.16.840.1.YYYYYY.Y.YYY.YYY.YYYY.YYYY
I0916 21:36:46.067927 18674 OrthancMoveRequestHandler.cpp:145] (0008,0052) QueryRetrieveLevel = IMAGE
I0916 21:36:46.133822 18674 OrthancMoveRequestHandler.cpp:65] Sending resource 26b4be4b to modality “ANON”
I0916 21:36:46.134402 18674 ReusableDicomUserConnection.cpp:58] Reusing the previous SCU connection
I0916 21:36:46.165882 18674 CommandDispatcher.cpp:835] DUL Peer Requested Release
I0916 21:36:46.165894 18674 CommandDispatcher.cpp:842] Association Release
I0916 21:36:51.231938 10 ReusableDicomUserConnection.cpp:95] Closing the global SCU connection after timeout

Is there any way to get Orthanc to re-negotiate the connection when the Syntax change? i see this in the log but it happens in both of the examples:

I0916 21:36:45.461494 18673 DicomUserConnection.cpp:280] Change in the transfer syntax: the C-Store associated must be renegotiated
I0916 21:36:45.519068 18673 DicomUserConnection.cpp:294] Renegotiating a C-Store association due to a change in the parameters
I0916 21:36:45.519127 18673 DicomUserConnection.cpp:805] Opening a DICOM SCU connection from AET “NET” to AET “ANON” on host X.X.0.13:1234 (manufacturer: Generic)

I think there is an issue where Orthanc is not properly renegotiating the Association a second time here when it realizes that the needed transfersyntaxuid was not previously negotiated.

Dear Alex,

Thanks for deeply investigating this problem!

The issue you reported should now be fixed in the mainline:
https://bitbucket.org/sjodogne/orthanc/issues/4/

A public integration test is also available to reproduce the issue on Orthanc <= 0.9.4:
https://bitbucket.org/sjodogne/orthanc-tests/commits/e7f9b81995455a04e882321dfa426a28afd779c7

HTH,
Sébastien-

Hello,
I am working on orthanc (1.1.0+dfsg-2 and others), unfortunately I am still facing the same problem, I can’t retreive the images from pacs to viewer and the log file sends the folwwoing message:
W0819 00:29:52.363980 OrthancMoveRequestHandler.cpp:175] Move-SCU request received for AET “QTDCM”
I0819 00:29:52.364040 OrthancMoveRequestHandler.cpp:183] (0008,0052) QueryRetrieveLevel = SERIES
I0819 00:29:52.364106 OrthancMoveRequestHandler.cpp:183] (0020,000e) SeriesInstanceUID = 1.3.46.670589.28.961600375700.20160719111133887346.3
I0819 00:29:52.364508 OrthancMoveRequestHandler.cpp:67] Sending resource 07fd367c-b9f38114-ece29f80-1992d179-3581a3bb to modality “QTDCM”
I0819 00:29:52.364891 DicomUserConnection.cpp:888] Opening a DICOM SCU connection from AET “ORTHANC” to AET “QTDCM” on host 192.168.1.14:11133 (manufacturer: MedInria)
I0819 00:29:53.411255 DicomUserConnection.cpp:310] Renegotiating a C-Store association due to a change in the parameters
Regards,

Hello Deya,

Your problem is not the same as Alex’s, that was fixed a long time ago.

Please discuss your issue about medInria and JPEG2000 in one single place, so as to avoid making noise on this forum:
https://groups.google.com/d/msg/orthanc-users/-CeUfdYzkkg/aUcMa09PDgAJ

Sébastien-