web stats
DICOM sender local port problem - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 10-19-2017, 04:15 AM
mkostrze mkostrze is offline
What's HL7?
 
Join Date: Oct 2017
Posts: 1
mkostrze is on a distinguished road
Default DICOM sender local port problem

Hello,

I'm trying to setup a channel which would forward DICOM files to a PACS, and I have the requirement that the local TCP port of the client side needs to be fixed (cannot be autoassigned by the OS).

I created a channel with DICOM listener and sender, added the localhost/localport configuration (see scr_453 attached) and the channel works as such (forwards DICOM files to the PACS), but the local ports during send are still being assigned 'pseudorandomly' by the OS. What's interesting - the DICOM sender actually listens on the port I specified which is interesting if you read the tooltip of the box, saying "local port that the client socket will be bound to".

I downloaded the source code of Mirth, saw how this is connected with dcm4che2 and discovered that the setLocalPort / setLocalHost API seems to be for setting up a DICOM server for storage commitments and not for setting up the local port.

This is an excerpt from the org.dcm4che2.tool.dcmsnd.DcmSnd class which is a part of Mirth Server project.

Code:
private static final String DESCRIPTION = 
        "\nLoad composite DICOM Object(s) from specified DICOM file(s) and send it "
      + "to the specified remote Application Entity. If a directory is specified,"
      + "DICOM Object in files under that directory and further sub-directories "
      + "are sent. If <port> is not specified, DICOM default port 104 is assumed. "
      + "If also no <host> is specified, localhost is assumed. Optionally, a "
      + "Storage Commitment Request for successfully tranferred objects is sent "
      + "to the remote Application Entity after the storage. The Storage Commitment "
      + "result is accepted on the same association or - if a local port is "
      + "specified by option -L - in a separate association initiated by the "
      + "remote Application Entity\n"
      + "OPTIONS:";

    private static final String EXAMPLE = 
        "\nExample: dcmsnd STORESCP@localhost:11112 image.dcm -stgcmt -L DCMSND:11113 \n"
      + "=> Start listening on local port 11113 for receiving Storage Commitment "
      + "results, send DICOM object image.dcm to Application Entity STORESCP, "
      + "listening on local port 11112, and request Storage Commitment in same association.";
Mirth seems to be using the same API that is being used by this commandline tool.

Is this supposed to work this way? If so then the hint for these boxes saying 'local port that the client socket will be bound to' doesn't seem to be valid...

Also - is there a way to do what I'm trying to do? (sending a DICOM file to a PACS with the source port fixed to some configured value).

thank you,
best regards,
Michael Kostrzewa
Attached Images
File Type: png scr_453.png (72.5 KB, 8 views)
Reply With Quote
  #2  
Old 10-19-2017, 08:06 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,111
narupley is on a distinguished road
Default

Yeah, I think that tool-tip may be incorrect; would be worth creating a JIRA issue for.

If I remember correctly dcm4che's DcmSnd doesn't currently support setting the local port like that, but that's something we could modify for the purposes of Mirth Connect.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #3  
Old 06-24-2019, 12:22 PM
ejimenez ejimenez is offline
What's HL7?
 
Join Date: Nov 2013
Posts: 3
ejimenez is on a distinguished road
Default DICOM local port Problem

Hi. I'm having this problem too. Mirth 3.4.2.8129
Has it been fixed in a more recent version?

Quote:
Originally Posted by narupley View Post
Yeah, I think that tool-tip may be incorrect; would be worth creating a JIRA issue for.

If I remember correctly dcm4che's DcmSnd doesn't currently support setting the local port like that, but that's something we could modify for the purposes of Mirth Connect.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 05:39 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation