storescp -xcs does nothing when used with the --fork option

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
mikota
Posts: 6
Joined: Mon, 2006-02-27, 17:24
Location: Linz, Austria

storescp -xcs does nothing when used with the --fork option

#1 Post by mikota »

I am using this version of storescp:

$dcmtk: storescp v3.6.1 2011-07-07 $
storescp: DICOM storage (C-STORE) SCP
Host type: x86_64-unknown-linux-gnu
External libraries used: none


I am starting storescp with the --fork option to act as a dicom gateway. this -xcs option calls a external script for postprocessing the study.

This works fine when the --fork option is not given but storescp does nothing when the --fork option is given.

example:

[root@gateway]$ storescp --fork -od /project/gateway//images/GW_TEST -dhl -ss study -xcs './transfer.pl GW_TEST #p #a #c' -tos 5 5099

Any ideas?

Thanks in advance!

Michael Onken
DCMTK Developer
Posts: 2049
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#2 Post by Michael Onken »

Hi,

is there any error message? What is the output if you enable debug mode (-d) in storescp?

Michael

mikota
Posts: 6
Joined: Mon, 2006-02-27, 17:24
Location: Linz, Austria

#3 Post by mikota »

Hi Michael!

Please find here the debug messages. There is no reaction with the --fork option

Code: Select all

