images converted to ImplVR during forward

Known bugs reported by PacsOne users
Post Reply
tburba
Posts:50
Joined:Fri Apr 23, 2010 5:02 pm
Contact:
images converted to ImplVR during forward

Post by tburba » Tue Nov 22, 2016 12:50 pm

Two PacsOne servers (version 6.5.2) are forwarding images to each other, and the behavior corresponds to the configuration "Preferred Transfer Syntax When Sending Images to This AE" = ImplVR. But, that parameter is set to None. Effectively the "None" choice is not supported.

I even made a couple of trial installations with 6.5.2 and 6.4.5. The older version sends to the newer one correctly. After upgrading the older one so that both versions match, a duplicate record with ImplVR is added at the beginning of the context. Sender's logs (6.4.5, then 6.5.2):

Code: Select all

Tue Nov 22 14:12:00 2016 DEBUG - Sending Present Context ID: 1 Result: 0
Tue Nov 22 14:12:00 2016 DEBUG - Sending Abstract Syntax: 1.2.840.10008.5.1.4.1.1.1
Tue Nov 22 14:12:00 2016 DEBUG - Sending Transfer Syntax: 1.2.840.10008.1.2.4.51
Tue Nov 22 14:12:00 2016 DEBUG - Sending Transfer Syntax: 1.2.840.10008.1.2
Tue Nov 22 14:12:00 2016 DEBUG - Send Max Pdu Length: 32762
...
Tue Nov 22 14:16:52 2016 DEBUG - Sending Present Context ID: 1 Result: 0
Tue Nov 22 14:16:52 2016 DEBUG - Sending Abstract Syntax: 1.2.840.10008.5.1.4.1.1.1
Tue Nov 22 14:16:52 2016 DEBUG - Sending Transfer Syntax: 1.2.840.10008.1.2
Tue Nov 22 14:16:52 2016 DEBUG - Sending Transfer Syntax: 1.2.840.10008.1.2.4.51
Tue Nov 22 14:16:52 2016 DEBUG - Sending Transfer Syntax: 1.2.840.10008.1.2
Tue Nov 22 14:16:52 2016 DEBUG - Send Max Pdu Length: 32762
If I set the "preferred syntax for sending" to .2.4.51, then the syntax isn't changed (the first context in the example is used). This is of course impractical as original syntaxes vary greatly. The original transfer syntax is essential.

pacsone
Site Admin
Posts:3149
Joined:Tue Sep 30, 2003 2:47 am

Re: images converted to ImplVR during forward

Post by pacsone » Tue Nov 22, 2016 5:20 pm

So to summerize your description of the problem, the original transfer syntax of a Dicom image is "1.2.840.10008.1.2.4.51", but when version 6.5.2 of PacsOne Server sends this image to a destination AE, it proposes the default transfer syntax (Implicit VR Little-Endian) "1.2.840.10008.1.2" first on the list ahead of the original transfer syntax "1.2.840.10008.1.2.4.51"?

If so, did you check the "Preferred Transfer Syntax when Sending to this AE" setting configured for the destination AE and see if it's set to the Dicom default transfer syntax ""1.2.840.10008.1.2"?

tburba
Posts:50
Joined:Fri Apr 23, 2010 5:02 pm
Contact:

Re: images converted to ImplVR during forward

Post by tburba » Wed Nov 23, 2016 6:37 am

Correct. ImplVR is not only ahead the original syntax, it is also duplicated:

ImplVR
original
ImplVR

It would look a lot more logical without duplication,

ImplVR
original

but in the current state this resembles a bug even more.

I repeat -- this is reproducible in a fresh trial installation of 6.5.2 where the destination AE was set up using minimal settings:

Code: Select all

mysql> select * from applentity \G
*************************** 1. row ***************************
         title: PACS2
   description: NULL
      hostname: 172.16.32.4
        ipaddr: 172.16.32.4
          port: 104
   allowaccess: 1
    archivedir: NULL
      queryScp: 0
   worklistScp: 0
      printScp: 0
   maxsessions: 10
   printerType: Default
 archiveformat: 0
     privilege: 31
    xfersyntax:
    archiveage: 0
   longtermdir: NULL
      priority: 0
notifynewstudy: 0
 rxcompression: 0
     markstudy: 0
    lossyratio: 0
  lossyquality: 0
     anonymize: NULL
   multiplectx: 0
     commitScp: 0
 reqcommitment: 0
  txlossyratio: 0
txlossyquality: 0
       xscript: NULL
  xfersyntaxrx:
       aegroup: 0
