OFFIS DCMTK  Version 3.6.0
diutil.h
1 /*
2  *
3  * Copyright (C) 1994-2010, OFFIS e.V.
4  * All rights reserved. See COPYRIGHT file for details.
5  *
6  * This software and supporting documentation were partly developed by
7  *
8  * OFFIS e.V.
9  * R&D Division Health
10  * Escherweg 2
11  * D-26121 Oldenburg, Germany
12  *
13  * For further copyrights, see the following paragraphs.
14  *
15  */
16 
17 /*
18 ** Copyright (C) 1993/1994, OFFIS, Oldenburg University and CERIUM
19 **
20 ** This software and supporting documentation were
21 ** developed by
22 **
23 ** Institut OFFIS
24 ** Bereich Kommunikationssysteme
25 ** Westerstr. 10-12
26 ** 26121 Oldenburg, Germany
27 **
28 ** Fachbereich Informatik
29 ** Abteilung Prozessinformatik
30 ** Carl von Ossietzky Universitaet Oldenburg
31 ** Ammerlaender Heerstr. 114-118
32 ** 26111 Oldenburg, Germany
33 **
34 ** CERIUM
35 ** Laboratoire SIM
36 ** Faculte de Medecine
37 ** 2 Avenue du Pr. Leon Bernard
38 ** 35043 Rennes Cedex, France
39 **
40 ** for CEN/TC251/WG4 as a contribution to the Radiological
41 ** Society of North America (RSNA) 1993 Digital Imaging and
42 ** Communications in Medicine (DICOM) Demonstration.
43 **
44 ** THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND NEITHER OFFIS,
45 ** OLDENBURG UNIVERSITY NOR CERIUM MAKE ANY WARRANTY REGARDING
46 ** THE SOFTWARE, ITS PERFORMANCE, ITS MERCHANTABILITY OR
47 ** FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER
48 ** DISEASES OR ITS CONFORMITY TO ANY SPECIFICATION. THE
49 ** ENTIRE RISK AS TO QUALITY AND PERFORMANCE OF THE SOFTWARE
50 ** IS WITH THE USER.
51 **
52 ** Copyright of the software and supporting documentation
53 ** is, unless otherwise stated, jointly owned by OFFIS,
54 ** Oldenburg University and CERIUM and free access is hereby
55 ** granted as a license to use this software, copy this
56 ** software and prepare derivative works based upon this
57 ** software. However, any distribution of this software
58 ** source code or supporting documentation or derivative
59 ** works (source code and supporting documentation) must
60 ** include the three paragraphs of this copyright notice.
61 **
62 */
63 
64 /*
65 **
66 ** Author: Andrew Hewett Created: 11-08-93
67 **
68 ** Module: diutil
69 **
70 ** Purpose:
71 ** This file contains the interface to
72 ** some general useful dicom utility routines
73 **
74 ** Module Prefix: DU_
75 **
76 ** Last Update: $Author: joergr $
77 ** Update Date: $Date: 2010-12-01 08:26:10 $
78 ** CVS/RCS Revision: $Revision: 1.12 $
79 ** Status: $State: Exp $
80 **
81 ** CVS/RCS Log at end of file
82 */
83 
84 #ifndef DIUTIL_H
85 #define DIUTIL_H
86 
87 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
88 
89 #include "dcmtk/dcmnet/dicom.h"
90 #include "dcmtk/dcmdata/dcdatset.h"
91 #include "dcmtk/dcmnet/dimse.h"
92 #include "dcmtk/oflog/oflog.h"
93 
94 
95 OFLogger DCM_dcmnetGetLogger();
96 
97 #define DCMNET_TRACE(msg) OFLOG_TRACE(DCM_dcmnetGetLogger(), msg)
98 #define DCMNET_DEBUG(msg) OFLOG_DEBUG(DCM_dcmnetGetLogger(), msg)
99 #define DCMNET_INFO(msg) OFLOG_INFO(DCM_dcmnetGetLogger(), msg)
100 #define DCMNET_WARN(msg) OFLOG_WARN(DCM_dcmnetGetLogger(), msg)
101 #define DCMNET_ERROR(msg) OFLOG_ERROR(DCM_dcmnetGetLogger(), msg)
102 #define DCMNET_FATAL(msg) OFLOG_FATAL(DCM_dcmnetGetLogger(), msg)
103 
104 
105 char* DU_stripTrailingSpaces(char *s);
106 char* DU_stripLeadingSpaces(char *s);
107 char* DU_stripLeadingAndTrailingSpaces(char *s);
108 
109 OFBool DU_getStringDOElement(DcmItem *obj, DcmTagKey t, char *s);
110 OFBool DU_putStringDOElement(DcmItem *obj, DcmTagKey t, const char *s);
111 OFBool DU_getShortDOElement(DcmItem *obj, DcmTagKey t, Uint16 *us);
112 OFBool DU_putShortDOElement(DcmItem *obj, DcmTagKey t, Uint16 us);
113 
114 OFBool DU_findSOPClassAndInstanceInDataSet(
115  DcmItem *obj,
116  char* sopClass,
117  char* sopInstance,
118  OFBool tolerateSpacePaddedUIDs = OFFalse);
119 
120 OFBool DU_findSOPClassAndInstanceInFile(
121  const char *fname,
122  char* sopClass,
123  char* sopInstance,
124  OFBool tolerateSpacePaddedUIDs = OFFalse);
125 
126 const char *DU_cstoreStatusString(Uint16 statusCode);
127 const char *DU_cfindStatusString(Uint16 statusCode);
128 const char *DU_cmoveStatusString(Uint16 statusCode);
129 const char *DU_cgetStatusString(Uint16 statusCode);
130 
131 const char *DU_ncreateStatusString(Uint16 statusCode);
132 const char *DU_ngetStatusString(Uint16 statusCode);
133 const char *DU_nsetStatusString(Uint16 statusCode);
134 const char *DU_nactionStatusString(Uint16 statusCode);
135 const char *DU_ndeleteStatusString(Uint16 statusCode);
136 const char *DU_neventReportStatusString(Uint16 statusCode);
137 
138 #endif
139 
140 /*
141 ** CVS Log
142 ** $Log: diutil.h,v $
143 ** Revision 1.12 2010-12-01 08:26:10 joergr
144 ** Added OFFIS copyright header (beginning with the year 1994).
145 **
146 ** Revision 1.11 2010-10-14 13:17:22 joergr
147 ** Updated copyright header. Added reference to COPYRIGHT file.
148 **
149 ** Revision 1.10 2010-05-21 11:47:52 uli
150 ** Replaced DU_fileSize() with OFStandard::getFileSize().
151 **
152 ** Revision 1.9 2009-11-18 11:53:58 uli
153 ** Switched to logging mechanism provided by the "new" oflog module.
154 **
155 ** Revision 1.8 2007-07-12 12:18:00 onken
156 ** Added status codes and corresponding printing routines for DIMSE-N.
157 **
158 ** Revision 1.7 2005/12/08 16:02:22 meichel
159 ** Changed include path schema for all DCMTK header files
160 **
161 ** Revision 1.6 2002/11/25 18:00:37 meichel
162 ** Converted compile time option to leniently handle space padded UIDs
163 ** in the Storage Service Class into command line / config file option.
164 **
165 ** Revision 1.5 2000/02/03 11:50:11 meichel
166 ** Moved UID related functions from dcmnet (diutil.h) to dcmdata (dcuid.h)
167 ** where they belong. Renamed access functions to dcmSOPClassUIDToModality
168 ** and dcmGuessModalityBytes.
169 **
170 ** Revision 1.4 1999/06/10 10:56:35 meichel
171 ** Adapted imagectn to new command line option scheme.
172 ** Added support for Patient/Study Only Q/R model and C-GET (experimental).
173 **
174 ** Revision 1.3 1998/01/14 14:37:06 hewett
175 ** Added basic support for the Structured Reporting (SR) SOP Classes.
176 **
177 ** Revision 1.2 1997/07/21 08:40:11 andreas
178 ** - Replace all boolean types (BOOLEAN, CTNBOOLEAN, DICOM_BOOL, BOOL)
179 ** with one unique boolean type OFBool.
180 **
181 ** Revision 1.1.1.1 1996/03/26 18:38:45 hewett
182 ** Initial Release.
183 **
184 **
185 */


Generated on Thu Dec 20 2012 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.2