OFFIS DCMTK  Version 3.6.0
dcvrds.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 DcmDecimalString
19  *
20  * Last Update: $Author: joergr $
21  * Update Date: $Date: 2010-11-05 09:34:11 $
22  * CVS/RCS Revision: $Revision: 1.27 $
23  * Status: $State: Exp $
24  *
25  * CVS/RCS Log at end of file
26  *
27  */
28 
29 
30 #ifndef DCVRDS_H
31 #define DCVRDS_H
32 
33 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
34 
35 #include "dcmtk/ofstd/ofvector.h"
36 #include "dcmtk/dcmdata/dcbytstr.h"
37 
38 
42  : public DcmByteString
43 {
44 
45  public:
46 
52  DcmDecimalString(const DcmTag &tag,
53  const Uint32 len = 0);
54 
59 
62  virtual ~DcmDecimalString();
63 
69 
73  virtual DcmObject *clone() const
74  {
75  return new DcmDecimalString(*this);
76  }
77 
90  virtual OFCondition copyFrom(const DcmObject& rhs);
91 
95  virtual DcmEVR ident() const;
96 
104  virtual OFCondition checkValue(const OFString &vm = "1-n",
105  const OFBool oldFormat = OFFalse);
106 
112  virtual OFCondition getFloat64(Float64 &doubleVal,
113  const unsigned long pos = 0);
114 
124  virtual OFCondition getFloat64Vector(OFVector<Float64> &doubleVals);
125 
132  virtual OFCondition getOFString(OFString &stringVal,
133  const unsigned long pos,
134  OFBool normalize = OFTrue);
135 
141  virtual OFCondition writeXML(STD_NAMESPACE ostream &out,
142  const size_t flags = 0);
143 
144  /* --- static helper functions --- */
145 
154  static OFCondition checkStringValue(const OFString &value,
155  const OFString &vm = "1-n");
156 };
157 
158 
159 #endif // DCVRDS_H
160 
161 
162 /*
163 ** CVS/RCS Log:
164 ** $Log: dcvrds.h,v $
165 ** Revision 1.27 2010-11-05 09:34:11 joergr
166 ** Added support for checking the value multiplicity "9" (see Supplement 131).
167 **
168 ** Revision 1.26 2010-10-27 09:18:27 joergr
169 ** Added getFloat64Vector() method which allows for retrieving the stored
170 ** floating point values more efficiently (especially when there are many
171 ** values).
172 **
173 ** Revision 1.25 2010-10-14 13:15:42 joergr
174 ** Updated copyright header. Added reference to COPYRIGHT file.
175 **
176 ** Revision 1.24 2010-04-23 15:26:13 joergr
177 ** Specify an appropriate default value for the "vm" parameter of checkValue().
178 **
179 ** Revision 1.23 2010-04-23 14:25:27 joergr
180 ** Added new method to all VR classes which checks whether the stored value
181 ** conforms to the VR definition and to the specified VM.
182 **
183 ** Revision 1.22 2010-04-22 09:31:30 joergr
184 ** Revised misleading parameter documentation for the checkValue() method.
185 **
186 ** Revision 1.21 2010-04-22 08:59:10 joergr
187 ** Added support for further VM values ("1-8", "1-99", "16", "32") to be checked.
188 **
189 ** Revision 1.20 2010-03-01 09:08:45 uli
190 ** Removed some unnecessary include directives in the headers.
191 **
192 ** Revision 1.19 2009-08-03 09:05:30 joergr
193 ** Added methods that check whether a given string value conforms to the VR and
194 ** VM definitions of the DICOM standards.
195 **
196 ** Revision 1.18 2008-07-17 11:19:49 onken
197 ** Updated copyFrom() documentation.
198 **
199 ** Revision 1.17 2008-07-17 10:30:23 onken
200 ** Implemented copyFrom() method for complete DcmObject class hierarchy, which
201 ** permits setting an instance's value from an existing object. Implemented
202 ** assignment operator where necessary.
203 **
204 ** Revision 1.16 2006-10-13 10:12:28 joergr
205 ** Enhanced performance of writeXML() for large multi-valued DS elements.
206 **
207 ** Revision 1.15 2005/12/08 16:28:56 meichel
208 ** Changed include path schema for all DCMTK header files
209 **
210 ** Revision 1.14 2004/07/01 12:28:25 meichel
211 ** Introduced virtual clone method for DcmObject and derived classes.
212 **
213 ** Revision 1.13 2002/12/06 12:49:15 joergr
214 ** Enhanced "print()" function by re-working the implementation and replacing
215 ** the boolean "showFullData" parameter by a more general integer flag.
216 ** Added doc++ documentation.
217 ** Made source code formatting more consistent with other modules/files.
218 **
219 ** Revision 1.12 2002/04/25 09:51:08 joergr
220 ** Removed getOFStringArray() implementation.
221 **
222 ** Revision 1.11 2001/09/25 17:19:30 meichel
223 ** Adapted dcmdata to class OFCondition
224 **
225 ** Revision 1.10 2001/06/01 15:48:49 meichel
226 ** Updated copyright header
227 **
228 ** Revision 1.9 2000/03/08 16:26:22 meichel
229 ** Updated copyright header.
230 **
231 ** Revision 1.8 1999/03/31 09:24:58 meichel
232 ** Updated copyright header in module dcmdata
233 **
234 ** Revision 1.7 1998/11/12 16:47:47 meichel
235 ** Implemented operator= for all classes derived from DcmObject.
236 **
237 ** Revision 1.6 1997/09/11 15:13:13 hewett
238 ** Modified getOFString method arguments by removing a default value
239 ** for the pos argument. By requiring the pos argument to be provided
240 ** ensures that callers realise getOFString only gets one component of
241 ** a multi-valued string.
242 **
243 ** Revision 1.5 1997/08/29 08:32:41 andreas
244 ** - Added methods getOFString and getOFStringArray for all
245 ** string VRs. These methods are able to normalise the value, i. e.
246 ** to remove leading and trailing spaces. This will be done only if
247 ** it is described in the standard that these spaces are not relevant.
248 ** These methods do not test the strings for conformance, this means
249 ** especially that they do not delete spaces where they are not allowed!
250 ** getOFStringArray returns the string with all its parts separated by \
251 ** and getOFString returns only one value of the string.
252 ** CAUTION: Currently getString returns a string with trailing
253 ** spaces removed (if dcmEnableAutomaticInputDataCorrection == OFTrue) and
254 ** truncates the original string (since it is not copied!). If you rely on this
255 ** behaviour please change your application now.
256 ** Future changes will ensure that getString returns the original
257 ** string from the DICOM object (NULL terminated) inclusive padding.
258 ** Currently, if you call getOF... before calling getString without
259 ** normalisation, you can get the original string read from the DICOM object.
260 **
261 ** Revision 1.4 1997/05/12 07:37:44 andreas
262 ** - new get-Methods for DcmDecimalString: getFloat64 and
263 ** DcmIntegerString: getSint32
264 **
265 ** Revision 1.3 1996/01/05 13:23:04 andreas
266 ** - changed to support new streaming facilities
267 ** - more cleanups
268 ** - merged read / write methods for block and file transfer
269 **
270 */


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