imagectn/apps/ti.h

00001 /* 00002 * 00003 * Copyright (C) 1993-2001, 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: imagectn 00019 * 00020 * Author: Andrew Hewett 00021 * 00022 * Purpose: TI Common Constants, Types, Globals and Functions 00023 * 00024 * Last Update: $Author: wilkens $ 00025 * Update Date: $Date: 2002/11/29 07:18:16 $ 00026 * Source File: $Source: /share/dicom/cvs-depot/dcmtk/imagectn/apps/ti.h,v $ 00027 * CVS/RCS Revision: $Revision: 1.8 $ 00028 * Status: $State: Exp $ 00029 * 00030 * CVS/RCS Log at end of file 00031 * 00032 */ 00033 00034 #ifndef TI_H 00035 #define TI_H 00036 00037 #include "osconfig.h" /* make sure OS specific configuration is included first */ 00038 00039 #include "dicom.h" 00040 #include "cond.h" 00041 #include "assoc.h" 00042 #include "dimse.h" 00043 #include "ofcmdln.h" 00044 #include "cnf.h" 00045 #include "imagedb.h" 00046 00047 /* 00048 * Constants 00049 */ 00050 00051 #define TI_MAXPEERS 100 00052 #define TI_MAXDATABASES 100 00053 #define TI_MAXSTUDIES 1000 00054 #define TI_MAXSERIES 500 00055 #define TI_MAXIMAGES 1000 00056 00057 /* 00058 * Type definitions 00059 */ 00060 00061 typedef struct { 00062 DIC_UI sopInstanceUID; 00063 DIC_IS imageNumber; 00064 int intImageNumber; 00065 } TI_ImageEntry; 00066 00067 typedef struct { 00068 DIC_UI seriesInstanceUID; 00069 DIC_IS seriesNumber; 00070 int intSeriesNumber; 00071 DIC_CS modality; 00072 TI_ImageEntry *images[TI_MAXIMAGES]; /* array of image pointers */ 00073 int imageCount; 00074 00075 time_t lastQueryTime; /* time we last queried db */ 00076 } TI_SeriesEntry; 00077 00078 typedef struct { 00079 DIC_UI studyInstanceUID; 00080 DIC_CS studyID; 00081 DIC_PN patientsName; 00082 DIC_LO patientID; 00083 TI_SeriesEntry *series[TI_MAXSERIES]; /* array of series pointers */ 00084 int seriesCount; 00085 time_t lastQueryTime; /* time we last queried db */ 00086 } TI_StudyEntry; 00087 00088 00089 typedef struct { 00090 const char *title; /* the CTN AE Title associated with this DB */ 00091 00092 const char **peerTitles; /* peer titles which can read this database 00093 * and thus we can comminicate with */ 00094 int peerTitleCount; /* number of peer titles */ 00095 00096 DB_Handle *dbHandle; /* handle to current db */ 00097 00098 TI_StudyEntry *studies[TI_MAXSTUDIES]; /* array of study pointers */ 00099 int studyCount; 00100 00101 int currentStudy; /* index of current study */ 00102 int currentSeries; /* index of current series in current study */ 00103 int currentImage; /* index of current image in current study */ 00104 00105 time_t lastQueryTime; /* time we last queried db */ 00106 00107 OFBool isRemoteDB; /* true if DB is remote */ 00108 00109 } TI_DBEntry; 00110 00111 typedef struct { 00112 TI_DBEntry **dbEntries; /* the CTN databases we know */ 00113 int dbCount; /* number of entries in databases we know */ 00114 00115 const char *peerHostName; /* peer to talk to */ 00116 const char *peerNames[TI_MAXPEERS]; 00117 int peerNamesCount; 00118 00119 const char *myAETitle; /* my application entity title */ 00120 00121 T_ASC_Network *net; /* active network */ 00122 T_ASC_Association *assoc; /* currently active association */ 00123 00124 OFCmdUnsignedInt maxReceivePDULength; /* number of bytes we can receive */ 00125 00126 int currentdb; /* current database index */ 00127 const char *currentPeerTitle; /* current peer title */ 00128 00129 } TI_Config; 00130 00131 00132 /* 00133 * Common Globals (defined in ti.c) 00134 */ 00135 00136 extern char* progname; 00137 extern OFBool verbose; 00138 extern OFBool debug; 00139 extern E_TransferSyntax networkTransferSyntax; 00140 00141 /* 00142 * Common Function Definitions 00143 */ 00144 00145 extern void errmsg(const char* msg, ...); 00146 00147 00148 00149 #endif 00150 00151 /* 00152 ** CVS Log 00153 ** $Log: ti.h,v $ 00154 ** Revision 1.8 2002/11/29 07:18:16 wilkens 00155 ** Adapted ti utility to command line classes and added option '-xi'. 00156 ** 00157 ** Revision 1.7 2001/11/12 14:54:23 meichel 00158 ** Removed all ctndisp related code from imagectn 00159 ** 00160 ** Revision 1.6 2001/10/12 12:42:56 meichel 00161 ** Adapted imagectn to OFCondition based dcmnet module (supports strict mode). 00162 ** 00163 ** Revision 1.5 2001/06/01 15:51:22 meichel 00164 ** Updated copyright header 00165 ** 00166 ** Revision 1.4 2000/03/08 16:41:02 meichel 00167 ** Updated copyright header. 00168 ** 00169 ** Revision 1.3 1999/06/10 12:12:03 meichel 00170 ** Adapted imagectn to new command line option scheme. 00171 ** Added support for Patient/Study Only Q/R model and C-GET (experimental). 00172 ** 00173 ** Revision 1.2 1997/07/21 08:59:46 andreas 00174 ** - Replace all boolean types (BOOLEAN, CTNBOOLEAN, DICOM_BOOL, BOOL) 00175 ** with one unique boolean type OFBool. 00176 ** 00177 ** Revision 1.1 1996/04/22 10:27:25 hewett 00178 ** Initial release. 00179 ** 00180 */


Generated on 4 Nov 2004 for OFFIS DCMTK Version 3.5.3 by Doxygen 1.3.8