/usr/include/dcmtk/dcmqrdb/dcmqrtis.h is in libdcmtk2-dev 3.6.0-9.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | /*
*
* Copyright (C) 1993-2010, OFFIS e.V.
* All rights reserved. See COPYRIGHT file for details.
*
* This software and supporting documentation were developed by
*
* OFFIS e.V.
* R&D Division Health
* Escherweg 2
* D-26121 Oldenburg, Germany
*
*
* Module: dcmqrdb
*
* Author: Andrew Hewett
*
* Purpose: TI Common Constants, Types, Globals and Functions
*
* Last Update: $Author: joergr $
* Update Date: $Date: 2010-10-14 13:16:41 $
* CVS/RCS Revision: $Revision: 1.8 $
* Status: $State: Exp $
*
* CVS/RCS Log at end of file
*
*/
#ifndef DCMQRTIS_H
#define DCMQRTIS_H
#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
#include "dcmtk/dcmnet/dicom.h"
#include "dcmtk/dcmnet/cond.h"
#include "dcmtk/dcmnet/assoc.h"
#include "dcmtk/dcmnet/dimse.h"
#include "dcmtk/ofstd/ofcmdln.h"
#include "dcmtk/dcmqrdb/dcmqrcnf.h"
class DcmQueryRetrieveDatabaseHandle;
/*
* Constants
*/
#define TI_MAXPEERS 100
#define TI_MAXDATABASES 100
#define TI_MAXSTUDIES 1000
#define TI_MAXSERIES 500
#define TI_MAXIMAGES 1000
/*
* Type definitions
*/
struct TI_ImageEntry
{
DIC_UI sopInstanceUID;
DIC_IS imageNumber;
int intImageNumber;
} ;
struct TI_SeriesEntry
{
DIC_UI seriesInstanceUID;
DIC_IS seriesNumber;
int intSeriesNumber;
DIC_CS modality;
TI_ImageEntry *images[TI_MAXIMAGES]; /* array of image pointers */
int imageCount;
time_t lastQueryTime; /* time we last queried db */
};
struct TI_StudyEntry
{
DIC_UI studyInstanceUID;
DIC_CS studyID;
DIC_PN patientName;
DIC_LO patientID;
TI_SeriesEntry *series[TI_MAXSERIES]; /* array of series pointers */
int seriesCount;
time_t lastQueryTime; /* time we last queried db */
};
struct TI_DBEntry
{
const char *title; /* the CTN AE Title associated with this DB */
const char **peerTitles; /* peer titles which can read this database
* and thus we can comminicate with */
int peerTitleCount; /* number of peer titles */
DcmQueryRetrieveDatabaseHandle *dbHandle; /* handle to current db */
TI_StudyEntry *studies[TI_MAXSTUDIES]; /* array of study pointers */
int studyCount;
int currentStudy; /* index of current study */
int currentSeries; /* index of current series in current study */
int currentImage; /* index of current image in current study */
time_t lastQueryTime; /* time we last queried db */
OFBool isRemoteDB; /* true if DB is remote */
};
struct TI_GenericCallbackStruct
{
TI_DBEntry *db;
TI_StudyEntry *study;
TI_SeriesEntry *series;
};
typedef OFBool (*TI_GenericEntryCallbackFunction)(TI_GenericCallbackStruct *cbstruct, DcmDataset *reply);
/** this class provides the functionality of the telnet initiator application
*/
class DcmQueryRetrieveTelnetInitiator
{
public:
/** constructor
* @param cfg configuration facility
*/
DcmQueryRetrieveTelnetInitiator(DcmQueryRetrieveConfig &cfg);
/** main entry point for console-based user interface
*/
void TI_userInput();
/** add remote peer to list of peers
* @param peerName name of peer
* @param configFileName name of configuration file from which peer was read
*/
OFBool addPeerName(const char *peerName, const char *configFileName);
/** print TI configuration to stdout
*/
void printConfig();
/** detach current association
* @param abortFlag if true, abort association instead of releasing it
*/
OFBool TI_detachAssociation(OFBool abortFlag);
/** set local aetitle
* @param ae aetitle
*/
void setAETitle(const char *ae)
{
myAETitle = ae;
}
/** set max receive PDU
* @param pdu max receive PDU size
*/
void setMaxPDU(OFCmdUnsignedInt pdu)
{
maxReceivePDULength = pdu;
}
/** activate first peer in list of peers
*/
void activateFirstPeer()
{
peerHostName = peerNames[0];
}
/** provide read/write access to network structure maintained by this object.
* Yes, this is ugly.
* @return pointer to pointer to network structure
*/
T_ASC_Network **accessNet()
{
return &net;
}
/// return number of databases
int getdbCount() const
{
return dbCount;
}
/** create configuration entries for remote databases
* @param configFileName name of configuration file
* @param remoteDBTitlesCount number of remote DB titles
* @param remoteDBTitles list of remote DB titles
*/
void createConfigEntries(
const char *configFileName,
int remoteDBTitlesCount,
const char **remoteDBTitles);
/** set the network transfer syntax
* @param xfer new network transfer syntax
*/
void setXferSyntax(E_TransferSyntax xfer) { networkTransferSyntax = xfer; }
/** set blocking mode and timeout for DIMSE operations
* @param blockMode blocking mode for DIMSE operations
* @param timeout timeout for DIMSE operations
*/
void setBlockMode(T_DIMSE_BlockingMode blockMode, int timeout)
{
blockMode_ = blockMode;
dimse_timeout_ = timeout;
}
private:
OFBool TI_attachAssociation();
OFBool TI_changeAssociation();
OFBool TI_sendEcho();
OFBool TI_storeImage(char *sopClass, char *sopInstance, char * imgFile);
OFBool TI_remoteFindQuery(
TI_DBEntry *db, DcmDataset *query,
TI_GenericEntryCallbackFunction callbackFunction,
TI_GenericCallbackStruct *callbackData);
OFBool TI_title(int arg, const char * /*cmdbuf*/ );
OFBool TI_attachDB(TI_DBEntry *db);
OFBool TI_database(int arg, const char * /*cmdbuf*/ );
OFBool TI_echo(int arg, const char * /*cmdbuf*/ );
OFBool TI_quit(int arg, const char * /*cmdbuf*/ );
OFBool TI_actualizeStudies();
OFBool TI_study(int arg, const char * /*cmdbuf*/ );
OFBool TI_actualizeSeries();
OFBool TI_series(int arg, const char * /*cmdbuf*/ );
OFBool TI_actualizeImages();
OFBool TI_image(int arg, const char * /*cmdbuf*/ );
OFBool TI_buildStudies(TI_DBEntry *db);
OFBool TI_buildSeries(TI_DBEntry *db, TI_StudyEntry *study);
OFBool TI_buildRemoteImages(TI_DBEntry *db, TI_StudyEntry *study, TI_SeriesEntry *series);
OFBool TI_buildImages(TI_DBEntry *db, TI_StudyEntry *study, TI_SeriesEntry *series);
OFBool TI_sendStudy(int arg, const char * /*cmdbuf*/ );
OFBool TI_sendSeries(int arg, const char * /*cmdbuf*/ );
OFBool TI_sendImage(int arg, const char * /*cmdbuf*/ );
OFBool TI_send(int /*arg*/, const char *cmdbuf);
OFBool TI_shortHelp(int /*arg*/ , const char * /*cmdbuf*/ );
OFBool TI_help(int arg, const char * /*cmdbuf*/ );
OFBool TI_buildRemoteStudies(TI_DBEntry *db);
OFBool TI_buildRemoteSeries(TI_DBEntry *db, TI_StudyEntry *study);
OFBool TI_dbReadable(const char *dbTitle);
time_t TI_dbModifyTime(const char *dbTitle);
OFCondition addPresentationContexts(T_ASC_Parameters *params);
OFBool findDBPeerTitles(
const char *configFileName,
TI_DBEntry *dbEntry,
const char *peer);
/// the CTN databases we know
TI_DBEntry **dbEntries;
/// number of entries in databases we know
int dbCount;
/// current peer to talk to
const char *peerHostName;
/// list of peer names
const char *peerNames[TI_MAXPEERS];
/// number of peer names in list
int peerNamesCount;
/// my application entity title
const char *myAETitle;
/// active network
T_ASC_Network *net;
/// currently active association
T_ASC_Association *assoc;
/// number of bytes per PDU we can receive
OFCmdUnsignedInt maxReceivePDULength;
/// current database index
int currentdb;
/// current peer title
const char *currentPeerTitle;
/// configuration facility
DcmQueryRetrieveConfig& config;
/// network transfer syntax
E_TransferSyntax networkTransferSyntax;
/// blocking mode for DIMSE operations
T_DIMSE_BlockingMode blockMode_;
/// timeout for DIMSE operations
int dimse_timeout_;
};
#endif
/*
* CVS Log
* $Log: dcmqrtis.h,v $
* Revision 1.8 2010-10-14 13:16:41 joergr
* Updated copyright header. Added reference to COPYRIGHT file.
*
* Revision 1.7 2010-08-09 13:23:00 joergr
* Updated data dictionary to 2009 edition of the DICOM standard. From now on,
* the official "keyword" is used for the attribute name which results in a
* number of minor changes (e.g. "PatientsName" is now called "PatientName").
*
* Revision 1.6 2009-11-24 10:10:42 uli
* Switched to logging mechanism provided by the "new" oflog module.
*
* Revision 1.5 2009-08-21 09:50:07 joergr
* Replaced tabs by spaces and updated copyright date.
*
* Revision 1.4 2005/12/08 16:04:28 meichel
* Changed include path schema for all DCMTK header files
*
* Revision 1.3 2005/11/17 13:44:37 meichel
* Added command line options for DIMSE and ACSE timeouts
*
* Revision 1.2 2005/06/16 08:03:51 meichel
* Fixed typo in method name
*
* Revision 1.1 2005/03/30 13:34:50 meichel
* Initial release of module dcmqrdb that will replace module imagectn.
* It provides a clear interface between the Q/R DICOM front-end and the
* database back-end. The imagectn code has been re-factored into a minimal
* class structure.
*
*
*/
|