首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

DCMTK DCMSCU事例

2012-12-27 
DCMTK DCMSCU例子转载:http://forum.dcmtk.org/viewtopic.php?f1&t2812&hilitDCMNETconnect to PACS sy

DCMTK DCMSCU例子

转载:http://forum.dcmtk.org/viewtopic.php?f=1&t=2812&hilit=DCMNET

connect to PACS system biginner question

DCMTK DCMSCU事例?DCMTK DCMSCU事例Go to page?1AuthorMessage?Post subject:?connect to PACS system biginner questionDCMTK DCMSCU事例Posted:?Wed, 2011-01-26, 13:57?DCMTK DCMSCU事例?????Post subject:DCMTK DCMSCU事例Posted:?Wed, 2011-01-26, 14:59?DCMTK DCMSCU事例?????Post subject:DCMTK DCMSCU事例Posted:?Wed, 2011-01-26, 15:03?DCMTK DCMSCU事例?????Post subject:DCMTK DCMSCU事例Posted:?Wed, 2011-01-26, 15:33?DCMTK DCMSCU事例?????Post subject:DCMTK DCMSCU事例Posted:?Thu, 2011-01-27, 09:12?DCMTK DCMSCU事例?????Post subject:DCMTK DCMSCU事例Posted:?Thu, 2011-01-27, 11:49?DCMTK DCMSCU事例
Best regards,?
Michael

?????Post subject:DCMTK DCMSCU事例Posted:?Thu, 2011-01-27, 11:59?DCMTK DCMSCU事例
Best regards,
Michael

how can I do that in xcode , there're no direct compiler flag?

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>

?????Post subject:DCMTK DCMSCU事例Posted:?Thu, 2011-01-27, 12:10?DCMTK DCMSCU事例?????Post subject:DCMTK DCMSCU事例Posted:?Thu, 2011-01-27, 12:34?DCMTK DCMSCU事例?????Post subject:DCMTK DCMSCU事例Posted:?Thu, 2011-01-27, 12:38?DCMTK DCMSCU事例?????Post subject:DCMTK DCMSCU事例Posted:?Thu, 2011-01-27, 13:30?DCMTK DCMSCU事例?????Post subject:DCMTK DCMSCU事例Posted:?Thu, 2011-01-27, 13:51?DCMTK DCMSCU事例?????Post subject:DCMTK DCMSCU事例Posted:?Thu, 2011-01-27, 13:57?DCMTK DCMSCU事例?????Post subject:DCMTK DCMSCU事例Posted:?Thu, 2011-01-27, 14:54?DCMTK DCMSCU事例?????Post subject:DCMTK DCMSCU事例Posted:?Thu, 2011-01-27, 14:57?DCMTK DCMSCU事例????DCMTK DCMSCU事例?DCMTK DCMSCU事例Go to page?1DCMTK DCMSCU事例

DICOM @ OFFIS?Logout [ qimo601 ]??FAQ?? ?DCMTK DCMSCU事例?Search? ?DCMTK DCMSCU事例?Members? ?DCMTK DCMSCU事例?User Control PanelDCMTK DCMSCU事例?DCMTK DCMSCU事例Go to page?Previous??1AuthorMessage?Post subject:DCMTK DCMSCU事例Posted:?Thu, 2011-01-27, 16:43?DCMTK DCMSCU事例?????Post subject:DCMTK DCMSCU事例Posted:?Sat, 2011-03-19, 19:12?DCMTK DCMSCU事例?????Post subject:DCMTK DCMSCU事例Posted:?Mon, 2011-03-21, 11:07?DCMTK DCMSCU事例?????Post subject:DCMTK DCMSCU事例Posted:?Mon, 2011-03-21, 15:30?DCMTK DCMSCU事例?????Post subject:DCMTK DCMSCU事例Posted:?Mon, 2011-05-16, 20:04?DCMTK DCMSCU事例? ? return 2;
? }
??
? // Negotiate association
? result = scu.negotiateAssociation();
? if (result.bad())
? {
? ? std::cerr << "Error negotiating association: " << result.text() << "\n";
? ? return 2;
? }
??
? // Issue ECHO request and let scu find presentation context itself (0)
? result = scu.sendECHORequest(0);
? if (result.bad())
? {
? ? std::cerr << "Error issuing ECHO request or received rejecting response: " << result.text() << "\n";
? ? return 2;
? }
? std::cout << "Successfully sent DICOM Echo to host " << host << " on port " << port << "\n";
? return 0;
}

