OFFIS DCMTK  Version 3.6.0
dcvrcs.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 developed by
7  *
8  * OFFIS e.V.
9  * R&D Division Health
10  * Escherweg 2
11  * D-26121 Oldenburg, Germany
12  *
13  *
14  * Module: dcmdata
15  *
16  * Author: Gerd Ehlers, Andreas Barth
17  *
18  * Purpose: Interface of class DcmCodeString
19  *
20  * Last Update: $Author: joergr $
21  * Update Date: $Date: 2010-11-05 09:34:11 $
22  * CVS/RCS Revision: $Revision: 1.25 $
23  * Status: $State: Exp $
24  *
25  * CVS/RCS Log at end of file
26  *
27  */
28 
29 
30 #ifndef DCVRCS_H
31 #define DCVRCS_H
32 
33 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
34 
35 #include "dcmtk/dcmdata/dcbytstr.h"
36 
37 
41  : public DcmByteString
42 {
43 
44  public:
45 
51  DcmCodeString(const DcmTag &tag,
52  const Uint32 len = 0);
53 
57  DcmCodeString(const DcmCodeString &old);
58 
61  virtual ~DcmCodeString();
62 
68 
72  virtual DcmObject *clone() const
73  {
74  return new DcmCodeString(*this);
75  }
76 
89  virtual OFCondition copyFrom(const DcmObject& rhs);
90 
94  virtual DcmEVR ident() const;
95 
103  virtual OFCondition checkValue(const OFString &vm = "1-n",
104  const OFBool oldFormat = OFFalse);
105 
112  virtual OFCondition getOFString(OFString &stringVal,
113  const unsigned long pos,
114  OFBool normalize = OFTrue);
115 
116  /* --- static helper functions --- */
117 
128  static OFBool checkVR(const OFString &value,
129  size_t *pos = NULL,
130  const OFBool checkLength = OFTrue);
131 
140  static OFCondition checkStringValue(const OFString &value,
141  const OFString &vm = "1-n");
142 };
143 
144 
145 #endif // DCVRCS_H
146 
147 
148 /*
149 ** CVS/RCS Log:
150 ** $Log: dcvrcs.h,v $
151 ** Revision 1.25 2010-11-05 09:34:11 joergr
152 ** Added support for checking the value multiplicity "9" (see Supplement 131).
153 **
154 ** Revision 1.24 2010-10-14 13:15:42 joergr
155 ** Updated copyright header. Added reference to COPYRIGHT file.
156 **
157 ** Revision 1.23 2010-04-23 15:26:12 joergr
158 ** Specify an appropriate default value for the "vm" parameter of checkValue().
159 **
160 ** Revision 1.22 2010-04-23 14:25:27 joergr
161 ** Added new method to all VR classes which checks whether the stored value
162 ** conforms to the VR definition and to the specified VM.
163 **
164 ** Revision 1.21 2010-04-22 09:31:30 joergr
165 ** Revised misleading parameter documentation for the checkValue() method.
166 **
167 ** Revision 1.20 2010-04-22 08:59:10 joergr
168 ** Added support for further VM values ("1-8", "1-99", "16", "32") to be checked.
169 **
170 ** Revision 1.19 2009-08-03 09:05:30 joergr
171 ** Added methods that check whether a given string value conforms to the VR and
172 ** VM definitions of the DICOM standards.
173 **
174 ** Revision 1.18 2008-07-17 11:19:49 onken
175 ** Updated copyFrom() documentation.
176 **
177 ** Revision 1.17 2008-07-17 10:30:23 onken
178 ** Implemented copyFrom() method for complete DcmObject class hierarchy, which
179 ** permits setting an instance's value from an existing object. Implemented
180 ** assignment operator where necessary.
181 **
182 ** Revision 1.16 2005-12-08 16:28:54 meichel
183 ** Changed include path schema for all DCMTK header files
184 **
185 ** Revision 1.15 2004/07/01 12:28:25 meichel
186 ** Introduced virtual clone method for DcmObject and derived classes.
187 **
188 ** Revision 1.14 2003/06/12 13:30:58 joergr
189 ** Added static function checkVR().
190 **
191 ** Revision 1.13 2002/12/06 12:49:14 joergr
192 ** Enhanced "print()" function by re-working the implementation and replacing
193 ** the boolean "showFullData" parameter by a more general integer flag.
194 ** Added doc++ documentation.
195 ** Made source code formatting more consistent with other modules/files.
196 **
197 ** Revision 1.12 2002/04/25 09:48:10 joergr
198 ** Removed getOFStringArray() implementation.
199 **
200 ** Revision 1.11 2001/09/25 17:19:30 meichel
201 ** Adapted dcmdata to class OFCondition
202 **
203 ** Revision 1.10 2001/06/01 15:48:48 meichel
204 ** Updated copyright header
205 **
206 ** Revision 1.9 2000/03/08 16:26:22 meichel
207 ** Updated copyright header.
208 **
209 ** Revision 1.8 1999/03/31 09:24:57 meichel
210 ** Updated copyright header in module dcmdata
211 **
212 ** Revision 1.7 1998/11/12 16:47:46 meichel
213 ** Implemented operator= for all classes derived from DcmObject.
214 **
215 ** Revision 1.6 1997/09/11 15:13:12 hewett
216 ** Modified getOFString method arguments by removing a default value
217 ** for the pos argument. By requiring the pos argument to be provided
218 ** ensures that callers realise getOFString only gets one component of
219 ** a multi-valued string.
220 **
221 ** Revision 1.5 1997/08/29 08:32:40 andreas
222 ** - Added methods getOFString and getOFStringArray for all
223 ** string VRs. These methods are able to normalise the value, i. e.
224 ** to remove leading and trailing spaces. This will be done only if
225 ** it is described in the standard that these spaces are not relevant.
226 ** These methods do not test the strings for conformance, this means
227 ** especially that they do not delete spaces where they are not allowed!
228 ** getOFStringArray returns the string with all its parts separated by \
229 ** and getOFString returns only one value of the string.
230 ** CAUTION: Currently getString returns a string with trailing
231 ** spaces removed (if dcmEnableAutomaticInputDataCorrection == OFTrue) and
232 ** truncates the original string (since it is not copied!). If you rely on this
233 ** behaviour please change your application now.
234 ** Future changes will ensure that getString returns the original
235 ** string from the DICOM object (NULL terminated) inclusive padding.
236 ** Currently, if you call getOF... before calling getString without
237 ** normalisation, you can get the original string read from the DICOM object.
238 **
239 ** Revision 1.4 1996/01/09 11:06:17 andreas
240 ** New Support for Visual C++
241 ** Correct problems with inconsistent const declarations
242 **
243 ** Revision 1.3 1996/01/05 13:23:03 andreas
244 ** - changed to support new streaming facilities
245 ** - more cleanups
246 ** - merged read / write methods for block and file transfer
247 **
248 */


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