1 row in set (0.00 sec)

mysql>
Just in case, these aren't true defaults; the preferred syntax was set to original one and then returned to "None".

pacsone
Site Admin
Posts:3149
Joined:Tue Sep 30, 2003 2:47 am

Re: images converted to ImplVR during forward

Post by pacsone » Wed Nov 23, 2016 4:33 pm

Can you try the same test with the latest version 6.5.3 of PacsOne Server? There are some recent changes in this area (Dicom transfer syntax negotiation) which may have addressed the issue you just reported.

tburba
Posts:50
Joined:Fri Apr 23, 2010 5:02 pm
Contact:

Re: images converted to ImplVR during forward

Post by tburba » Thu Nov 24, 2016 7:24 am

Upgraded to 6.5.3 -- first the sender, then the receiver.

6.5.3 sends to 6.4.5:

Code: Select all

Thu Nov 24 08:55:16 2016 DEBUG - Sending Present Context ID: 1 Result: 0
Thu Nov 24 08:55:16 2016 DEBUG - Sending Abstract Syntax: 1.2.840.10008.5.1.4.1.1.1
Thu Nov 24 08:55:16 2016 DEBUG - Sending Transfer Syntax: 1.2.840.10008.1.2
Thu Nov 24 08:55:16 2016 DEBUG - Sending Transfer Syntax: 1.2.840.10008.1.2.4.51
Thu Nov 24 08:55:16 2016 DEBUG - Sending Transfer Syntax: 1.2.840.10008.1.2
Thu Nov 24 08:55:16 2016 DEBUG - Send Max Pdu Length: 32762
Thu Nov 24 08:55:16 2016 INFO - C-STORE Forward session: <1> - Job ID [3] started for SCP: 172.16.32.4 Port: 104
Thu Nov 24 08:55:16 2016 INFO - <1> Sending A-ASSOCIATE-RQ PDU
Thu Nov 24 08:55:16 2016 DEBUG - Session: <1> starting WRITE for 263 bytes
Thu Nov 24 08:55:16 2016 DEBUG - JobID: [3] session count for AE: [PACS2] prev = 0 current = 1
Thu Nov 24 08:55:16 2016 DEBUG - Session: <1> I/O completed with 263 bytes
Thu Nov 24 08:55:16 2016 INFO - <1> Waiting for A-ASSOCIATE result
Thu Nov 24 08:55:16 2016 DEBUG - Session: <1> starting READ for 6 bytes
Thu Nov 24 08:55:16 2016 DEBUG - Running SQL Query: SELECT title FROM applentity WHERE worklistScp != 0
Thu Nov 24 08:55:16 2016 DEBUG - Running SQL Query: DELETE FROM monitor WHERE finishtime IS NOT NULL
Thu Nov 24 08:55:16 2016 DEBUG - Session: <1> I/O completed with 6 bytes
Thu Nov 24 08:55:16 2016 DEBUG - Session: <1> starting READ for 181 bytes
Thu Nov 24 08:55:16 2016 DEBUG - Session: <1> I/O completed with 181 bytes
Thu Nov 24 08:55:16 2016 DEBUG - Received Present Context ID: 1
Thu Nov 24 08:55:16 2016 DEBUG - Received Transfer Syntax: 1.2.840.10008.1.2
Thu Nov 24 08:55:16 2016 DEBUG - <1> Presentation Context [1] accepted
Thu Nov 24 08:55:16 2016 DEBUG - Received Max Pdu Length: 32762
6.5.3 sends to 6.5.3:

Code: Select all

