All notes
Dcm4ch

dcm4che

Get the dcm4che tk. In there you will find the binary dcmqr. Here is an example of how to move files from dcm4chee (or any PACS) to your local filesystem.

dcmqr -L LISTENER:11113 [email protected]:PACSPORT -cmove LISTENER -qModalitiesInStudy=CT-cstore CT -cstoredest .

# Queries studies from Feburary 4th 2006 on entity MYPACS at exampledomain.com listening on port 4040.
dcmqr [email protected]:4040 -qStudyDate=20060204

# Queries studies from Feburary 4th 2006 on entity MYPACS at exampledomain.com and executes a C-MOVE to the entity DCMRCV on all matches.
dcmqr [email protected]:4040 -qStudyDate=20060204 -cmove DCMRCV

# Query QRSCP:11112 for CT studies from Feb 4, 2006 and retrieves matching studies by C-MOVE to own Application Entity QRSCU:11113, storing received CT images and Grayscale Softcopy Presentation states to /tmp
dcmqr -L QRSCU:11113 [email protected]:11112 -cmove QRSCU -qStudyDate=20060204 -qModalitiesInStudy=CT -cstore CT -cstore PR:LE -cstoredest /tmp

# Sends a Series level Q/R which includes patient and other attributes using the -r option. While using the -r option, make sure not to have any overlap between any -r attributes and -q attributes. So if querying using StudyDate, make sure the command does not contain -r StudyDate or the query does not work
dcmqr -L QRSCU:11113 [email protected]:11112 -S -qStudyDate=20100521-20100521 -qStudyTime=001529-011529 -r PatientID -r PatientName -r PatientSex -r PatientBirthDate -r ModalitiesInStudy -r StudyDescription

DCM4CHEE

Installation

FAQ

JBOSS start failure, Caused by: javax.management.MBeanRegistrationException: preRegister() failed

JBossDeveloper. Your /etc/hosts should contain a mapping of your system IP address with the hostname.

Install dcm4chee

A lot of people run dcm4chee as a service (Windows, Unix, OSX), but may have not disabled the CONSOLE logging that is defined in dcm4chee/server/default/conf/jboss-log4j.xml. This will cause dcm4chee to write logs to both system.out as well as the log file. This will eat up a lot of space over time, because Unix systems will usually write the CONSOLE logging to syslog and Windows systems will write these log messages to out.txt. It could also siphon CPU cycles and IO channels from the system, especially under load.

If you're running dcm4chee as a service or daemon, be sure to turn off CONSOLE logging by commenting out or deleting the CONSOLE appender shown below (like what I've commented out):

<root> <!-- <appender-ref ref="CONSOLE"/> --> <appender-ref ref="FILE"/> </root>

web: http://localhost:8080/dcm4chee-web3
the JMX console: http://localhost:8080/jmx-console

Rename AETitle on DCM4CHEE

Ref.

  1. There are instructions for this at http://www.dcm4che.org/confluence/display/ee2/Installation. See step 12. You cannot just change the AE Title in the Application Entities tab of the web UI.
  2. If you look in the JMX console, you will see that there are a great many configuration parameters. DCM4CHEE appears several places. For example in "service=MoveScu", see the CalledAETitle and CallingAETitle parameters. All of these need to be changed.
  3. "service=AE" provides an operation to change them all at once. Near the bottom of the page, find this void updateAETitle(). Under "prevAET", type DCM4CHEE, Under "newAET", type NewName, Click Invoke.
  4. If you return to service=MoveScu, you should see the new AE Title.
  5. If you return to the web UI, you may still see the old AE Title. If so, use F5 to refresh the screen. The new title should appear.

dcm4che

# Query and retrieve from serverIP with AET=DCM4CHEE by cget protocal. Asks the server to send image data with presentation context of CT format and pixel representation is LE (Little Endianness), and save the retrieved images to "./".
dcmqr [email protected]:11112 -cget -cstore CT -cstore PR:LE -cstoredest ./