[gateway@LUNXXX gateway]$  bin/gateway --fork -od /project/gateway//images/GW_TEST -dhl -ss study -xcs './transfer_test.pl GW_TEST #p #a #c' 5099 -tos 5 -d
D: $dcmtk: storescp v3.6.1 2011-07-07 $
D:
D: DcmDataDictionary: Loading file: /usr/local/share/dcmtk/dicom.dic
D: setting network receive timeout to 60 seconds
D: PDU Type: Associate Request, PDU Length: 329 + 6 bytes PDU header
:
:
D: Parsing an A-ASSOCIATE PDU
I: Association Received in child process (pid: 9585)
D: Parameters:
D: ====================== BEGIN A-ASSOCIATE-RQ =====================
D: Our Implementation Class UID:      1.2.276.0.7230010.3.0.3.6.1
D: Our Implementation Version Name:   OFFIS_DCMTK_361
D: Their Implementation Class UID:    1.2.804.114118.3
D: Their Implementation Version Name: eFilm
D: Application Context Name:    1.2.840.10008.3.1.1.1
D: Calling Application Name:    LPC10007
D: Called Application Name:     LUNXXX
D: Responding Application Name:
D: Our Max PDU Receive Size:    16384
D: Their Max PDU Receive Size:  64234
D: Presentation Contexts:
D:   Context ID:        1 (Proposed)
D:     Abstract Syntax: =ComputedRadiographyImageStorage
D:     Proposed SCP/SCU Role: SCU
D:     Proposed Transfer Syntax(es):
D:       =LittleEndianImplicit
D:   Context ID:        3 (Proposed)
D:     Abstract Syntax: =ComputedRadiographyImageStorage
D:     Proposed SCP/SCU Role: SCU
D:     Proposed Transfer Syntax(es):
D:       =LittleEndianExplicit
D:       =BigEndianExplicit
D:       =LittleEndianImplicit
D: Requested Extended Negotiation: none
D: Accepted Extended Negotiation:  none
D: Requested User Identity Negotiation: none
D: User Identity Negotiation Response:  none
D: ======================= END A-ASSOCIATE-RQ ======================
D: Constructing Associate AC PDU
I: Association Acknowledged (Max Send PDV: 64222)
D: ====================== BEGIN A-ASSOCIATE-AC =====================
D: Our Implementation Class UID:      1.2.276.0.7230010.3.0.3.6.1
D: Our Implementation Version Name:   OFFIS_DCMTK_361
D: Their Implementation Class UID:    1.2.804.114118.3
D: Their Implementation Version Name: eFilm
D: Application Context Name:    1.2.840.10008.3.1.1.1
D: Calling Application Name:    LPC10007
D: Called Application Name:     LUNXXX
D: Responding Application Name: STORESCP
D: Our Max PDU Receive Size:    16384
D: Their Max PDU Receive Size:  64234
D: Presentation Contexts:
D:   Context ID:        1 (Accepted)
D:     Abstract Syntax: =ComputedRadiographyImageStorage
D:     Proposed SCP/SCU Role: SCU
D:     Accepted SCP/SCU Role: Default
D:     Accepted Transfer Syntax: =LittleEndianImplicit
D:   Context ID:        3 (Accepted)
D:     Abstract Syntax: =ComputedRadiographyImageStorage
D:     Proposed SCP/SCU Role: SCU
D:     Accepted SCP/SCU Role: Default
D:     Accepted Transfer Syntax: =LittleEndianExplicit
D: Requested Extended Negotiation: none
D: Accepted Extended Negotiation:  none
D: Requested User Identity Negotiation: none
D: User Identity Negotiation Response:  none
D: ======================= END A-ASSOCIATE-AC ======================
I: Received Store Request: MsgID 969, (CR)
D: ===================== INCOMING DIMSE MESSAGE ====================
D: Message Type                  : C-STORE RQ
D: Presentation Context ID       : 1
D: Message ID                    : 969
D: Affected SOP Class UID        : ComputedRadiographyImageStorage
D: Affected SOP Instance UID     : 1.2.392.200036.9125.9.0.252547724.3187671232.756093635
D: Data Set                      : present
D: Priority                      : medium
D: ======================= END DIMSE MESSAGE =======================
D: setting undefined VR of PixelData (7fe0,0010) to 'OW'
I: creating new subdirectory for study: /project/gateway//images/GW_TEST/study_20110720_141517931
I: storing DICOM file: /project/gateway//images/GW_TEST/study_20110720_141517931/CR.1.2.392.200036.9125.9.0.252547724.3187671232.756093635
D: DcmFileFormat::checkMetaHeaderValue() Version of MetaHeader is ok: 0x0100
D: DcmFileFormat::checkMetaHeaderValue() use SOPClassUID [1.2.840.10008.5.1.4.1.1.1]
D: DcmFileFormat::checkMetaHeaderValue() use SOPInstanceUID [1.2.392.200036.9125.9.0.252547724.3187671232.756093635] from Dataset
D: DcmFileFormat::checkMetaHeaderValue() use new TransferSyntaxUID [Little Endian Implicit] on writing following Dataset
D: DcmFileFormat: Found 8 Elements in DcmMetaInfo 'metinf'
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0008 len=664
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0009 len=228
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0010 len=98
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0018 len=126
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0019 len=96
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0020 len=190
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0021 len=72
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0025 len=46
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0028 len=2434
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0029 len=68
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0032 len=34
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0040 len=224
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0095 len=14
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0099 len=38
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x2010 len=74
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x50f1 len=36
I: Received Store Request: MsgID 970, (CR)
D: ===================== INCOMING DIMSE MESSAGE ====================
D: Message Type                  : C-STORE RQ
D: Presentation Context ID       : 1
D: Message ID                    : 970
D: Affected SOP Class UID        : ComputedRadiographyImageStorage
D: Affected SOP Instance UID     : 1.2.392.200036.9125.9.0.252547724.3623878848.756093635
D: Data Set                      : present
D: Priority                      : medium
D: ======================= END DIMSE MESSAGE =======================
D: setting undefined VR of PixelData (7fe0,0010) to 'OW'
I: storing DICOM file: /project/gateway//images/GW_TEST/study_20110720_141517931/CR.1.2.392.200036.9125.9.0.252547724.3623878848.756093635
D: DcmFileFormat::checkMetaHeaderValue() Version of MetaHeader is ok: 0x0100
D: DcmFileFormat::checkMetaHeaderValue() use SOPClassUID [1.2.840.10008.5.1.4.1.1.1]
D: DcmFileFormat::checkMetaHeaderValue() use SOPInstanceUID [1.2.392.200036.9125.9.0.252547724.3623878848.756093635] from Dataset
D: DcmFileFormat::checkMetaHeaderValue() use new TransferSyntaxUID [Little Endian Implicit] on writing following Dataset
D: DcmFileFormat: Found 8 Elements in DcmMetaInfo 'metinf'
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0008 len=664
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0009 len=228
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0010 len=98
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0018 len=126
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0019 len=96
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0020 len=190
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0021 len=72
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0025 len=46
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0028 len=2434
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0029 len=68
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0032 len=34
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0040 len=224
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0095 len=14
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0099 len=38
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x2010 len=74
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x50f1 len=36
I: Received Store Request: MsgID 971, (CR)
D: ===================== INCOMING DIMSE MESSAGE ====================
D: Message Type                  : C-STORE RQ
D: Presentation Context ID       : 1
D: Message ID                    : 971
D: Affected SOP Class UID        : ComputedRadiographyImageStorage
D: Affected SOP Instance UID     : 1.2.392.200036.9125.9.0.252547724.4060086464.756093635
D: Data Set                      : present
D: Priority                      : medium
D: ======================= END DIMSE MESSAGE =======================
D: setting undefined VR of PixelData (7fe0,0010) to 'OW'
I: storing DICOM file: /project/gateway//images/GW_TEST/study_20110720_141517931/CR.1.2.392.200036.9125.9.0.252547724.4060086464.756093635
D: DcmFileFormat::checkMetaHeaderValue() Version of MetaHeader is ok: 0x0100
D: DcmFileFormat::checkMetaHeaderValue() use SOPClassUID [1.2.840.10008.5.1.4.1.1.1]
D: DcmFileFormat::checkMetaHeaderValue() use SOPInstanceUID [1.2.392.200036.9125.9.0.252547724.4060086464.756093635] from Dataset
D: DcmFileFormat::checkMetaHeaderValue() use new TransferSyntaxUID [Little Endian Implicit] on writing following Dataset
D: DcmFileFormat: Found 8 Elements in DcmMetaInfo 'metinf'
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0008 len=664
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0009 len=228
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0010 len=98
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0018 len=126
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0019 len=96
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0020 len=190
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0021 len=72
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0025 len=46
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0028 len=2434
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0029 len=68
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0032 len=34
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0040 len=224
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0095 len=14
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0099 len=38
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x2010 len=74
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x50f1 len=36
I: Association Release

