connect to PACS system biginner question
Moderator: Moderator Team
-
- Posts: 85
- Joined: Sun, 2010-12-26, 17:34
connect to PACS system biginner question
Hi all,
I need sample code / example in how to connect to pacs sustem and test teh connection
your fast reply is highly appreciated
I need sample code / example in how to connect to pacs sustem and test teh connection
your fast reply is highly appreciated
-
- Posts: 101
- Joined: Wed, 2009-07-08, 16:06
- Location: Oldenburg, Germany
I would recommend using the DCMSCU Class
Here is a simplified pseudocode
Here is a simplified pseudocode
DcmSCU *SCU = new DcmSCU (this);
OFList<OFString> XferSyntaxes;
if (SCU != NULL)
{
SCU ->setPeerAETitle(PeerAETitle);
SCU ->setPeerHostName(PeerHostName);
SCU ->setPeerPort(PeerPortNumber);
// Add Preferred Outgoing Transfer Syntaxes
XferSyntaxes.push_back (UID_LittleEndianImplicitTransferSyntax);
XferSyntaxes.push_back(UID_LittleEndianExplicitTransferSyntax);
.....
.....
// Add Presentation Context for each required SOP Class UID
SCU ->addPresentationContext(SOPClassUID, XferSyntaxes);
.....
.....
status = SCU ->initNetwork();
status=SCU->negotiateAssociation();
const T_ASC_PresentationContextID presID = SCU->findPresentationContextID(AbstractSyntax,TransferSyntax);
//Send Request on a presentation context ID
...
...
//Close Association
SCU->closeAssociation();
}
Last edited by omarelgazzar on Wed, 2011-05-25, 12:12, edited 3 times in total.
-
- Posts: 85
- Joined: Sun, 2010-12-26, 17:34
I face a problem while use DCMTK which isomarelgazzar wrote:There is an example in the documentation for echoscu
However, I would recommend using the DCMSCU Class
SCU = new DcmSCU (this);
if (SCU != NULL)
{
SCU ->setPeerAETitle(PeerAETitle);
SCU ->setPeerHostName(PeerHostName);
SCU ->setPeerPort(PeerPortNumber);
SCU ->addPresentationContexts(PreferredOutgoingSyntax);
status = SCU ->initNetwork();
status=SCU->negotiateAssociation();
SCU->findPresentationContext(..,..)
//Send Request
...
...
//Close Association
SCU->closeAssociation();
}
Hope that helps.
/Users/abduljaleelmalik/full-dcmtk/include/dcmtk/ofstd/ofstream.h:80:0 /Users/abduljaleelmalik/full-dcmtk/include/dcmtk/ofstd/ofstream.h:80:2: error: #error DCMTK needs stringstream or strstream type
#define INCLUDE_CSTDIO
#include "dcmtk/ofstd/ofstdinc.h"
#include <dcmtk/dcmimgle/dcmimage.h>
#include <dcmtk/config/osconfig.h>
#include <dcmtk/dcmimgle/dcmimage.h>
how can I override that
-
- Posts: 101
- Joined: Wed, 2009-07-08, 16:06
- Location: Oldenburg, Germany
-
- Posts: 85
- Joined: Sun, 2010-12-26, 17:34
-
- DCMTK Developer
- Posts: 2049
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
-
- Posts: 85
- Joined: Sun, 2010-12-26, 17:34
how can I do that in xcode , there're no direct compiler flagMichael Onken wrote:Hi,
try to add "-DHAVE_CONFIG_H" to your compiler flags, otherwise including osconfig.h does actually nothing.
Best regards,
Michael
there're
OpenMP linker flags
other linker flags
symbol ordering flags
warning linker flag
I tried add it to other linker flags , but the same error appeared
I tried also to add
#undef verifty
#define INCLUDE_CSTDIO
#include <dcmtk/config/osconfig.h>
#include <dcmtk/dcmimgle/dcmimage.h>
but the error /DCMTK_BINARY/include/dcmtk/ofstd/ofstream.h:80:0 /DCMTK_BINARY/include/dcmtk/ofstd/ofstream.h:80:2: error: #error DCMTK needs stringstream or strstream type
still appear in ofstream.h
#include <iostream.h>
#include <fstream.h>
// For old STREAMS library: preference for strstream
#if defined(HAVE_STRSTREA_H) || defined(HAVE_STRSTREAM_H)
#ifdef HAVE_STRSTREA_H
#include <strstrea.h>
#else
#include <strstream.h>
#endif
#elif defined(HAVE_SSTREAM_H)
#include <sstream.h>
#define USE_STRINGSTREAM
#else
#error DCMTK needs stringstream or strstream type
#endif
#include <iomanip.h>
-
- DCMTK Developer
- Posts: 2049
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Hi,
It is not a Linker flag, it is a compiler flag. First, every .cc file is compiled into an object file, then in the end, they are linked together into applications. You can recognize an application if one of the objects (and only one) contains a main() function.
I do not have a mac here, but there will surely be change to change the compile flags, not only the linker flags. Just right-click on file to be compiled, and look for compiler or build flags. Maybe again, google may help.
This is not a dcmtk-related problem.
Best regards,
Michael
It is not a Linker flag, it is a compiler flag. First, every .cc file is compiled into an object file, then in the end, they are linked together into applications. You can recognize an application if one of the objects (and only one) contains a main() function.
I do not have a mac here, but there will surely be change to change the compile flags, not only the linker flags. Just right-click on file to be compiled, and look for compiler or build flags. Maybe again, google may help.
This is not a dcmtk-related problem.
Best regards,
Michael
-
- Posts: 85
- Joined: Sun, 2010-12-26, 17:34
I build dcmtk succesfuly my problem in using itMichael Onken wrote:Hi,
It is not a Linker flag, it is a compiler flag. First, every .cc file is compiled into an object file, then in the end, they are linked together into applications. You can recognize an application if one of the objects (and only one) contains a main() function.
I do not have a mac here, but there will surely be change to change the compile flags, not only the linker flags. Just right-click on file to be compiled, and look for compiler or build flags. Maybe again, google may help.
This is not a dcmtk-related problem.
Best regards,
Michael
the error appear while usiing it
-
- DCMTK Developer
- Posts: 2049
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
-
- Posts: 85
- Joined: Sun, 2010-12-26, 17:34
it compiled corectly ,Michael Onken wrote:Right, and I said you would to do (add a compile flag); the rest is now up to you: learning how to do that with your compiler (Xcode/gcc).
I need example to
-test the connection with pacs I missed omarelgazar reply
- read local dicom file and convert it to buffer data
any suggestion please
-
- DCMTK Developer
- Posts: 2049
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Hi,
Omar's code snippet was just fine. If you need a full example, look might look at the demo SCU from the CTK project.
Good luck,
Michael
Omar's code snippet was just fine. If you need a full example, look might look at the demo SCU from the CTK project.
Good luck,
Michael
-
- Posts: 85
- Joined: Sun, 2010-12-26, 17:34
thanks alot ,Michael Onken wrote:Hi,
Omar's code snippet was just fine. If you need a full example, look might look at the demo SCU from the CTK project.
Good luck,
Michael
what about read local dcm file , I need to read the image data as buffer
any suggestion please
-
- DCMTK Developer
- Posts: 2049
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
-
- Posts: 85
- Joined: Sun, 2010-12-26, 17:34
Who is online
Users browsing this forum: Google [Bot] and 1 guest