Compression in DCM4CHEE

DCM4CHEE will not perform any compression at Query/Retrieve, but bt Storage. This dicussion tells that it is because compress/decompression is CPU-costly, and storage is less frequent, and so only use compressiong on it. The workaround is to storage a compressed version on DCM4CHEE. While, when you Q/R with different compression Transfer Syntax, DCM4CHEE will still just uncompress the data and send it to you. See this page, at the "Optional: configure image compression" section.

DCM4CHEE mysql columns explanations.

Add SOP class UID

  1. Goto http://127.0.0.1:8080/jmx-console/
  2. Find service=StoreScp and click.
  3. Add the SOP class UID in "AcceptedOtherSOPClasses" column.
  4. Click "Apply Changes". Done.

FAQ

Install DCM4CHEE Archive 4

hc3i.cn.

Fail to cmove: log shows movescu client cmove-port sends no association response

Problem

Dcm4cheForum. The normal/successful log should look like this:

2015-08-05 17:36:14,402 INFO  -> (TCPServer-1-12) [org.dcm4cheri.server.ServerImpl] handle - Socket[addr=/192.168.10.20,port=40389,localport=11112]
2015-08-05 17:36:14,402 INFO  -> (TCPServer-1-12) [org.dcm4cheri.net.FsmImpl] Socket[addr=/192.168.10.20,port=40389,localport=11112]

2015-08-05 17:36:14,403 INFO  MOVESCU->PACS247 (TCPServer-1-12) [org.dcm4cheri.net.FsmImpl] received AAssociateRQ
2015-08-05 17:36:14,404 INFO  MOVESCU->PACS247 (TCPServer-1-12) [org.dcm4cheri.net.FsmImpl] sending AAssociateAC

2015-08-05 17:36:14,404 INFO  MOVESCU->PACS247 (TCPServer-1-12) [org.dcm4cheri.net.FsmImpl] received [pc-3] 1:C_MOVE_RQ with Dataset
2015-08-05 17:36:14,425 INFO  MOVESCU->PACS247 (Timer-2) [org.dcm4cheri.net.FsmImpl] sending [pc-3] 1:C_MOVE_RSP

(wcfNote: now a new thread is opened:)

2015-08-05 17:36:14,426 INFO  MOVESCU->PACS247 (Thread-6101) [org.dcm4cheri.net.FsmImpl] Socket[addr=/192.168.10.20,port=5101,localport=50041]

2015-08-05 17:36:14,426 INFO  PACS247->scu0201 (Thread-6101) [org.dcm4cheri.net.FsmImpl] sending AAssociateRQ
(------ wcfNote: yes, the problematic movescu client only reaches here ------)
2015-08-05 17:36:15,429 INFO  PACS247->scu0201 (Thread-6101) [org.dcm4cheri.net.FsmImpl] received AAssociateAC

2015-08-05 17:36:15,430 INFO  PACS247->scu0201 (Thread-6101) [org.dcm4cheri.net.FsmImpl] sending [pc-3] 1:C_STORE_RQ with Dataset
2015-08-05 17:36:15,430 INFO  PACS247->scu0201 (Thread-6101) [org.dcm4chex.archive.util.FileDataSource] M-READ file:/usr/local/dcm4chee/server/default/archive/2015/2/3/13/1E5BD944/11D4D035/11D4D04B
... ...
Comparing the failed log (a problematic client) and success log (a successful client), the failure is due to no response from CMOVE-port (5101 here) answering PACS's AAssociateRQ. And the PACS sees no AC in 10 seconds, and closes the connection, which results in the "OutOfResourcesSubOperations" error in movescu client.

Solution

In jmx-console: QueryRetrieveSCP, we could see that the AcceptTimeout defaults to 10000 ms (10s). Increase AcceptTimeout and DIMSETimeout by 10 times. Problem solved! Then the problem is, why the movescu client is so slow to give a response to server that triggers the timeout? We doubt that the little switch is the final culprit.