Bug 169 - TransferSyntaxUID change from Explicit to Implicit when the instance is sent to another modality
Summary: TransferSyntaxUID change from Explicit to Implicit when the instance is sent ...
Status: RESOLVED FIXED
Alias: None
Product: Orthanc
Classification: Unclassified
Component: Orthanc Core (show other bugs)
Version: unspecified
Hardware: All All
: --- normal
Assignee: Sébastien Jodogne
URL:
Depends on:
Blocks:
 
Reported: 2020-06-29 15:16 CEST by Sébastien Jodogne
Modified: 2020-06-29 15:27 CEST (History)
0 users

See Also:


Attachments
anon.zip (8.18 MB, application/zip)
2020-06-29 15:17 CEST, Sébastien Jodogne
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sébastien Jodogne 2020-06-29 15:16:35 CEST
[BitBucket user: Sylvain Rouquette]
[BitBucket date: 2020-03-12.12:11:54]

**What steps will reproduce the problem?**

* connect 2 Orthanc
* upload the instance attached to this issue
* send the instance from one to another
* check the instance on the receiving Orthanc with dcmdump \(dcmtk\)

**What is the expected output? What do you see instead?**

* the TransferSyntaxUID changed from ExplicitVRLittleEndian to ImplicitVRLittleEndian, it shouldn’t change
* the private tag \(1337,1001\) lost its VR because of that

On the first Orthanc, the instance is valid on the file system.

I suspect the problem occurs on the first Orthanc, when the instance is sent, because it also happens when the receiving modality isn’t Orthanc.

**What version of the product are you using? On what operating system?**

docker image osimis/orthanc:20.2.0
Comment 1 Sébastien Jodogne 2020-06-29 15:17:06 CEST
Created attachment 21 [details]
anon.zip
Comment 2 Sébastien Jodogne 2020-06-29 15:27:13 CEST
[BitBucket user: Alain Mazy]
[BitBucket date: 2020-03-17.09:25:03]

I confirm I can reproduce the issue.

The problem arises because of the default preferred transfer syntax in Orthanc which is set to LittleIndianImplicit:

`static const char* DEFAULT_PREFERRED_TRANSFER_SYNTAX = UID_LittleEndianImplicitTransferSyntax;`



We could probably add a configuration to define the preferredTransferSyntax.  This will typically be handled during our work on transcoding that should happen in Q2 2020.
Comment 3 Sébastien Jodogne 2020-06-29 15:27:14 CEST
[BitBucket user: Sylvain Rouquette]
[BitBucket date: 2020-03-17.09:40:18]

I would prefer a configuration to disable transcoding, since the original image is fine \(I checked on the file system in Orthanc data\), and Orthanc introduces a problem by transcoding it.
Comment 4 Sébastien Jodogne 2020-06-29 15:27:15 CEST
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2020-03-17.09:46:49]

Because of the COVID-19 outbreak that necessitates other urgent developments, I can’t personally have a look at your issue right now. Please buy support packs from Osimis to speed up our work on Orthanc: https://www.osimis.io/en/services.html
Comment 5 Sébastien Jodogne 2020-06-29 15:27:16 CEST
[BitBucket user: Sylvain Rouquette]
[BitBucket date: 2020-03-18.11:36:51]

I created a PR on branch 1.5.8 with a quickfix, I configure the PreferredTransferSyntax in the RemoteModalityParameters.

You don’t have to merge it, since you will rework it later.

Just so you know this PR exists. Thanks for your inputs.

https://bitbucket.org/sjodogne/orthanc/pull-requests/13/add-preferredtransfersyntax-to/diff
Comment 6 Sébastien Jodogne 2020-06-29 15:27:17 CEST
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2020-03-19.10:16:23]

add PreferredTransferSyntax to RemoteModalityParameters
DicomUserConnection can now use RemoteModalityParameters.PreferredTransferSyntax instead of using the default transfer syntax (LE-implicit).
This way we can transcode by default in LE-explicit.
fix issue #169

→ https://hg.orthanc-server.com/orthanc/changeset/763533d6dd67
Comment 7 Sébastien Jodogne 2020-06-29 15:27:18 CEST
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2020-03-19.10:17:37]

Re-opening, as the patch is not included in the mainline yet.
Comment 8 Sébastien Jodogne 2020-06-29 15:27:19 CEST
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2020-03-19.10:55:58]

I have integrated your changeset into the Orthanc repository, in a dedicated branch:  
https://bitbucket.org/sjodogne/orthanc/branch/SylvainRouquette/fix-issue169-95b752c  
  
I have also integrated the source code of the branch “Orthanc-1.6.0” to update your changes to the latest version of Orthanc that was released yesterday. The patch will be part of the forthcoming release of Orthanc that will feature transcoding \(work-in-progress\).
Comment 9 Sébastien Jodogne 2020-06-29 15:27:25 CEST
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2020-03-23.06:33:08]

Here is a discussion on the Orthanc forum that is related to this issue: https://groups.google.com/d/topic/orthanc-users/61bLLL4c2dk/discussion
Comment 10 Sébastien Jodogne 2020-06-29 15:27:45 CEST
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2020-05-07.09:38:52]

An integration test has been added to reproduce this issue: https://hg.orthanc-server.com/orthanc-tests/rev/b5333f87065b
Comment 11 Sébastien Jodogne 2020-06-29 15:27:46 CEST
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2020-05-07.09:46:25]

The following changeset (that is part of the "transcoding" branch) fixes this issue:
https://hg.orthanc-server.com/orthanc/rev/8f7ad4989fec

This change will be part of forthcoming Orthanc 1.7.0 release.

Note that this modification related to transcoding is much broader than the temporary fix you provided, and that is not needed anymore. Thanks again for your contribution!