<...........no further action>



When I skip the --fork option following output is given:

Code: Select all

[gateway@lunxxx gateway]$  bin/gateway -od /project/gateway//images/GW_TEST -dhl -ss study -xcs './transfer_test.pl GW_TEST #p #a #c' 5099 -tos 5 -d
D: $dcmtk: storescp v3.6.1 2011-07-07 $
D:
D: DcmDataDictionary: Loading file: /usr/local/share/dcmtk/dicom.dic
D: setting network receive timeout to 60 seconds
D: PDU Type: Associate Request, PDU Length: 329 + 6 bytes PDU header
:
:
:
D: Parsing an A-ASSOCIATE PDU
I: Association Received
D: Parameters:
D: ====================== BEGIN A-ASSOCIATE-RQ =====================
D: Our Implementation Class UID:      1.2.276.0.7230010.3.0.3.6.1
D: Our Implementation Version Name:   OFFIS_DCMTK_361
D: Their Implementation Class UID:    1.2.804.114118.3
D: Their Implementation Version Name: eFilm
D: Application Context Name:    1.2.840.10008.3.1.1.1
D: Calling Application Name:    LPC10007
D: Called Application Name:     LUNXXX
D: Responding Application Name:
D: Our Max PDU Receive Size:    16384
D: Their Max PDU Receive Size:  64234
D: Presentation Contexts:
D:   Context ID:        1 (Proposed)
D:     Abstract Syntax: =ComputedRadiographyImageStorage
D:     Proposed SCP/SCU Role: SCU
D:     Proposed Transfer Syntax(es):
D:       =LittleEndianImplicit
D:   Context ID:        3 (Proposed)
D:     Abstract Syntax: =ComputedRadiographyImageStorage
D:     Proposed SCP/SCU Role: SCU
D:     Proposed Transfer Syntax(es):
D:       =LittleEndianExplicit
D:       =BigEndianExplicit
D:       =LittleEndianImplicit
D: Requested Extended Negotiation: none
D: Accepted Extended Negotiation:  none
D: Requested User Identity Negotiation: none
D: User Identity Negotiation Response:  none
D: ======================= END A-ASSOCIATE-RQ ======================
D: Constructing Associate AC PDU
I: Association Acknowledged (Max Send PDV: 64222)
D: ====================== BEGIN A-ASSOCIATE-AC =====================
D: Our Implementation Class UID:      1.2.276.0.7230010.3.0.3.6.1
D: Our Implementation Version Name:   OFFIS_DCMTK_361
D: Their Implementation Class UID:    1.2.804.114118.3
D: Their Implementation Version Name: eFilm
D: Application Context Name:    1.2.840.10008.3.1.1.1
D: Calling Application Name:    LPC10007
D: Called Application Name:     LUNXXX
D: Responding Application Name: STORESCP
D: Our Max PDU Receive Size:    16384
D: Their Max PDU Receive Size:  64234
D: Presentation Contexts:
D:   Context ID:        1 (Accepted)
D:     Abstract Syntax: =ComputedRadiographyImageStorage
D:     Proposed SCP/SCU Role: SCU
D:     Accepted SCP/SCU Role: Default
D:     Accepted Transfer Syntax: =LittleEndianImplicit
D:   Context ID:        3 (Accepted)
D:     Abstract Syntax: =ComputedRadiographyImageStorage
D:     Proposed SCP/SCU Role: SCU
D:     Accepted SCP/SCU Role: Default
D:     Accepted Transfer Syntax: =LittleEndianExplicit
D: Requested Extended Negotiation: none
D: Accepted Extended Negotiation:  none
D: Requested User Identity Negotiation: none
D: User Identity Negotiation Response:  none
D: ======================= END A-ASSOCIATE-AC ======================
I: Received Store Request: MsgID 966, (CR)
D: ===================== INCOMING DIMSE MESSAGE ====================
D: Message Type                  : C-STORE RQ
D: Presentation Context ID       : 1
D: Message ID                    : 966
D: Affected SOP Class UID        : ComputedRadiographyImageStorage
D: Affected SOP Instance UID     : 1.2.392.200036.9125.9.0.252547724.3187671232.756093635
D: Data Set                      : present
D: Priority                      : medium
D: ======================= END DIMSE MESSAGE =======================
D: setting undefined VR of PixelData (7fe0,0010) to 'OW'
I: creating new subdirectory for study: /project/gateway//images/GW_TEST/study_20110720_141232006
I: storing DICOM file: /project/gateway//images/GW_TEST/study_20110720_141232006/CR.1.2.392.200036.9125.9.0.252547724.3187671232.756093635
D: DcmFileFormat::checkMetaHeaderValue() Version of MetaHeader is ok: 0x0100
D: DcmFileFormat::checkMetaHeaderValue() use SOPClassUID [1.2.840.10008.5.1.4.1.1.1]
D: DcmFileFormat::checkMetaHeaderValue() use SOPInstanceUID [1.2.392.200036.9125.9.0.252547724.3187671232.756093635] from Dataset
D: DcmFileFormat::checkMetaHeaderValue() use new TransferSyntaxUID [Little Endian Implicit] on writing following Dataset
D: DcmFileFormat: Found 8 Elements in DcmMetaInfo 'metinf'
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0008 len=664
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0009 len=228
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0010 len=98
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0018 len=126
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0019 len=96
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0020 len=190
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0021 len=72
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0025 len=46
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0028 len=2434
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0029 len=68
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0032 len=34
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0040 len=224
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0095 len=14
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0099 len=38
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x2010 len=74
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x50f1 len=36
I: Received Store Request: MsgID 967, (CR)
D: ===================== INCOMING DIMSE MESSAGE ====================
D: Message Type                  : C-STORE RQ
D: Presentation Context ID       : 1
D: Message ID                    : 967
D: Affected SOP Class UID        : ComputedRadiographyImageStorage
D: Affected SOP Instance UID     : 1.2.392.200036.9125.9.0.252547724.3623878848.756093635
D: Data Set                      : present
D: Priority                      : medium
D: ======================= END DIMSE MESSAGE =======================
D: setting undefined VR of PixelData (7fe0,0010) to 'OW'
I: storing DICOM file: /project/gateway//images/GW_TEST/study_20110720_141232006/CR.1.2.392.200036.9125.9.0.252547724.3623878848.756093635
D: DcmFileFormat::checkMetaHeaderValue() Version of MetaHeader is ok: 0x0100
D: DcmFileFormat::checkMetaHeaderValue() use SOPClassUID [1.2.840.10008.5.1.4.1.1.1]
D: DcmFileFormat::checkMetaHeaderValue() use SOPInstanceUID [1.2.392.200036.9125.9.0.252547724.3623878848.756093635] from Dataset
D: DcmFileFormat::checkMetaHeaderValue() use new TransferSyntaxUID [Little Endian Implicit] on writing following Dataset
D: DcmFileFormat: Found 8 Elements in DcmMetaInfo 'metinf'
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0008 len=664
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0009 len=228
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0010 len=98
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0018 len=126
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0019 len=96
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0020 len=190
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0021 len=72
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0025 len=46
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0028 len=2434
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0029 len=68
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0032 len=34
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0040 len=224
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0095 len=14
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0099 len=38
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x2010 len=74
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x50f1 len=36
I: Received Store Request: MsgID 968, (CR)
D: ===================== INCOMING DIMSE MESSAGE ====================
D: Message Type                  : C-STORE RQ
D: Presentation Context ID       : 1
D: Message ID                    : 968
D: Affected SOP Class UID        : ComputedRadiographyImageStorage
D: Affected SOP Instance UID     : 1.2.392.200036.9125.9.0.252547724.4060086464.756093635
D: Data Set                      : present
D: Priority                      : medium
D: ======================= END DIMSE MESSAGE =======================
D: setting undefined VR of PixelData (7fe0,0010) to 'OW'
I: storing DICOM file: /project/gateway//images/GW_TEST/study_20110720_141232006/CR.1.2.392.200036.9125.9.0.252547724.4060086464.756093635
D: DcmFileFormat::checkMetaHeaderValue() Version of MetaHeader is ok: 0x0100
D: DcmFileFormat::checkMetaHeaderValue() use SOPClassUID [1.2.840.10008.5.1.4.1.1.1]
D: DcmFileFormat::checkMetaHeaderValue() use SOPInstanceUID [1.2.392.200036.9125.9.0.252547724.4060086464.756093635] from Dataset
D: DcmFileFormat::checkMetaHeaderValue() use new TransferSyntaxUID [Little Endian Implicit] on writing following Dataset
D: DcmFileFormat: Found 8 Elements in DcmMetaInfo 'metinf'
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0008 len=664
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0009 len=228
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0010 len=98
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0018 len=126
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0019 len=96
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0020 len=190
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0021 len=72
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0025 len=46
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0028 len=2434
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0029 len=68
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0032 len=34
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0040 len=224
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0095 len=14
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x0099 len=38
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x2010 len=74
D: DcmItem::computeGroupLengthAndPadding() Length of Group 0x50f1 len=36
I: Association Release
Name "main::php" used only once: possible typo at ./transfer_test.pl line 23.
Name "main::basepath" used only once: possible typo at ./transfer_test.pl line 23.



