Issue with Orthanc – 3D Slicer DICOM Connection

I am currently trying to set up a DICOM connection between Orthanc and 3D Slicer on the same machine. I can query patient details successfully, but when I attempt to retrieve studies, I encounter authorization errors. The logs show:

DICOM authorization rejected for AET CTK on IP 127.0.0.1: This AET is not listed in configuration option “DicomModalities” Rejected Find request from remote DICOM modality with AET “CTK” and hostname “127.0.0.1”

My current Orthanc configuration for DICOM modalities is as follows:

“KnownAETs” : {
“CTK” : [ “127.0.0.1” ]
},
“DicomModalities” : {
“SLICER_LOCAL” : {
“AET” : “CTK”,
“Host” : “127.0.0.1”,
“Port” : 11112
}
},
“DicomAlwaysAllowEcho” : true,
“DicomAlwaysAllowStore” : true,
“DicomAlwaysAllowFind” : true,
“DicomAlwaysAllowMove” : true

Despite matching the AET and IP with the Slicer listener, Orthanc still rejects incoming requests from AET “CTK”.

Could you please advise on:

  1. Whether there are additional configuration settings I am missing to allow Orthanc to accept requests from 3D Slicer.

  2. Any known issues regarding AET recognition when both Orthanc and 3D Slicer are on the same machine.

  3. Recommended best practices for ensuring query/retrieve works reliably in this setup.

KnownAETs doesn’t exist, ChatGPT is not always your best friend. See official doc here: orthanc: 047f9bf24406 OrthancServer/Resources/Configuration.json

That’s also the location to see that the correct way to configure modalities is:

"DicomModalities" : {
"SLICER_LOCAL" : ["CTK", "127.0.0.1", 11112]
}
1 Like

Thank you for your suggestion. I have followed your instructions and added the AET to the DicomModalities section as you described. However, the same issue still persists.

When I perform a Query from 3D Slicer, no patient data is returned, and the Orthanc logs still show the same authorization error. Even though the AET and IP are correctly configured under DicomModalities, Orthanc continues to reject the request.

image

// Whether the Orthanc SCP allows incoming C-ECHO requests, even
// from SCU modalities it does not know about (i.e. that are not
// listed in the “DicomModalities” option above). Orthanc 1.3.0
// is the only version to behave as if this argument were set to “false”.
“DicomAlwaysAllowEcho” : true,

// Whether the Orthanc SCP allows incoming C-STORE requests, even
// from SCU modalities it does not know about (i.e. that are not
// listed in the “DicomModalities” option above)
“DicomAlwaysAllowStore” : true,

// Whether the Orthanc SCP allows incoming C-FIND requests, even
// from SCU modalities it does not know about (i.e. that are not
// listed in the “DicomModalities” option above). Setting this
// option to “true” implies security risks. (new in Orthanc 1.9.0)
// Note: From Orthanc 1.10.0, this option only applies to C-FIND
// requests for patients/studies/series/instances. Use option
// “DicomAlwaysAllowFindWorklist” for worklists.
“DicomAlwaysAllowFind” : true,

// Whether the Orthanc SCP allows incoming C-FIND requests for worklists,
// even from SCU modalities it does not know about (i.e. that are not
// listed in the “DicomModalities” option above). Setting this
// option to “true” implies security risks. (new in Orthanc 1.10.0)
“DicomAlwaysAllowFindWorklist” : false,

// Whether the Orthanc SCP allows incoming C-GET requests, even
// from SCU modalities it does not know about (i.e. that are not
// listed in the “DicomModalities” option above). Setting this
// option to “true” implies security risks. (new in Orthanc 1.9.0)
“DicomAlwaysAllowGet” : false,

// Whether the Orthanc SCP allows incoming C-MOVE requests, even
// from SCU modalities it does not know about (i.e. that are not
// listed in the “DicomModalities” option above). Setting this
// option to “true” implies security risks. (new in Orthanc 1.9.7)
“DicomAlwaysAllowMove” : true,

// Whether Orthanc checks the IP/hostname address of the remote
// modality initiating a DICOM connection (as listed in the
// “DicomModalities” option above). If this option is set to
// “false”, Orthanc only checks the AET of the remote modality.
“DicomCheckModalityHost” : false,

/**

  • Network topology
    **/

// The list of the known DICOM modalities. This option is ignored if
// “DicomModalitiesInDatabase” is set to “true”, in which case you
// must use the REST API to define modalities.
“DicomModalities” : {
“SLICER_LOCAL” : [“CTKSTORE”, “127.0.0.1”, 11112]
}
/**
* Uncommenting the following line would enable Orthanc to
* connect to an instance of the “storescp” open-source DICOM
* store (shipped in the DCMTK distribution), as started by the
* command line “storescp 2000”. The first parameter is the
* AET of the remote modality (cannot be longer than 16
* characters), the second one is the remote network address,
* and the third one is the TCP port number corresponding
* to the DICOM protocol on the remote modality (usually 104).
**/
// “sample” : [ “STORESCP”, “127.0.0.1”, 2000 ]

/**
 * A fourth parameter is available to enable patches for
 * specific PACS manufacturers. The allowed values are currently:
 * - "Generic" (default value),
 * - "GenericNoWildcardInDates" (to replace "*" by "" in date fields 
 *   in outgoing C-FIND requests originating from Orthanc),
 * - "GenericNoUniversalWildcard" (to replace "*" by "" in all fields
 *   in outgoing C-FIND SCU requests originating from Orthanc),
 * - "Vitrea",
 * - "GE" (Enterprise Archive, MRI consoles and Advantage Workstation
 *   from GE Healthcare).
 *
 * This parameter is case-sensitive.
 **/
