Is it possible to use Query Retrieve Callback classes from a DcmSCP inherited class?

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Abdallah Maouche
Posts: 12
Joined: Mon, 2021-11-08, 10:25

Is it possible to use Query Retrieve Callback classes from a DcmSCP inherited class?

#1 Post by Abdallah Maouche »

I am using DcmSCP class to write the C-MOVE SCP service, so right now I am overwriting handleMOVERequest but I still need to search for the query dataset somehow.
I was planning to use the index file as in DcmQueryRetrieveMoveContext but I apparently need to have access to the current Association when instantiating that class.
My question is whether there's a way to make use of the already written code of DcmQueryRetrieveMoveContext (and other similar classes for other commands) from DcmSCP inherited class ? :?

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

Re: Is it possible to use Query Retrieve Callback classes from a DcmSCP inherited class?

#2 Post by Michael Onken »

Hi Abdallah,

I am not sure what you mean by this:
but I still need to search for the query dataset somehow.
Do you mean the MOVE request, containing for example the Study and Series Instance UID to search for? That is provided in the reqDataset parameter in handleMOVEResponse():

Code: Select all

virtual OFCondition handleMOVERequest (T_DIMSE_C_MoveRQ &reqMessage, const T_ASC_PresentationContextID presID, DcmDataset *&reqDataset, OFString &moveDest)
Note that this is a reference parameter so this is provided to you when DcmSCP calls your handleMOVERequest() handler.

Or which query dataset do you mean?

Best regards,
Michael

Abdallah Maouche
Posts: 12
Joined: Mon, 2021-11-08, 10:25

Re: Is it possible to use Query Retrieve Callback classes from a DcmSCP inherited class?

#3 Post by Abdallah Maouche »

Hello Micheal Onken,

Sorry for late reply I for some reason didn't receive a notification email and was too busy trying to solve the issue...
Fortunately, I figured out how to solve it and was willing to post when I have time.
Michael Onken wrote: Tue, 2021-12-28, 12:11 I am not sure what you mean by this:
but I still need to search for the query dataset somehow.
I was referring to the database engine that goes through the saved images to retrieve the matching files. I was trying to reuse the index file that's used in dcmqrdb module but when calling the constructor DcmQueryRetrieveMoveContext I had to pass in the current Association as a parameter which is inaccessible from DcmSCP inheriting classes. What I did as a workaround is to create a new Association and pass in the parameters that are required by DcmQueryRetrieveMoveContext class which are AETitles and Addresses.
Please let me know if there's a better way to do this.

Best regards,
Abdallah Maouche.

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

Re: Is it possible to use Query Retrieve Callback classes from a DcmSCP inherited class?

#4 Post by Michael Onken »

Hi,

since dcmqrdb-specific classes (like DcmQueryRetrieveMoveContext) and DcmSCP/DcmSCU have been developed separately (also in time), there have not been any efforts to make dcmqrdb classes re-usable. So I don't know any better way either.

Best regards,
Michael

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Baidu [Spider], Bing [Bot] and 1 guest