Thu Nov 24 09:11:01 2016 DEBUG - Sending Present Context ID: 3 Result: 0
Thu Nov 24 09:11:01 2016 DEBUG - Sending Abstract Syntax: 1.2.840.10008.5.1.4.1.1.1
Thu Nov 24 09:11:01 2016 DEBUG - Sending Transfer Syntax: 1.2.840.10008.1.2
Thu Nov 24 09:11:01 2016 DEBUG - Sending Transfer Syntax: 1.2.840.10008.1.2.4.51
Thu Nov 24 09:11:01 2016 DEBUG - Sending Transfer Syntax: 1.2.840.10008.1.2
Thu Nov 24 09:11:01 2016 DEBUG - Send Max Pdu Length: 32762
Thu Nov 24 09:11:01 2016 INFO - C-STORE Forward session: <2> - Job ID [4] started for SCP: 172.16.32.4 Port: 104
Thu Nov 24 09:11:01 2016 INFO - <2> Sending A-ASSOCIATE-RQ PDU
Thu Nov 24 09:11:01 2016 DEBUG - Session: <2> starting WRITE for 263 bytes
Thu Nov 24 09:11:01 2016 DEBUG - JobID: [4] session count for AE: [PACS2] prev = 0 current = 1
Thu Nov 24 09:11:01 2016 DEBUG - Session: <2> I/O completed with 263 bytes
Thu Nov 24 09:11:01 2016 INFO - <2> Waiting for A-ASSOCIATE result
Thu Nov 24 09:11:01 2016 DEBUG - Session: <2> starting READ for 6 bytes
Thu Nov 24 09:11:01 2016 DEBUG - Session: <2> I/O completed with 6 bytes
Thu Nov 24 09:11:01 2016 DEBUG - Session: <2> starting READ for 181 bytes
Thu Nov 24 09:11:01 2016 DEBUG - Session: <2> I/O completed with 181 bytes
Thu Nov 24 09:11:01 2016 DEBUG - Received Present Context ID: 3
Thu Nov 24 09:11:01 2016 DEBUG - Received Transfer Syntax: 1.2.840.10008.1.2
Thu Nov 24 09:11:01 2016 DEBUG - <2> Presentation Context [3] accepted
Thu Nov 24 09:11:01 2016 DEBUG - Received Max Pdu Length: 32762
No difference, even the duplicate is there. One could also hope that the newer receiver is able to automatically choose more "complicated" syntaxes regardless of their position, but that's not the case. In short, 6.5.3 also converts to ImplVR.

pacsone
Site Admin
Posts:3149
Joined:Tue Sep 30, 2003 2:47 am

Re: images converted to ImplVR during forward

Post by pacsone » Mon Nov 28, 2016 7:57 pm

This is confirmed to be a bug in PacsOne Server and it's traced to the "Preferred Transfer Syntax" setting for the destination AE, if it's ever configured then reset to "None", the setting stored in the "Dicom AE" table will become empty ("") but not NULL. So when the Dicom server component of PacsOne Server tried to establish a Dicom association with that destination AE, it loads the empty ("") Preferred Transfer Syntax setting but since it's not NULL PacsOne will replace the empty value with the Dicom default Little-Endian Transfer syntax and thus the problem you reported.

We'll fix this bug in the next release of PacsOne Server and to work around this problem until the fixes are released, you'd need to explicitly set the Preffered Transfer Syntax setting for that destination AE manually from the MySQL shell prompt, after logging into the PacsOne Server database from a local command shell (or via MySQL Workbench, etc):

Code: Select all

mysql>update applentity set xfersyntax=NULL where title='$aetitle';
where "$aetitle" is the AE Title of that destination AE.

tburba
Posts:50
Joined:Fri Apr 23, 2010 5:02 pm
Contact:

Re: images converted to ImplVR during forward

Post by tburba » Mon Dec 12, 2016 7:39 am

Thanks, that helped.

By the way, you forgot to tell that the "xfersyntax" column is currently NOT NULL. Your query would silently fail by default in the MySQL client:

Code: Select all

mysql> update applentity set xfersyntax=NULL;
Query OK, 0 rows affected, 1 warning (0.03 sec)
Rows matched: 1  Changed: 0  Warnings: 1
Unattentive person would think everything is OK. But, an additional query is needed beforehand to fix the definition. Only then I was able to really assign NULL

Code: Select all

mysql> alter table applentity modify xfersyntax varchar(64) default '';
Query OK, 1 row affected (0.13 sec)
Records: 1  Duplicates: 0  Warnings: 0

mysql> update applentity set xfersyntax=NULL;
Query OK, 1 row affected (0.03 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> select xfersyntax from applentity \G
*************************** 1. row ***************************
xfersyntax: NULL
1 row in set (0.00 sec)
and afterwards 6.5.3 managed to send the correct presentation context:

Code: Select all

Mon Dec 12 09:37:21 2016 DEBUG - Sending Present Context ID: 1 Result: 0
Mon Dec 12 09:37:21 2016 DEBUG - Sending Abstract Syntax: 1.2.840.10008.5.1.4.1.1.1
Mon Dec 12 09:37:21 2016 DEBUG - Sending Transfer Syntax: 1.2.840.10008.1.2.1
Mon Dec 12 09:37:21 2016 DEBUG - Sending Transfer Syntax: 1.2.840.10008.1.2
Mon Dec 12 09:37:21 2016 DEBUG - Send Max Pdu Length: 32762

Post Reply