dcmqrscp and --assoc-config-file

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
bmoloney
Posts: 10
Joined: Wed, 2011-09-07, 00:38

dcmqrscp and --assoc-config-file

#1 Post by bmoloney »

I am trying to use the "--assoc-config-file" ("-xf") option for dcmqrscp (added in 3.6.2) so that it will accept private SOP classes. I can see that the presentation context for the private SOP class is proposed and accepted, but once the data set is sent I still get back an error status with "Refused - SOP Class not supported".

Is this option not sufficient for adding support for private SOP classes? Is it still required to edit some source code and recompile?

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

Re: dcmqrscp and --assoc-config-file

#2 Post by Michael Onken »

Hi,

I am not sure about dcmqrscp and private SOP classes but maybe there is also a problem with the client that sends a (somewhat) broken request? Can you show the log of the request and the resulting error (e.g. via -d in the DCMTK-related tools).

Best regards,
Michael

bmoloney
Posts: 10
Joined: Wed, 2011-09-07, 00:38

Re: dcmqrscp and --assoc-config-file

#3 Post by bmoloney »

I went ahead and compiled 3.6.5 from source and get the same result. The debug logging is below, i just had to trim some of the presentation contexts from the association request/response to fit with in this forum's char limit. The relevant presentation context ID is 243.


D: Parsing an A-ASSOCIATE PDU
I: Association Received (localhost:DCMTESTAE0 -> DCMTKAE0)
D: Parameters:
D: ====================== BEGIN A-ASSOCIATE-RQ =====================
D: Our Implementation Class UID: 1.2.276.0.7230010.3.0.3.6.5
D: Our Implementation Version Name: OFFIS_DCMTK_365
D: Their Implementation Class UID: 1.2.826.0.1.3680043.9.3811.1.4.1
D: Their Implementation Version Name: PYNETDICOM_141
D: Application Context Name: 1.2.840.10008.3.1.1.1
D: Calling Application Name: DCMTESTAE0
D: Called Application Name: DCMTKAE0
D: Responding Application Name:
D: Our Max PDU Receive Size: 16384
D: Their Max PDU Receive Size: 16382
D: Presentation Contexts:
D: Context ID: 1 (Proposed)
D: Abstract Syntax: =ComputedRadiographyImageStorage
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit
D: Context ID: 3 (Proposed)
D: Abstract Syntax: =DigitalXRayImageStorageForPresentation
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit
D: Context ID: 5 (Proposed)
D: Abstract Syntax: =DigitalXRayImageStorageForProcessing
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit
D: Context ID: 7 (Proposed)
D: Abstract Syntax: =DigitalMammographyXRayImageStorageForPresentation
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit
D: Context ID: 9 (Proposed)
D: Abstract Syntax: =DigitalMammographyXRayImageStorageForProcessing
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit
D: Context ID: 11 (Proposed)
D: Abstract Syntax: =DigitalIntraOralXRayImageStorageForPresentation
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit
D: Context ID: 13 (Proposed)
D: Abstract Syntax: =DigitalIntraOralXRayImageStorageForProcessing
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit
D: Context ID: 15 (Proposed)
D: Abstract Syntax: =CTImageStorage
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit
D: Context ID: 17 (Proposed)
D: Abstract Syntax: =EnhancedCTImageStorage
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit
D: Context ID: 19 (Proposed)
D: Abstract Syntax: =LegacyConvertedEnhancedCTImageStorage
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit
D: Context ID: 21 (Proposed)
D: Abstract Syntax: =UltrasoundMultiframeImageStorage
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit
D: Context ID: 23 (Proposed)
D: Abstract Syntax: =MRImageStorage
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit
D: Context ID: 25 (Proposed)
D: Abstract Syntax: =EnhancedMRImageStorage
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit
D: Context ID: 27 (Proposed)
D: Abstract Syntax: =MRSpectroscopyStorage
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit
D: Context ID: 29 (Proposed)
D: Abstract Syntax: =EnhancedMRColorImageStorage
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit
D: Context ID: 31 (Proposed)
D: Abstract Syntax: =LegacyConvertedEnhancedMRImageStorage
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit
D: Context ID: 33 (Proposed)
D: Abstract Syntax: =UltrasoundImageStorage
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit
D: Context ID: 35 (Proposed)
D: Abstract Syntax: =EnhancedUSVolumeStorage
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit
D: Context ID: 37 (Proposed)
D: Abstract Syntax: =SecondaryCaptureImageStorage
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit
D: Context ID: 39 (Proposed)
D: Abstract Syntax: =MultiframeSingleBitSecondaryCaptureImageStorage
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit
D: Context ID: 41 (Proposed)
D: Abstract Syntax: =MultiframeGrayscaleByteSecondaryCaptureImageStorage
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit
D: Context ID: 43 (Proposed)
D: Abstract Syntax: =MultiframeGrayscaleWordSecondaryCaptureImageStorage
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit
D: Context ID: 45 (Proposed)
D: Abstract Syntax: =MultiframeTrueColorSecondaryCaptureImageStorage
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit
D: Context ID: 47 (Proposed)
D: Abstract Syntax: =TwelveLeadECGWaveformStorage
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit

< TRIMMED ... >

D: Context ID: 241 (Proposed)
D: Abstract Syntax: =RTBrachyApplicationSetupDeliveryInstructionStorage
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit
D: Context ID: 243 (Proposed)
D: Abstract Syntax: 1.3.12.2.1107.5.9.1
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianImplicit
D: =LittleEndianExplicit
D: =BigEndianExplicit
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: 16370)
D: ====================== BEGIN A-ASSOCIATE-AC =====================
D: Our Implementation Class UID: 1.2.276.0.7230010.3.0.3.6.5
D: Our Implementation Version Name: OFFIS_DCMTK_365
D: Their Implementation Class UID: 1.2.826.0.1.3680043.9.3811.1.4.1
D: Their Implementation Version Name: PYNETDICOM_141
D: Application Context Name: 1.2.840.10008.3.1.1.1
D: Calling Application Name: DCMTESTAE0
D: Called Application Name: DCMTKAE0
D: Responding Application Name:
D: Our Max PDU Receive Size: 16384
D: Their Max PDU Receive Size: 16382
D: Presentation Contexts:
D: Context ID: 1 (Accepted)
D: Abstract Syntax: =ComputedRadiographyImageStorage
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Accepted Transfer Syntax: =LittleEndianImplicit
D: Context ID: 3 (Accepted)
D: Abstract Syntax: =DigitalXRayImageStorageForPresentation
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Accepted Transfer Syntax: =LittleEndianImplicit
D: Context ID: 5 (Accepted)
D: Abstract Syntax: =DigitalXRayImageStorageForProcessing
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Accepted Transfer Syntax: =LittleEndianImplicit
D: Context ID: 7 (Accepted)
D: Abstract Syntax: =DigitalMammographyXRayImageStorageForPresentation
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Accepted Transfer Syntax: =LittleEndianImplicit
D: Context ID: 9 (Accepted)
D: Abstract Syntax: =DigitalMammographyXRayImageStorageForProcessing
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Accepted Transfer Syntax: =LittleEndianImplicit
D: Context ID: 11 (Accepted)
D: Abstract Syntax: =DigitalIntraOralXRayImageStorageForPresentation
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Accepted Transfer Syntax: =LittleEndianImplicit
D: Context ID: 13 (Accepted)
D: Abstract Syntax: =DigitalIntraOralXRayImageStorageForProcessing
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Accepted Transfer Syntax: =LittleEndianImplicit
D: Context ID: 15 (Accepted)
D: Abstract Syntax: =CTImageStorage
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Accepted Transfer Syntax: =LittleEndianImplicit
D: Context ID: 17 (Accepted)
D: Abstract Syntax: =EnhancedCTImageStorage
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Accepted Transfer Syntax: =LittleEndianImplicit
D: Context ID: 19 (Abstract Syntax Not Supported)
D: Abstract Syntax: =LegacyConvertedEnhancedCTImageStorage
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Context ID: 21 (Accepted)
D: Abstract Syntax: =UltrasoundMultiframeImageStorage
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Accepted Transfer Syntax: =LittleEndianImplicit
D: Context ID: 23 (Accepted)
D: Abstract Syntax: =MRImageStorage
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Accepted Transfer Syntax: =LittleEndianImplicit
D: Context ID: 25 (Accepted)
D: Abstract Syntax: =EnhancedMRImageStorage
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Accepted Transfer Syntax: =LittleEndianImplicit
D: Context ID: 27 (Abstract Syntax Not Supported)
D: Abstract Syntax: =MRSpectroscopyStorage
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Context ID: 29 (Accepted)
D: Abstract Syntax: =EnhancedMRColorImageStorage
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Accepted Transfer Syntax: =LittleEndianImplicit
D: Context ID: 31 (Abstract Syntax Not Supported)
D: Abstract Syntax: =LegacyConvertedEnhancedMRImageStorage
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Context ID: 33 (Accepted)
D: Abstract Syntax: =UltrasoundImageStorage
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Accepted Transfer Syntax: =LittleEndianImplicit
D: Context ID: 35 (Accepted)
D: Abstract Syntax: =EnhancedUSVolumeStorage
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Accepted Transfer Syntax: =LittleEndianImplicit
D: Context ID: 37 (Accepted)
D: Abstract Syntax: =SecondaryCaptureImageStorage
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Accepted Transfer Syntax: =LittleEndianImplicit
D: Context ID: 39 (Accepted)
D: Abstract Syntax: =MultiframeSingleBitSecondaryCaptureImageStorage
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Accepted Transfer Syntax: =LittleEndianImplicit
D: Context ID: 41 (Accepted)
D: Abstract Syntax: =MultiframeGrayscaleByteSecondaryCaptureImageStorage
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Accepted Transfer Syntax: =LittleEndianImplicit
D: Context ID: 43 (Accepted)
D: Abstract Syntax: =MultiframeGrayscaleWordSecondaryCaptureImageStorage
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Accepted Transfer Syntax: =LittleEndianImplicit
D: Context ID: 45 (Accepted)
D: Abstract Syntax: =MultiframeTrueColorSecondaryCaptureImageStorage
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Accepted Transfer Syntax: =LittleEndianImplicit
D: Context ID: 47 (Abstract Syntax Not Supported)
D: Abstract Syntax: =TwelveLeadECGWaveformStorage
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default

< TRIMMED ... >

D: Context ID: 241 (Abstract Syntax Not Supported)
D: Abstract Syntax: =RTBrachyApplicationSetupDeliveryInstructionStorage
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Context ID: 243 (Accepted)
D: Abstract Syntax: 1.3.12.2.1107.5.9.1
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Accepted Transfer Syntax: =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-AC ======================
D: DcmDataset::read() TransferSyntax="Little Endian Implicit"
I: Received Store SCP:
I: ===================== INCOMING DIMSE MESSAGE ====================
I: Message Type : C-STORE RQ
I: Message ID : 1
I: Affected SOP Class UID : 1.3.12.2.1107.5.9.1
I: Affected SOP Instance UID : 2.25.12659144173943061650280564179
I: Data Set : present
I: Priority : low
I: ======================= END DIMSE MESSAGE =======================
D: DcmDataset::read() TransferSyntax="Little Endian Implicit"
D: DcmFileFormat::checkMetaHeaderValue() Version of MetaHeader is ok: 0x0001
D: DcmFileFormat::checkMetaHeaderValue() use SOPClassUID [1.3.12.2.1107.5.9.1] from Dataset
D: DcmFileFormat::checkMetaHeaderValue() use SOPInstanceUID [2.25.12659144173943061650280564179] from Dataset
D: DcmFileFormat::checkMetaHeaderValue() use new TransferSyntaxUID [Little Endian Implicit] on writing following Dataset
D: DcmFileFormat::validateMetaInfo() found 8 Elements in DcmMetaInfo 'metinf'
W: NOTICE: StoreSCP:
W: ===================== OUTGOING DIMSE MESSAGE ====================
W: Message Type : C-STORE RSP
W: Message ID Being Responded To : 1
W: Affected SOP Class UID : 1.3.12.2.1107.5.9.1
W: Affected SOP Instance UID : 2.25.12659144173943061650280564179
W: Data Set : none
W: DIMSE Status : 0x0122: Error: Refused - SOP Class not supported
W: ======================= END DIMSE MESSAGE =======================
I: Association Release

bmoloney
Posts: 10
Joined: Wed, 2011-09-07, 00:38

Re: dcmqrscp and --assoc-config-file

#4 Post by bmoloney »

Luckily I found this personal website with some pointers: http://www.wangchaofeng.com/parseNote.p ... p-classuid

The new '-xf' option to 'dcmqrscp' solves the association issue mentioned there, but I still had to remove this conditional branch in dcmqrdb/libsrc/dcmqrsrv.cc:

Code: Select all

if (!dcmIsaStorageSOPClassUID(request->AffectedSOPClassUID)) {
    /* callback will send back sop class not supported status */
    context.setStatus(STATUS_STORE_Refused_SOPClassNotSupported);
    /* must still receive data */
    strcpy(imageFileName, NULL_DEVICE_NAME);
}
It would be nice if there was a command line option to enable this behavior. I am using 'dcmqrscp' in some automated testing for my own code, so requiring a custom build is problematic.

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

Re: dcmqrscp and --assoc-config-file

#5 Post by Michael Onken »

Hi,

thanks for the update and the link to the great website! I agree that it would be helpful to allow unknown Storage SOP Classes in the future.

Maybe option -pm (like in storescp) would make sense in dcmqrscp, too?

Best regards,
Michael

bmoloney
Posts: 10
Joined: Wed, 2011-09-07, 00:38

Re: dcmqrscp and --assoc-config-file

#6 Post by bmoloney »

I have had some weird issues in the past with "promiscuous mode" (see https://forum.dcmtk.org/viewtopic.php?f ... 56&p=12254 ), so I tend to prefer the more targeted approach with custom profiles.

J. Riesmeier
DCMTK Developer
Posts: 2503
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: dcmqrscp and --assoc-config-file

#7 Post by J. Riesmeier »

I would suggest to use a check similar to the one in DcmStorageSCU::checkSOPInstance():

Code: Select all

            // in addition, check whether it is a known storage SOP class
            if (!dcmIsaStorageSOPClassUID(sopClassUID.c_str(), ESSC_All))
            {
                // check whether the DICOM standard prefix for storage UIDs is used
                if (sopClassUID.compare(0, 23, "1.2.840.10008.5.1.4.1.1") == 0)
                {
                    DCMNET_DEBUG("unknown storage SOP class (with standard UID prefix): " << sopClassUID);
                }
                // check whether the DICOM standard prefix for UIDs is used
                else if (sopClassUID.compare(0, 13, "1.2.840.10008") == 0)
                {
                    // try to find the human-readable name of this UID
                    const char *uidName = dcmFindNameOfUID(sopClassUID.c_str(), NULL /* defaultValue */);
                    if (uidName != NULL)
                    {
                        DCMNET_DEBUG("unexpected standard UID (no storage SOP class): " << sopClassUID
                            << " (" << uidName << ")");
                        status = NET_EC_InvalidSOPClassUID;
                    } else {
                        DCMNET_DEBUG("unknown standard UID (probably no storage SOP class): " << sopClassUID);
                        status = NET_EC_UnknownStorageSOPClass;
                    }
                } else {
                    // do not reject supposed private SOP classes
                    DCMNET_DEBUG("unknown UID (possibly private storage SOP class): " << sopClassUID);
                }
            }

Post Reply

Who is online

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