####################### transfer.pl ##################################
calling transfer.pl with  4 command-line arguments.
 -->GW_TEST
 -->/project/gateway//images/GW_TEST/study_20110720_141232006
 -->LPC10007
 -->LUNXXX
executing in bakground: [./studycomplete_test.pl GW_TEST /project/gateway//images/GW_TEST/study_20110720_141232006 LPC10007 LUNXXX | tee /project/gateway//images/GW_TEST/study_20110720_141232006.log &]
[/code]

mikota
Posts: 6
Joined: Mon, 2006-02-27, 17:24
Location: Linz, Austria

#4 Post by mikota »

I believe the -tos parameter is not working correctly with the --fork option enabled.

Best greetings
Alfred

Per
Posts: 99
Joined: Mon, 2007-09-03, 10:53
Location: Trondheim, Norway
Contact:

#5 Post by Per »

Yes, I have also noticed this. The problem is that there is no IPC mechanism to update the information about what has been received, each forked copy of the program keeps its own information to itself.

Michael Onken
DCMTK Developer
Posts: 2049
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#6 Post by Michael Onken »

Hi,

first of all: yes, -tos is not working with the --fork option, unfortunately.

And second: Per is right; the problem is that for the end of study timeout event it must be checked whether a study is now completed. This is checked by looking whether there is a current study, i.e. whether we still were waiting for new images of that study. If so, the end of study script is run, otherwise nothing happens.

If you use fork, every association is shortly seen by the parent process that you start from commandline. But then immediately, a new process is forked which takes over handling of the association. The child process does handle the association and then exit. The parent process meanwhile keeps listening for new associations. Thus, the timeout that you set with -tos is what the parent process cares about (the child know it but it does not use that value since it never waits for association but handles an existing one it takes over from the parent). However, the objects are received by the child process. Therefore, the parent never knows what kind of data, and especially which studies (Study Instance UIDs) the objects received contain since the child processes do not inform the parent. This is what Per meant with "no IPC mechanism".

I do not see how to find a good solution for this problem without introducing IPC (which is probably not so easy to do cross-platform, though I have no experiences in that field). As a hack, you might add code to storescp which let parent and child communicate over a file-based mechanism. However, I'm not sure it is worth the effort.

Michael

Per
Posts: 99
Joined: Mon, 2007-09-03, 10:53
Location: Trondheim, Norway
Contact:

#7 Post by Per »

You could solve this by using threads instead of forking, although you would run into the portability issue.

What is the DCMTK policy on dependencies? There exist a number of good, portable libraries that could be used here to solve such issues without getting into all kinds of platform specific hacks.

Michael Onken
DCMTK Developer
Posts: 2049
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#8 Post by Michael Onken »

Hi,

well, there is no real policy but of course a third party library for DCMTK should be portable, somehow self-contained (ie. not needing "the rest of QT" or boost) and easy to integrate and maintain (if taken over like jpeg or logger libs).

We actually already have cross-platform threading classes in ofstd, like ofthread and ofsemaphore. However, we do not make use of them so far. As so often the reason is: There wasn't a need, or not enough priority (like here) to get someone of us starting the work.

Also, DCMTK is not officially thread-safe,i.e. there might be some issues with the networking module (dcmnet), mainly. Some people tried and reported it works fine, but that should be investigated and tested seriously.

Michael

Xiao
Posts: 36
Joined: Wed, 2011-05-25, 07:53

#9 Post by Xiao »

I have modified storescp of dcmtk-3.5.4 package for multi-thread, there are two storescp files, which are implemented in two ways of network developping, I will send to whoever want them. If there are something incorrect, please let me know.

Michael Onken
DCMTK Developer
Posts: 2049
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#10 Post by Michael Onken »

Hi,

also be sure to send them to dicom/at/offis/de for later use, maybe they can be useful for us or we can offer them to users as a third party contribution in the future.

Best regards,
Michael

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest