dcmqrscp with my own mover

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
zsomi
Posts: 9
Joined: Fri, 2006-07-28, 16:10

dcmqrscp with my own mover

#1 Post by zsomi »

Hi!

My problem is that I wrote my own mover program. It works well, if I am communicating with another comuter.

But now, I want to try out dcmqrscp.
The config file is:

NetworkType = "tcp"
NetworkTCPPort = 104
MaxPDUSize = 16384
MaxAssociations = 16
Display = "no"
#--------------------------------------------------------
HostTable BEGIN
zsomi = (ZSOMI, 84.236.17.148, 4006)
HostTable END
#--------------------------------------------------------
VendorTable BEGIN
"zsomi Image Co" = zsomi
VendorTable END
#--------------------------------------------------------
AETable BEGIN
IMAGES /home/zsomi/svn/trunk/src/database/IMAGES RW (9, 1024mb) ANY
AETable END
#--------------------------------------------------------

sudo dcmqrscp -v -c /home/zsomi/svn/trunk/src/database/dcmqrscp.cfg 4006

It works with my own store and query.
It's on the same computer on which I run storetest.cc, querytest.cc and

movetest.cc:

dump2dcm dataf dcmfile
./movetest dcmtk zsomi IMAGES zsomi 3.187.95.132:4006 dcmfile
zsomi = callingAETitle
IMAGES =calledAPTitle
zsomi = moveDest
3.187.95.132:4006 = calledPresentationAddress

OFCondition cond = ASC_initializeNetwork(NET_ACCEPTORREQUESTOR, 4006, 30, &m_net);
gave me: �Initialization Error: Address already in use

so I tried:
OFCondition cond = ASC_initializeNetwork(NET_ACCEPTORREQUESTOR, 5678, 30, &m_net);
It didn`t gave me error, but
cond = ASC_requestAssociation(m_net, m_params, &m_assoc);
did. And I can`t understand what should I do, because cond.text() is empty.

(my makeassoc function is:
OFCondition cond = ASC_initializeNetwork(NET_ACCEPTORREQUESTOR, 5678, 30, &m_net);
cond = ASC_createAssociationParameters(&m_params,ASC_DEFAULTMAXPDU);
cond = ASC_setAPTitles(m_params, m_callingAETitle.c_str(), m_calledAPTitle.c_str(), 0);
cond = ASC_setPresentationAddresses(m_params, m_callingPresentationAddress.c_str(), m_calledPresentationAddress.c_str() );
m_pid = 1;
addMovePresentationContext(UID_FINDStudyRootQueryRetrieveInformationModel);
m_pid =3;
addMovePresentationContext(UID_MOVEStudyRootQueryRetrieveInformationModel);
cond = ASC_requestAssociation(m_net, m_params, &m_assoc);
)

I run dcmqrcp with -v, and it doesn`t tell me anithing.

Can anyone help me?

Zsomi

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1445
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

#2 Post by Marco Eichelberg »

A few comments.
  • running dcmqrscp with sudo (or, in general, with root privileges) is undesirable unless you configure dcmqrscp to immediately change to a different user and group ID (i.e., run under a different, non-root, user account).
  • You cannot have both dcmqrscp and your own move client accept connections on port 4006. This is why ASC_initializeNetwork with port 4006 fails - the port is already in use, by dcmqrscp.
  • It is good that you set m_pid to increasing odd numbers (I assume this is intended to be the presentation context ID), but you don't pass this variable to anywhere

Post Reply

Who is online

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