dcmqrcbg.h

00001 /*
00002  *
00003  *  Copyright (C) 1993-2005, OFFIS
00004  *
00005  *  This software and supporting documentation were developed by
00006  *
00007  *    Kuratorium OFFIS e.V.
00008  *    Healthcare Information and Communication Systems
00009  *    Escherweg 2
00010  *    D-26121 Oldenburg, Germany
00011  *
00012  *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
00013  *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
00014  *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
00015  *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
00016  *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
00017  *
00018  *  Module:  dcmqrdb
00019  *
00020  *  Author:  Marco Eichelberg
00021  *
00022  *  Purpose: class DcmQueryRetrieveGetContext
00023  *
00024  *  Last Update:      $Author: joergr $
00025  *  Update Date:      $Date: 2005/12/15 08:32:49 $
00026  *  Source File:      $Source: /share/dicom/cvs-depot/dcmtk/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrcbg.h,v $
00027  *  CVS/RCS Revision: $Revision: 1.3 $
00028  *  Status:           $State: Exp $
00029  *
00030  *  CVS/RCS Log at end of file
00031  *
00032  */
00033 
00034 #ifndef DCMQRCBG_H
00035 #define DCMQRCBG_H
00036 
00037 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
00038 #include "dcmtk/dcmnet/dimse.h"
00039 
00040 class DcmQueryRetrieveDatabaseHandle;
00041 class DcmQueryRetrieveOptions;
00042 class DcmQueryRetrieveDatabaseStatus;
00043 
00047 class DcmQueryRetrieveGetContext
00048 {
00049 public:
00059     DcmQueryRetrieveGetContext(DcmQueryRetrieveDatabaseHandle& handle,
00060       const DcmQueryRetrieveOptions& options,
00061       DIC_US priorstatus,
00062       T_ASC_Association *origassoc,
00063       DIC_US origmsgid,
00064       T_DIMSE_Priority prior,
00065       T_ASC_PresentationContextID origpresid)
00066     : dbHandle(handle)
00067     , options_(options)
00068     , priorStatus(priorstatus)
00069     , origAssoc(origassoc)
00070     , assocStarted(OFFalse)
00071     , origPresId(origpresid)
00072     , origMsgId(origmsgid)
00073 //    , origAETitle()
00074 //    , origHostName()
00075     , priority(prior)
00076 //    , ourAETitle()
00077     , failedUIDs(NULL)
00078     , nRemaining(0)
00079     , nCompleted(0)
00080     , nFailed(0)
00081     , nWarning(0)
00082     , getCancelled(OFFalse)
00083     {
00084       origAETitle[0] = '\0';
00085       origHostName[0] = '\0';
00086       ourAETitle[0] = '\0';
00087     }
00088 
00090     OFBool isVerbose() const;
00091 
00095     void setOurAETitle(const char *ae)
00096     {
00097       if (ae) ourAETitle = ae; else ourAETitle.clear();
00098     }
00099     
00109     void callbackHandler(
00110     /* in */ 
00111     OFBool cancelled, T_DIMSE_C_GetRQ *request, 
00112     DcmDataset *requestIdentifiers, int responseCount,
00113     /* out */
00114     T_DIMSE_C_GetRSP *response, DcmDataset **stDetail,  
00115     DcmDataset **responseIdentifiers);
00116 
00117 private:
00118 
00119     void addFailedUIDInstance(const char *sopInstance);
00120     OFCondition performGetSubOp(DIC_UI sopClass, DIC_UI sopInstance, char *fname);
00121     void getNextImage(DcmQueryRetrieveDatabaseStatus * dbStatus);
00122     void buildFailedInstanceList(DcmDataset ** rspIds);
00123 
00125     DcmQueryRetrieveDatabaseHandle& dbHandle;
00126 
00128     const DcmQueryRetrieveOptions& options_;
00129 
00131     DIC_US  priorStatus;
00132 
00134     T_ASC_Association   *origAssoc;
00135 
00137     OFBool assocStarted;
00138     
00140     T_ASC_PresentationContextID origPresId;
00141 
00143     DIC_US origMsgId;
00144 
00146     OFString origAETitle;
00147 
00149     DIC_NODENAME origHostName;
00150 
00151 
00153     T_DIMSE_Priority priority;
00154 
00156     OFString ourAETitle; 
00157 
00159     char *failedUIDs;
00160 
00162     DIC_US nRemaining; 
00163 
00165     DIC_US nCompleted; 
00166 
00168     DIC_US nFailed; 
00169 
00171     DIC_US nWarning;
00172 
00174     OFBool getCancelled;
00175 
00176 };
00177 
00178 #endif
00179 
00180 /*
00181  * CVS Log
00182  * $Log: dcmqrcbg.h,v $
00183  * Revision 1.3  2005/12/15 08:32:49  joergr
00184  * Fixed issue with initialization of array member variables, reported by egcs
00185  * on Solaris. Fixed missing/wrong initialization of member variables.
00186  *
00187  * Revision 1.2  2005/12/08 16:04:17  meichel
00188  * Changed include path schema for all DCMTK header files
00189  *
00190  * Revision 1.1  2005/03/30 13:34:50  meichel
00191  * Initial release of module dcmqrdb that will replace module imagectn.
00192  *   It provides a clear interface between the Q/R DICOM front-end and the
00193  *   database back-end. The imagectn code has been re-factored into a minimal
00194  *   class structure.
00195  *
00196  *
00197  */


Generated on 20 Dec 2005 for OFFIS DCMTK Version 3.5.4 by Doxygen 1.4.5