Performance Issues

I am currently working on setting up an Orthanc server (via Docker) with the OHIF Viewer. However after importing 54GB of images, accessing the images via the OHIF Viewer became very slow (~27 seconds). I tried to use PostgreSQL as per the Performance Issues FAQ page and some of the other posts here, but the loading has not improved.

I’m guessing this is an issue with the viewer talking to Orthanc, since using the built-in Orthanc viewer works fine to look at the images even with a 54GB SQLite database. Erik Ziegler over at OHIF mentioned it’s probably an issue with the DICOMWeb plugin? He recommended using Orthanc with DIMSE and only retrieve images via WADO-URI, but I’m having trouble implementing it. Any suggestions for this?

This documentation seems like it doesn’t work with docker:
https://github.com/OHIF/Viewers/wiki/Orthanc-with-DIMSE

The thread I opened with OHIF:
https://github.com/OHIF/Viewers/issues/234

Hello,

The Orthanc core team does not provide support related to OHIF viewer.

Please provide a way to reproduce this performance issue in Orthanc, independently of OHIF, e.g. by using “curl” commands.

Regards,
Sébastien-

Trouble performing a Query:
curl -u orthanc:orthanc --request POST --url http://localhost:8042/modalities/ohif/query  \
 --data '{"Level":"Study","Query": {"PatientID":"","StudyDescription":"","PatientName":""}}'

The above code is returning

{

“HttpError” : “Not Found”,

“HttpStatus” : 404,

“Message” : “Accessing an inexistent item”,

“Method” : “POST”,

“OrthancError” : “Accessing an inexistent item”,

“OrthancStatus” : 7,

“Uri” : “/modalities/sample/query”

}

I looked at modalities and realized it was saved as “ohif” for some reason. Ran it again:

Sorry first command should read: curl -u orthanc:orthanc --request POST --url http://localhost:8042/modalities/sample/query --data ‘{“Level”:“Study”,“Query”: {“PatientID”:“”,“StudyDescription”:“”,“PatientName”:“”}}’

Hello,

I looked at modalities and realized it was saved as “ohif” for some reason. Ran it again:

$ curl -u orthanc:orthanc --request POST --url http://localhost:8042/modalities/ohif/query --data ‘{“Level”:“Study”,“Query”: {“PatientID”:“”,“StudyDescription”:“”,“PatientName”:“”}}’

{

“HttpError” : “Internal Server Error”,

“HttpStatus” : 500,

“Message” : “Error in the network protocol”,

“Method” : “POST”,

“OrthancError” : “Error in the network protocol”,

“OrthancStatus” : 9,

“Uri” : “/modalities/ohif/query”

}

Just tested, and this request works fine.

You most probably have not defined the “local” Orthanc modality, in the “DicomModalities” configuration option of the “OHIF” modality. The DICOM protocol is inherently symmetric, and query/retrieve requires the communicating modalities to know each other. If the “local” Orthanc modality has not the declared in the remote “OHIF” modality, you’ll see the following error in the logs of the “local” Orthanc:

$ ./Orthanc Configuration.json --verbose

[…]

W0725 15:05:29.460368 main.cpp:667] Orthanc has started
I0725 15:05:52.735352 MongooseServer.cpp:755] POST /modalities/ohif/query
I0725 15:05:52.738754 DicomUserConnection.cpp:928] Opening a DICOM SCU connection from AET “ORTHANC” to AET “ORTHANC” on host 127.0.0.1:4243 (manufacturer: Generic)
E0725 15:05:52.830978 DicomUserConnection.cpp:167] DicomUserConnection: Peer aborted Association (or never connected)

And in the remote “OHIF” Orthanc:

$ ./Orthanc Configuration.json
[…]

W0725 15:06:46.164761 main.cpp:667] Orthanc has started
W0725 15:07:05.789412 OrthancInitialization.cpp:851] Modality “ORTHANC” is not listed in the “DicomModalities” configuration option
W0725 15:07:05.789487 CommandDispatcher.cpp:812] Rejected Find request from remote DICOM modality with AET “ORTHANC” and hostname “127.0.0.1”

More explanation is available in the Orthanc Book:

http://book.orthanc-server.com/dicom-guide.html#dicom-move

The Orthanc logs are pretty self-explanatory. Please make sure to carefully read the logs on such problems:
http://book.orthanc-server.com/faq/log.html