Adding multiple DICOM modalities

Right now I have Horos added as a a known DICOM modality but when I try to add others, such as Keiron, it doesn’t restart because the configuration file doesn’t follow the JSON sytanx. I added the Keiron parameters the same exact same format as Horos. I’m trying to add them as alternate viewers. Any help would be greatly appreciated thanks.

Right now I have Horos added as a a known DICOM modality but when I try
to add others, such as Keiron, it doesn't restart because the
configuration file doesn't follow the JSON sytanx. I added the Keiron
parameters the same exact same format as Horos. I'm trying to add them
as alternate viewers. Any help would be greatly appreciated thanks.

Indeed that's a common mistake. As a general rule whitespace in JSON[1]
is insignificant (that includes new lines); values in arrays and
name/value pairs in objects are always separated by commas instead.

1: https://json.org/

Thanks that worked, but now when I try to query through the Keiron app orthanc says that the modality isn’t part of the modalities configuration.

W0803 11:11:57.267938 OrthancInitialization.cpp:845] Modality “KEIRON” is not listed in the “DicomModalities” configuration option

W0803 11:11:57.267973 CommandDispatcher.cpp:812] Rejected Find request from remote DICOM modality with AET “KEIRON” and hostname “192.168.168.202”

configOSX.json (9.96 KB)

Interesting. Can you post the full JSON contents and confirm you
reloaded the configuration file? (Simply restarting the Orthanc process
will also work.)

I attached the JSON file, and already restarted it thats how I realized that the comma was the fix.

Also the Horos query and retrieval works fine.

OK. Unfortunately I can't see it, it could have been stripped by the
mailing list reflector.

Following is a log of a test run of a dicom-association sample setup.

https://bitbucket.org/osimis/orthanc-setup-samples/src/master/docker/dicom-association/

I'm not immediately sure how to help you further; maybe you can attempt
to reproduce the issue within this test environment (adding multiple
modalities with similar names and such).

$ docker-compose up -d
Creating network "dicomassociation_default" with the default driver
Creating dicomassociation_orthanc-bar_1 ... done
Creating dicomassociation_orthanc-foo_1 ... done
$ host=${DOCKER_HOST%:*}
$ find ~/Pictures/sample-dicom/small-set -name '*.dcm' -exec sh -c
"http $host/instances <'{}' | jq --raw-output .ID" ';'
7bb100d8-78657172-356296cb-48983ee9-e5185d46
163c43b7-84e6ed46-8f0a18e8-20b7893b-96a070e2
08bf0130-0d3d1b1d-1cbbd1d4-98a79184-a93eea75
e80a0e56-f6f0c889-c2f6f255-fb3bb654-d74c8d33
1813223c-f10ff9a5-955d9474-b99ec961-2b23462a
29bbcdbe-bb7fe717-3432f59f-d88be9b3-7d197e80
b6df0ee7-bb46c576-9c23ea63-7e336b52-52ecc4f1
41598033-aa0b0168-60914f79-1cd20474-4175c335
1abdee54-9bdf3573-6d0204ef-76502fbf-d48c0d3b
e16accdd-561117f2-c5d26638-80a58c32-2cdd6dcc
7c92ce8e-bbf67ed2-ffa3b8c1-a3b35d94-7ff3ae26
48386f50-86385e69-183c81a0-21e4720b-67a10f8f
636bd1e4-d1e9b806-2e91d24a-d298ecd5-18fbfa3e
dc1dc991-d095027b-988cbe72-06848edc-8c42ef38
619213d6-7115f549-b0c9a32c-916e340b-45e8fa0e
97b61d9a-edaa82fe-78d24795-c43edab4-3bc917f8
3ca86d6a-2753d0c8-7c6e6cff-45d259dc-0b49c9d8
ff7b4ae9-ed3465f0-e5b41f04-0620305c-a04fb1be
$ http $host/studies
HTTP/1.1 200 OK
Content-Encoding: gzip
Content-Length: 103
Content-Type: application/json; charset=utf-8

[
    "52e28c1f-35e8e518-d1ec6490-aa61885e-1fe5ff3f",
    "0dff9280-2375f586-1297870c-4cbd6d1c-527e36e5"
]

$ http $host:81/studies
HTTP/1.1 200 OK
Content-Encoding: gzip
Content-Length: 23
Content-Type: application/json; charset=utf-8

[]

$ http $host/system | jq .DicomAet
"FOO"
$ http $host:81/system | jq
.DicomAet
"BAR"
$ http $host/modalities
HTTP/1.1 200 OK
Content-Encoding: gzip
Content-Length: 30
Content-Type: application/json; charset=utf-8

[
    "bar"
]

$ http $host/modalities/bar/store <<<52e28c1f-35e8e518-d1ec6490-
aa61885e-1fe5ff3f
HTTP/1.1 200 OK
Content-Encoding: gzip
Content-Length: 22
Content-Type: application/json

{}

$ http $host:81/studies
HTTP/1.1 200 OK
Content-Encoding: gzip
Content-Length: 71
Content-Type: application/json; charset=utf-8

[
    "52e28c1f-35e8e518-d1ec6490-aa61885e-1fe5ff3f"
]

Ok I’ll try that, I’ll also try and attach the file again.

configOSX.json (9.96 KB)

The attachment went through.

From the Orthanc logs you posted earlier, I gather that you may have

inverted the Orthanc modality name and the AET since Orthanc clearly
receives a request from a calling AET of "KEIRON".

   Rejected Find request from remote DICOM modality with AET "KEIRON"
   and hostname "192.168.168.202"

--- configOSX.json.old 2018-08-03 18:32:12.025979250 +0200
+++ configOSX.json.new 2018-08-03 18:33:18.254957184 +0200
@@ -146,7 +146,7 @@
      * command line "storescp 2000".
      **/
      "Ultrasound-Remot": [ "Ultrasound-Remot", "192.168.168.31", 11112
],
- "KEIRON": [ "Ipad2", "192.168.168.202", 12345 ]
+ "Ipad2": [ "KEIRON", "192.168.168.202", 12345 ]

     /**
      * A fourth parameter is available to enable patches for a

So that worked thanks, but now when I try and download the images onto keiron, I get a rejected move request error.

W0803 13:04:53.050158 OrthancInitialization.cpp:845] Modality “Ipad2” is not listed in the “DicomModalities” configuration option

W0803 13:04:53.050204 CommandDispatcher.cpp:812] Rejected Move request from remote DICOM modality with AET “Ipad2” and hostname “192.168.168.202”

Can't say for sure but it feels like your modality can be configured
with different AETs (possibly per operation-type or something).

Either way Orthanc reports that this modality sometimes answers with
the AET Ipad2 and sometimes KEIRON; this doesn't seem directly related
to Orthanc.

I could be wrong of course, maybe somebody else had a better idea.

Sounds like maybe C-Find is using a different modlity name then when you send images. A lazy way to do it is define both:

"Ipad2": [ "Ipad2", "192.168.168.202", 12345 ],