SignDICOMServer.h

Go to the documentation of this file.
00001 /*
00002  *
00003  * Program:   Slicer Image-Guided Navigator (The SIGN)
00004  * Module:    $RCSfile: SignDICOMServer.h,v $
00005  */
00016 #ifndef _SIGNDICOMSERVER_H_
00017 #define _SIGNDICOMSERVER_H_
00018 
00019 //to make dcmtk happy
00020 #ifdef HAVE_DICOM
00021 #ifndef WIN32
00022 #define HAVE_CONFIG_H 1
00023 #endif
00024 
00025 #include <string>
00026 
00027 #include <dcmtk/dcmdata/dcerror.h>
00028 #include <dcmtk/dcmnet/assoc.h>
00029 
00030 #include <SignDLL.h>
00031 #include <vtkMultiThreader.h>
00032 
00033 class SignContext;
00034 class vtkMultiThreader;
00035 struct T_ASC_Association;
00036 struct T_DIMSE_Message;
00037 struct T_DIMSE_StoreProgress;
00038 struct T_DIMSE_C_StoreRQ;
00039 class DcmDataset;
00040 struct T_DIMSE_C_StoreRSP;
00041 
00042 class SIGN_EXPORT SignDICOMServer
00043 {
00044  public:
00047   static void Run(SignContext* context);
00048 
00051   static bool stopServer;
00052 
00054   static void Stop();
00055 
00057   static bool running;
00058 
00059  private:
00060   static vtkThreadFunctionType DICOMServerProcess(void* data);
00061   static OFCondition processCommands(T_ASC_Association * assoc);
00062   static OFCondition storeSCP(T_ASC_Association *assoc, T_DIMSE_Message *msg, T_ASC_PresentationContextID presID);
00063   static void storeSCPCallback(
00064                                void *callbackData,
00065                                T_DIMSE_StoreProgress *progress,
00066                                T_DIMSE_C_StoreRQ *req,
00067                                char * /*imageFileName*/, DcmDataset **imageDataSet,
00068                                T_DIMSE_C_StoreRSP *rsp,
00069                                DcmDataset **statusDetail);
00070   static void executeEndOfStudyEvents();
00071 
00072   static vtkMultiThreader* threadControl;
00073   //static std::string configFileName;
00074   static int threadID;
00075   static char * storageArea;
00076   static OFList<OFString> outputFileNameArray;
00077   static OFString lastStudyInstanceUID;
00078   static OFString lastPatientsName;
00079   static OFString subdirectoryPathAndName;
00080   static OFString lastStudySubdirectoryPathAndName;
00081   static OFBool endOfStudyThroughTimeoutEvent;
00082   static SignContext *context;
00083   static long opt_endOfStudyTimeout;
00084   static OFString lastImageFileName;
00085 };
00086 
00087 #endif
00088 #endif

Generated on Mon Feb 26 12:11:16 2007 for TheSIGN by  doxygen 1.4.6