dcmqrcbs.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 DcmQueryRetrieveStoreContext
00023  *
00024  *  Last Update:      $Author: joergr $
00025  *  Update Date:      $Date: 2005/12/15 12:38:00 $
00026  *  Source File:      $Source: /share/dicom/cvs-depot/dcmtk/dcmqrdb/include/dcmtk/dcmqrdb/dcmqrcbs.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 DCMQRCBS_H
00035 #define DCMQRCBS_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 DcmFileFormat;
00043 
00047 class DcmQueryRetrieveStoreContext
00048 {
00049 public:
00057     DcmQueryRetrieveStoreContext(
00058       DcmQueryRetrieveDatabaseHandle& handle,
00059       const DcmQueryRetrieveOptions& options,
00060       DIC_US s,
00061       DcmFileFormat *ff,
00062       OFBool correctuidpadding)         
00063     : dbHandle(handle)
00064     , options_(options)
00065     , status(s)
00066     , fileName(NULL)
00067     , dcmff(ff)
00068     , correctUIDPadding(correctuidpadding)
00069     {
00070     }
00071 
00075     void setStatus(DIC_US s) { status = s; }
00076 
00078     DIC_US getStatus() const { return status; }
00079 
00083     void setFileName(const char *fn) { fileName = fn; }
00084 
00093     void callbackHandler(
00094         T_DIMSE_StoreProgress *progress,
00095         T_DIMSE_C_StoreRQ *req,
00096         char *imageFileName,
00097         DcmDataset **imageDataSet,
00098         T_DIMSE_C_StoreRSP *rsp,
00099         DcmDataset **stDetail);
00100 
00101 private:
00102 
00103     void updateDisplay(T_DIMSE_StoreProgress * progress);
00104 
00105     void saveImageToDB(
00106         T_DIMSE_C_StoreRQ *req,             /* original store request */
00107         const char *imageFileName,
00108         /* out */
00109         T_DIMSE_C_StoreRSP *rsp,            /* final store response */
00110         DcmDataset **stDetail);
00111 
00112     void writeToFile(
00113         DcmFileFormat *ff,
00114         const char* fname,
00115         T_DIMSE_C_StoreRSP *rsp);
00116 
00117     void checkRequestAgainstDataset(
00118         T_DIMSE_C_StoreRQ *req,     /* original store request */
00119         const char* fname,          /* filename of dataset */
00120         DcmDataset *dataSet,        /* dataset to check */
00121         T_DIMSE_C_StoreRSP *rsp,    /* final store response */
00122         OFBool uidPadding);         /* correct UID padding */
00123 
00125     DcmQueryRetrieveDatabaseHandle& dbHandle;
00126 
00128     const DcmQueryRetrieveOptions& options_;
00129 
00131     DIC_US status;
00132 
00134     const char *fileName;
00135 
00137     DcmFileFormat *dcmff;
00138 
00140     OFBool correctUIDPadding;
00141     
00142 };
00143 
00144 #endif
00145 
00146 /*
00147  * CVS Log
00148  * $Log: dcmqrcbs.h,v $
00149  * Revision 1.3  2005/12/15 12:38:00  joergr
00150  * Removed naming conflicts.
00151  *
00152  * Revision 1.2  2005/12/08 16:04:19  meichel
00153  * Changed include path schema for all DCMTK header files
00154  *
00155  * Revision 1.1  2005/03/30 13:34:50  meichel
00156  * Initial release of module dcmqrdb that will replace module imagectn.
00157  *   It provides a clear interface between the Q/R DICOM front-end and the
00158  *   database back-end. The imagectn code has been re-factored into a minimal
00159  *   class structure.
00160  *
00161  *
00162  */


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