// "vitrea" : [ "VITREA", "192.168.1.1", 104, "Vitrea" ]

/**
 * By default, the Orthanc SCP accepts all DICOM commands (C-ECHO,
 * C-STORE, C-FIND, C-MOVE, C-GET and storage commitment) issued by the
 * registered remote SCU modalities. Starting with Orthanc 1.5.0,
 * it is possible to specify which DICOM commands are allowed,
 * separately for each remote modality, using the syntax
 * below.
 *
 * The "AllowEcho" (resp.  "AllowStore") option only has an effect
 * respectively if global option "DicomAlwaysAllowEcho"
 * (resp. "DicomAlwaysAllowStore") is set to "false".
 *
 * Starting with Orthanc 1.7.0, "AllowTranscoding" can be used to
 * disable the transcoding to uncompressed transfer syntaxes if
 * this remote modality doesn't support compressed transfer
 * syntaxes. This option currently applies to Orthanc C-GET SCP
 * and to Orthanc C-STORE SCU. This option only has an effect if
 * the global option "EnableTranscoding" is set to "true".
 *
 * By default, all "Allow*" options are true.
 * "AllowStorageCommitment" is actually an alias for 
 * "AllowNAction" & "AllowEventReport".
 * 
 * The "UseDicomTls" option specifies whether DICOM TLS should be
 * used when opening a SCU connection from Orthanc to this remote
 * modality. By default, DICOM TLS is not enabled.
 *
 * The "LocalAet" option allows one to overwrite the global
 * "DicomAet" configuration option in order to specify another AET
 * for Orthanc when initiating an SCU to this very specific
 * modality. Similarly, "Timeout" allows one to overwrite the
 * global value "DicomScuTimeout" on a per-modality basis.
 *
 * The "RetrieveMethod" option allows one to overwrite the global
 * "DicomDefaultRetrieveMethod" configuration option for this
 * specific modality. (Allowed values: "C-MOVE" or "C-GET").
 **/
//"untrusted" : {
//  "AET" : "ORTHANC",
//  "Port" : 104,
//  "Host" : "127.0.0.1",
//  "Manufacturer" : "Generic",
//  "AllowEcho" : false,
//  "AllowFind" : false,
//  "AllowFindWorklist" : false,       // new in 1.10.0
//  "AllowGet"  : false,
//  "AllowMove" : false,
//  "AllowStore" : true,
//  "AllowStorageCommitment" : false,  // new in 1.6.0
//  "AllowTranscoding" : true,         // new in 1.7.0
//  "UseDicomTls" : false,             // new in 1.9.0
//  "LocalAet" : "HELLO",              // new in 1.9.0
//  "Timeout" : 60,                    // new in 1.9.1
//  "RetrieveMethod": "C-MOVE"         // new in 1.12.6
//}

},

Same for me, Orthanc needs a user/password or a token authentication. Slicer allows to define neither of them, it assumes promiscuous mode in nginx. Even the DicomWeb Plugin is this way, no way to define the authorization.

You should check that your configuration file is correctly taken into account by calling http://localhost:8042/modalities?expand to check the registered modalities.

that’s not the problem

locally :

$ curl http://localhost:8042/modalities?expand -u orthanc
Enter host password for user 'orthanc':
{
   "MICRODICOM" :
   {
      "AET" : "MICRODICOM",
      "AllowEcho" : true,
      "AllowEventReport" : true,
      "AllowFind" : true,
      "AllowFindWorklist" : true,
      "AllowGet" : true,
      "AllowMove" : true,
      "AllowNAction" : true,
      "AllowStore" : true,
      "AllowTranscoding" : true,
      "Host" : "x.x.x.x",
      "LocalAet" : "",
      "Manufacturer" : "Generic",
      "Port" : 50000,
      "RetrieveMethod" : "SystemDefault",
      "Timeout" : 0,
      "UseDicomTls" : false
   },

remote

> curl.exe -v https://pacs.biomediqa.com:8042/modalities?expand
* Host pacs.biomediqa.com:8042 was resolved.
* IPv6: (none)
* IPv4: x.x.x.x
*   Trying x.x.x.x:8042...
* connect to x.x.x.x port 8042 from 0.0.0.0 port 51875 failed: Connection refused
* Failed to connect to pacs.biomediqa.com port 8042 after 2103 ms: Could not connect to server
* closing connection #0
curl: (7) Failed to connect to pacs.biomediqa.com port 8042 after 2103 ms: Could not connect to server

And keep in mind that Slicer cannot do the -u option

Of course ! I was not responding to your message. You have not described your problem in details and you seem to talk about HTTP connections. Start a new topic if you have a different problem !

Setting up external modalities or peers in my orthanc server - General - Orthanc Users

and my conf is in

Setting up my Orthanc Pacs server - General - Orthanc Users

Hello,

Here is a minimal configuration file of Orthanc for 3D Slicer:

{
  "DicomModalities" : {
    "slicer" : [ "CTKSTORE", "127.0.0.1", 11112 ]
  }
}

And this is how you should configure 3D Slicer given this Orthanc configuration:

You must start the “storage listener”, otherwise the next step won’t work. Note that you can ask 3D Slicer to automatically start this “storage listener” at startup. Next, you can run a query/retrieve as follows:

Regards,
Sébastien-

How can Slicer connect through port 4242 if it is not even open in the configuration nor in the firewall?

Also, the "127.0.0.1” IP is localhost, so this configuration I assume won’t work remote

Hello,

4242 is the default TCP port on which Orthanc listens for incoming DICOM connections. Check out the documentation.

Check out the first line of the original post: “I am currently trying to set up a DICOM connection between Orthanc and 3D Slicer on the same machine.”

Regards,
Sébastien-