with this import :?
    #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
    #include "dcmtk/?????Post subject:DCMTK DCMSCU事例Posted:?Mon, 2011-05-23, 10:24?DCMTK DCMSCU事例?????Post subject:DCMTK DCMSCU事例Posted:?Mon, 2011-05-23, 16:50?DCMTK DCMSCU事例?????Post subject:DCMTK DCMSCU事例Posted:?Wed, 2011-05-25, 13:03?DCMTK DCMSCU事例?????Post subject:DCMTK DCMSCU事例Posted:?Wed, 2011-05-25, 16:44?DCMTK DCMSCU事例?????Post subject:DCMTK DCMSCU事例Posted:?Wed, 2011-05-25, 17:14?DCMTK DCMSCU事例
    static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v"
    ? OFFIS_DCMTK_VERSION " " OFFIS_DCMTK_RELEASEDATE " $";

    // our application entity title used for calling the peer machine
    #define APPLICATIONTITLE? ? ?"TEST-SCU"

    // host name of the peer machine
    #define PEERHOSTNAME? ? ? ? ?"www.dicomserver.co.uk"

    // TCP/IP port to connect to on peer machine
    #define PEERPORT 11112

    // application entity title of the peer machine
    #define PEERAPPLICATIONTITLE "MOVESCP"

    // MOVE target AE Title
    #define MOVEAPPLICATIONTITLE "TEST-SCU"

    static Uint8 findUncompressedPC(const OFString& sopClass,
    ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? DcmSCU& scu)
    {
    ? Uint8 pc;
    ? pc = scu.findPresentationContextID(sopClass, UID_LittleEndianExplicitTransferSyntax);
    ? if (pc == 0)
    ? ? scu.findPresentationContextID(sopClass, UID_BigEndianExplicitTransferSyntax);
    ? if (pc == 0)
    ? ? scu.findPresentationContextID(sopClass, UID_LittleEndianImplicitTransferSyntax);
    ? return pc;
    }

    // ********************************************

    int main(int argc, char *argv[])
    {
    ? /* Setup DICOM connection parameters */
    ? OFLog::configure(OFLogger::DEBUG_LOG_LEVEL);
    ? DcmTestSCU scu;
    ? // set AE titles
    ? scu.setAETitle(APPLICATIONTITLE);
    ? scu.setPeerHostName(PEERHOSTNAME);
    ? scu.setPeerPort(PEERPORT);
    ? scu.setPeerAETitle(PEERAPPLICATIONTITLE);
    ? // Use presentation context for FIND/MOVE in study root, propose all uncompressed transfer syntaxes
    ? OFList<OFString> ts;?
    ? ts.push_back(UID_LittleEndianExplicitTransferSyntax);
    ? ts.push_back(UID_BigEndianExplicitTransferSyntax);
    ? ts.push_back(UID_LittleEndianImplicitTransferSyntax);
    ? scu.addPresentationContext(UID_FINDStudyRootQueryRetrieveInformationModel, ts);
    ? scu.addPresentationContext(UID_MOVEStudyRootQueryRetrieveInformationModel, ts);
    ? scu.addPresentationContext(UID_VerificationSOPClass, ts);

    ? /* Initialize network */
    ? OFCondition result = scu.initNetwork();
    ? if (result.bad())
    ? {
    ? ? DCMNET_ERROR("Unable to set up the network: " << result.text());
    ? ? return 1;
    ? }

    ? /* Negotiate Association */
    ? result = scu.negotiateAssociation();
    ? if (result.bad())
    ? {
    ? ? DCMNET_ERROR("Unable to negotiate association: " << result.text());
    ? ? return 1;
    ? }

    ? /* Let's look whether the server is listening:?
    ? ? ?Assemble and send C-ECHO request?
    ? ?*/
    ? result = scu.sendECHORequest(0);
    ? if (result.bad())
    ? {
    ? ? DCMNET_ERROR("Could not process C-ECHO with the server: " << result.text());
    ? ? return 1;
    ? }


    ? /* Assemble and send C-FIND request */
    ? FINDResponses findResponses;
    ? DcmDataset req;
    ? req.putAndInsertOFStringArray(DCM_QueryRetrieveLevel, "STUDY");
    ? req.putAndInsertOFStringArray(DCM_StudyInstanceUID, "");
    ? T_ASC_PresentationContextID presID = findUncompressedPC(UID_FINDStudyRootQueryRetrieveInformationModel, scu);
    ? if (presID == 0)
    ? {
    ? ? DCMNET_ERROR("There is no uncompressed presentation context for Study Root FIND");
    ? ? return 1;
    ? }
    ? result = scu.sendFINDRequest(presID, &req, &findResponses);
    ? if (result.bad())
    ? ? return 1;
    ? else?
    ? ? DCMNET_INFO("There are " << findResponses.numResults() << " studies available");

    ? /* Assemble and send C-MOVE request, for each study identified above*/
    ? presID = findUncompressedPC(UID_MOVEStudyRootQueryRetrieveInformationModel, scu);
    ? if (presID == 0)
    ? {
    ? ? DCMNET_ERROR("There is no uncompressed presentation context for Study Root MOVE");
    ? ? return 1;
    ? }
    ? OFListIterator(FINDResponse*) study = findResponses.begin();
    ? Uint32 studyCount = 1;
    ? OFBool failed = OFFalse;
    ? while (study != findResponses.end() && result.good())
    ? {
    ? ? // Every loop run will get all image for a specific study
    ? ? MOVEResponses moveResponses;
    ? ? // be sure we are not in the last response which does not have a dataset
    ? ? if ( (*study)->m_dataset != NULL)
    ? ? {
    ? ? ? OFString studyInstanceUID;
    ? ? ? result = (*study)->m_dataset->findAndGetOFStringArray(DCM_StudyInstanceUID, studyInstanceUID);
    ? ? ? // only try to get study if we actually have study instance uid, otherwise skip it
    ? ? ? if (result.good())
    ? ? ? {
    ? ? ? ? req.putAndInsertOFStringArray(DCM_StudyInstanceUID, studyInstanceUID);
    ? ? ? ? // fetches all images of this particular study
    ? ? ? ? result = scu.sendMOVERequest(presID, MOVEAPPLICATIONTITLE, &req, &moveResponses);
    ? ? ? ? if (result.good())
    ? ? ? ? {
    ? ? ? ? ? DCMNET_INFO("Received study #" << std::setw(7) << studyCount << ": " << studyInstanceUID);
    ? ? ? ? ? studyCount++;
    ? ? ? ? }
    ? ? ? }
    ? ? }
    ? ? study++;
    ? }
    ? if (result.bad())
    ? {
    ? ? DCMNET_ERROR("Unable to retrieve all studies: " << result.text());
    ? }
    ? /* Release association */
    ? scu.closeAssociation(DCMSCU_RELEASE_ASSOCIATION);
    ? return 0;
    }

    P.S: The header file would be trivial:?
    ?????Post subject:?Can't find the method scu.sendMOVERequestDCMTK DCMSCU事例Posted:?Sun, 2011-07-24, 05:17?DCMTK DCMSCU事例
    Thanks in advance?

    with regards?
    Manoj Kumar D?????Post subject:DCMTK DCMSCU事例Posted:?Tue, 2011-07-26, 11:54?DCMTK DCMSCU事例
    I recommend you to use the?lastest snapshot.?

    MIchael

    ?????Post subject:DCMTK DCMSCU事例Posted:?Thu, 2011-08-04, 23:49?DCMTK DCMSCU事例?

    But on this way - i wanna say thank you for the example and the dcmtk code.?DCMTK DCMSCU事例?

    Thank you

    ?????Post subject:DCMTK DCMSCU事例Posted:?Fri, 2011-08-05, 12:05?DCMTK DCMSCU事例?????Post subject:?Getting Will not wait for further C-MOVE responsesDCMTK DCMSCU事例Posted:?Fri, 2011-08-12, 17:42?DCMTK DCMSCU事例
    Please help me out I m a beginner for PACS Server.?

    Thanx in advance.????DCMTK DCMSCU事例?DCMTK DCMSCU事例Go to page?Previous??1DCMTK DCMSCU事例

    DICOM @ OFFIS?Logout [ qimo601 ]??FAQ?? ?DCMTK DCMSCU事例?Search? ?DCMTK DCMSCU事例?Members? ?DCMTK DCMSCU事例?User Control PanelDCMTK DCMSCU事例?DCMTK DCMSCU事例Go to page?Previous??1AuthorMessage?Post subject:DCMTK DCMSCU事例Posted:?Mon, 2011-08-15, 09:14?DCMTK DCMSCU事例????