如何使用dcm4che3 movescu查询PACS服务器使用AccessionNumber?

时间:2018-01-22 02:48:05

标签: java dicom dcm4che

我试图使用命令:

movescu -b MOVESCU:11133 -c AE_ARCH1@192.168.2.63:104 --dest MOVESCU -m AccessionNumber=ZH171217DR027

它找不到任何东西,我确定会有结果。

使用" movescu -b MOVESCU:11133 -c AE_ARCH1@192.168.2.63:104 --dest MOVESCU -m StudyInstanceUID=1.2.840.113619.186.1441772842175112.20180117144250009.393"它 工作得很好。

使用" movescu -b MOVESCU:11133 -c AE_ARCH1@192.168.2.63:104 --dest MOVESCU -m AccessionNumber=ZH171217DR027"日志:

    E:\dcm4che-5.11.0\bin>movescu  -b MOVESCU:11133 -c AE_ARCH1@192.168.2.63:104   -
-dest MOVESCU    -m AccessionNumber=ZH171217DR027
19:39:19,102 INFO  - Initiate connection from 0.0.0.0/0.0.0.0:0 to 192.168.2.63:
104
19:39:19,117 INFO  - Established connection Socket[addr=/192.168.2.63,port=104,l
ocalport=8028]
19:39:19,117 DEBUG - /172.16.23.232:8028->/192.168.2.63:104(1): enter state: Sta
4 - Awaiting transport connection opening to complete
19:39:19,133 INFO  - MOVESCU->AE_ARCH1(1) << A-ASSOCIATE-RQ
19:39:19,148 DEBUG - A-ASSOCIATE-RQ[
  calledAET: AE_ARCH1
  callingAET: MOVESCU
  applicationContext: 1.2.840.10008.3.1.1.1 - DICOM Application Context Name
  implClassUID: 1.2.40.0.13.1.3
  implVersionName: dcm4che-5.11.0
  maxPDULength: 16378
  maxOpsInvoked/maxOpsPerformed: 0/0
  PresentationContext[id: 1
    as: 1.2.840.10008.5.1.4.1.2.2.2 - Study Root Query/Retrieve Information Mode
l - MOVE
    ts: 1.2.840.10008.1.2 - Implicit VR Little Endian
    ts: 1.2.840.10008.1.2.1 - Explicit VR Little Endian
    ts: 1.2.840.10008.1.2.2 - Explicit VR Big Endian (Retired)
  ]
]
19:39:19,148 DEBUG - MOVESCU->AE_ARCH1(1): enter state: Sta5 - Awaiting A-ASSOCI
ATE-AC or A-ASSOCIATE-RJ PDU
19:39:19,164 INFO  - MOVESCU->AE_ARCH1(1) >> A-ASSOCIATE-AC
19:39:19,195 DEBUG - A-ASSOCIATE-AC[
  calledAET: AE_ARCH1
  callingAET: MOVESCU
  applicationContext: 1.2.840.10008.3.1.1.1 - DICOM Application Context Name
  implClassUID: 1.2.528.1.1001.2.800.5.0.3020.0
  implVersionName: EA 5.0.3020.0
  maxPDULength: 16384
  maxOpsInvoked/maxOpsPerformed: 0/1
  PresentationContext[id: 1
    result: 0 - acceptance
    ts: 1.2.840.10008.1.2.1 - Explicit VR Little Endian
  ]
]
19:39:19,195 DEBUG - MOVESCU->AE_ARCH1(1): enter state: Sta6 - Association estab
lished and ready for data transfer
19:39:19,195 INFO  - MOVESCU->AE_ARCH1(1) << 1:C-MOVE-RQ[pcid=1, prior=0
  cuid=1.2.840.10008.5.1.4.1.2.2.2 - Study Root Query/Retrieve Information Model
 - MOVE
  tsuid=1.2.840.10008.1.2.1 - Explicit VR Little Endian
19:39:19,226 DEBUG - Command:
(0000,0002) UI [1.2.840.10008.5.1.4.1.2.2.2] AffectedSOPClassUID
(0000,0100) US [33] CommandField
(0000,0110) US [1] MessageID
(0000,0600) AE [MOVESCU] MoveDestination
(0000,0700) US [0] Priority
(0000,0800) US [0] CommandDataSetType

19:39:19,242 DEBUG - Dataset:
(0008,0050) SH [ZH171217DR027] AccessionNumber
(0008,0052) CS [STUDY] QueryRetrieveLevel

19:39:19,258 INFO  - MOVESCU->AE_ARCH1(1) >> 1:C-MOVE-RSP[pcid=1, status=120H
  cuid=1.2.840.10008.5.1.4.1.2.2.2 - Study Root Query/Retrieve Information Model
 - MOVE
  tsuid=1.2.840.10008.1.2.1 - Explicit VR Little Endian
19:39:19,258 DEBUG - Command:
(0000,0002) UI [1.2.840.10008.5.1.4.1.2.2.2] AffectedSOPClassUID
(0000,0100) US [32801] CommandField
(0000,0120) US [1] MessageIDBeingRespondedTo
(0000,0800) US [257] CommandDataSetType
(0000,0900) US [288] Status

19:39:19,258 INFO  - MOVESCU->AE_ARCH1(1) << A-RELEASE-RQ
19:39:19,258 DEBUG - MOVESCU->AE_ARCH1(1): enter state: Sta7 - Awaiting A-RELEAS
E-RP PDU
19:39:19,258 INFO  - MOVESCU->AE_ARCH1(1) >> A-RELEASE-RP
19:39:19,258 INFO  - MOVESCU->AE_ARCH1(1): close Socket[addr=/192.168.2.63,port=
104,localport=8028]
19:39:19,258 DEBUG - MOVESCU->AE_ARCH1(1): enter state: Sta1 - Idle

使用&#34; movescu -b MOVESCU:11133 -c AE_ARCH1@192.168.2.63:104 -dest MOVESCU -m StudyInstanceUID = 1.2.840.113619.186.1441772842175112.20180117144250009.393&#34;记录:

19:46:31,536 INFO  - Initiate connection from 0.0.0.0/0.0.0.0:0 to 192.168.2.63:
104
19:46:31,552 INFO  - Established connection Socket[addr=/192.168.2.63,port=104,l
ocalport=8094]
19:46:31,552 DEBUG - /172.16.23.232:8094->/192.168.2.63:104(1): enter state: Sta
4 - Awaiting transport connection opening to complete
19:46:31,552 INFO  - MOVESCU->AE_ARCH1(1) << A-ASSOCIATE-RQ
19:46:31,568 DEBUG - A-ASSOCIATE-RQ[
  calledAET: AE_ARCH1
  callingAET: MOVESCU
  applicationContext: 1.2.840.10008.3.1.1.1 - DICOM Application Context Name
  implClassUID: 1.2.40.0.13.1.3
  implVersionName: dcm4che-5.11.0
  maxPDULength: 16378
  maxOpsInvoked/maxOpsPerformed: 0/0
  PresentationContext[id: 1
    as: 1.2.840.10008.5.1.4.1.2.2.2 - Study Root Query/Retrieve Information Mode
l - MOVE
    ts: 1.2.840.10008.1.2 - Implicit VR Little Endian
    ts: 1.2.840.10008.1.2.1 - Explicit VR Little Endian
    ts: 1.2.840.10008.1.2.2 - Explicit VR Big Endian (Retired)
  ]
]
19:46:31,568 DEBUG - MOVESCU->AE_ARCH1(1): enter state: Sta5 - Awaiting A-ASSOCI
ATE-AC or A-ASSOCIATE-RJ PDU
19:46:31,583 INFO  - MOVESCU->AE_ARCH1(1) >> A-ASSOCIATE-AC
19:46:31,646 DEBUG - A-ASSOCIATE-AC[
  calledAET: AE_ARCH1
  callingAET: MOVESCU
  applicationContext: 1.2.840.10008.3.1.1.1 - DICOM Application Context Name
  implClassUID: 1.2.528.1.1001.2.800.5.0.3020.0
  implVersionName: EA 5.0.3020.0
  maxPDULength: 16384
  maxOpsInvoked/maxOpsPerformed: 0/1
  PresentationContext[id: 1
    result: 0 - acceptance
    ts: 1.2.840.10008.1.2.1 - Explicit VR Little Endian
  ]
]
19:46:31,646 DEBUG - MOVESCU->AE_ARCH1(1): enter state: Sta6 - Association estab
lished and ready for data transfer
19:46:31,646 INFO  - MOVESCU->AE_ARCH1(1) << 1:C-MOVE-RQ[pcid=1, prior=0
  cuid=1.2.840.10008.5.1.4.1.2.2.2 - Study Root Query/Retrieve Information Model
 - MOVE
  tsuid=1.2.840.10008.1.2.1 - Explicit VR Little Endian
19:46:31,677 DEBUG - Command:
(0000,0002) UI [1.2.840.10008.5.1.4.1.2.2.2] AffectedSOPClassUID
(0000,0100) US [33] CommandField
(0000,0110) US [1] MessageID
(0000,0600) AE [MOVESCU] MoveDestination
(0000,0700) US [0] Priority
(0000,0800) US [0] CommandDataSetType

19:46:31,692 DEBUG - Dataset:
(0008,0052) CS [STUDY] QueryRetrieveLevel
(0020,000D) UI [1.2.840.113619.186.1441772842175112.20180117144250009.393] Stu

19:46:36,762 INFO  - MOVESCU->AE_ARCH1(1) >> 1:C-MOVE-RSP[pcid=1, status=0H
  cuid=1.2.840.10008.5.1.4.1.2.2.2 - Study Root Query/Retrieve Information Model
 - MOVE
  tsuid=1.2.840.10008.1.2.1 - Explicit VR Little Endian
19:46:36,762 DEBUG - Command:
(0000,0002) UI [1.2.840.10008.5.1.4.1.2.2.2] AffectedSOPClassUID
(0000,0100) US [32801] CommandField
(0000,0120) US [1] MessageIDBeingRespondedTo
(0000,0800) US [257] CommandDataSetType
(0000,0900) US [0] Status

19:46:36,840 INFO  - MOVESCU->AE_ARCH1(1) << A-RELEASE-RQ
19:46:36,840 DEBUG - MOVESCU->AE_ARCH1(1): enter state: Sta7 - Awaiting A-RELEAS
E-RP PDU
19:46:36,840 INFO  - MOVESCU->AE_ARCH1(1) >> A-RELEASE-RP
19:46:36,840 INFO  - MOVESCU->AE_ARCH1(1): close Socket[addr=/192.168.2.63,port=
104,localport=8094]
19:46:36,840 DEBUG - MOVESCU->AE_ARCH1(1): enter state: Sta1 - Idle

不同的地方是:

19:39:19,258 INFO  - MOVESCU->AE_ARCH1(1) >> 1:C-MOVE-RSP[pcid=1, status=120H
  cuid=1.2.840.10008.5.1.4.1.2.2.2 - Study Root Query/Retrieve Information Model
 - MOVE
  tsuid=1.2.840.10008.1.2.1 - Explicit VR Little Endian
19:39:19,258 DEBUG - Command:
(0000,0002) UI [1.2.840.10008.5.1.4.1.2.2.2] AffectedSOPClassUID
(0000,0100) US [32801] CommandField
(0000,0120) US [1] MessageIDBeingRespondedTo
(0000,0800) US [257] CommandDataSetType
(0000,0900) US [288] Status

 19:46:36,762 INFO  - MOVESCU->AE_ARCH1(1) >> 1:C-MOVE-RSP[pcid=1, status=0H
      cuid=1.2.840.10008.5.1.4.1.2.2.2 - Study Root Query/Retrieve Information Model
     - MOVE
      tsuid=1.2.840.10008.1.2.1 - Explicit VR Little Endian
    19:46:36,762 DEBUG - Command:
    (0000,0002) UI [1.2.840.10008.5.1.4.1.2.2.2] AffectedSOPClassUID
    (0000,0100) US [32801] CommandField
    (0000,0120) US [1] MessageIDBeingRespondedTo
    (0000,0800) US [257] CommandDataSetType
    (0000,0900) US [0] Status

C-MOVE-RSP返回值状态= 0H或状态= 120H我无法找到意义,而(0000,0900)[288]可能会丢失参数

我使用dcm4che2&#34; dcmqr -L MOVESCU AE_ARCH1@192.168.2.63:104 -qAccessionNumber=ZH171231DR039 -cmove MOVESCU&#34;它的工作

如何使用dcm4che3 movescu查询PACS服务器使用AccessionNumber?

2 个答案:

答案 0 :(得分:2)

我不太了解dcm4chee。但是在DICOM中,您按入藏号移动的请求不符合要求,因此我怀疑这会导致您的问题。在DICOM中,您将放置一个STUDY-Level C-FIND 请求,以搜索与入藏号匹配的研究实例UID,然后为随后匹配的每项研究执行C-MOVE。

答案 1 :(得分:0)

正如@kritzel_sw指出的那样,除了实例UID值之外的其他任何事情都不符合标准。

我还在dcm4che3 source code on Github中找到了状态代码120H。

/**
 * Failure: missing Attribute (120H): a required Attribute was not 
 * supplied.
 * Used in N-CREATE-RSP.
 * May contain:
 *   Modification List/Attribute List (no tag)
 */
public static final int MissingAttribute                   = 0x0120;

看起来它不应该在C-MOVE-RSP中使用,但它有意义 - 请求中缺少必要的UID属性。

它与dcmqr一起使用的原因正是如此,它首先执行C-FIND,然后执行基于C-FIND结果的C-MOVE。 dcm4che3实用程序是严格分离的C-FIND和C-MOVE工具。