OFFIS DCMTK  Version 3.6.0
dcvrus.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 DcmUnsignedShort
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 DCVRUS_H
31 #define DCVRUS_H
32 
33 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
34 
35 #include "dcmtk/dcmdata/dcelem.h"
36 
37 
41  : public DcmElement
42 {
43 
44  public:
45 
51  DcmUnsignedShort(const DcmTag &tag,
52  const Uint32 len = 0);
53 
58 
61  virtual ~DcmUnsignedShort();
62 
68 
72  virtual DcmObject *clone() const
73  {
74  return new DcmUnsignedShort(*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 
109  virtual unsigned long getVM();
110 
119  virtual void print(STD_NAMESPACE ostream&out,
120  const size_t flags = 0,
121  const int level = 0,
122  const char *pixelFileName = NULL,
123  size_t *pixelCounter = NULL);
124 
130  virtual OFCondition getUint16(Uint16 &uintVal,
131  const unsigned long pos = 0);
132 
138  virtual OFCondition getUint16Array(Uint16 *&uintVals);
139 
146  virtual OFCondition getOFString(OFString &stringVal,
147  const unsigned long pos,
148  OFBool normalize = OFTrue);
149 
155  virtual OFCondition putUint16(const Uint16 uintVal,
156  const unsigned long pos = 0);
157 
163  virtual OFCondition putUint16Array(const Uint16 *uintVals,
164  const unsigned long numUints);
165 
172  virtual OFCondition putString(const char *stringVal);
173 
178  virtual OFCondition verify(const OFBool autocorrect = OFFalse);
179 };
180 
181 
182 #endif // DCVRUS_H
183 
184 
185 /*
186 ** CVS/RCS Log:
187 ** $Log: dcvrus.h,v $
188 ** Revision 1.27 2010-11-05 09:34:11 joergr
189 ** Added support for checking the value multiplicity "9" (see Supplement 131).
190 **
191 ** Revision 1.26 2010-10-14 13:15:43 joergr
192 ** Updated copyright header. Added reference to COPYRIGHT file.
193 **
194 ** Revision 1.25 2010-04-23 15:26:13 joergr
195 ** Specify an appropriate default value for the "vm" parameter of checkValue().
196 **
197 ** Revision 1.24 2010-04-23 14:25:27 joergr
198 ** Added new method to all VR classes which checks whether the stored value
199 ** conforms to the VR definition and to the specified VM.
200 **
201 ** Revision 1.23 2009-11-04 09:58:08 uli
202 ** Switched to logging mechanism provided by the "new" oflog module
203 **
204 ** Revision 1.22 2008-07-17 11:19:49 onken
205 ** Updated copyFrom() documentation.
206 **
207 ** Revision 1.21 2008-07-17 10:30:24 onken
208 ** Implemented copyFrom() method for complete DcmObject class hierarchy, which
209 ** permits setting an instance's value from an existing object. Implemented
210 ** assignment operator where necessary.
211 **
212 ** Revision 1.20 2006-08-15 15:49:56 meichel
213 ** Updated all code in module dcmdata to correctly compile when
214 ** all standard C++ classes remain in namespace std.
215 **
216 ** Revision 1.19 2005/12/08 16:29:15 meichel
217 ** Changed include path schema for all DCMTK header files
218 **
219 ** Revision 1.18 2004/07/01 12:28:25 meichel
220 ** Introduced virtual clone method for DcmObject and derived classes.
221 **
222 ** Revision 1.17 2002/12/06 12:49:20 joergr
223 ** Enhanced "print()" function by re-working the implementation and replacing
224 ** the boolean "showFullData" parameter by a more general integer flag.
225 ** Added doc++ documentation.
226 ** Made source code formatting more consistent with other modules/files.
227 **
228 ** Revision 1.16 2002/04/25 10:02:20 joergr
229 ** Added getOFString() implementation.
230 **
231 ** Revision 1.15 2001/09/25 17:19:36 meichel
232 ** Adapted dcmdata to class OFCondition
233 **
234 ** Revision 1.14 2001/06/01 15:48:54 meichel
235 ** Updated copyright header
236 **
237 ** Revision 1.13 2000/04/14 15:31:36 meichel
238 ** Removed default value from output stream passed to print() method.
239 ** Required for use in multi-thread environments.
240 **
241 ** Revision 1.12 2000/03/08 16:26:27 meichel
242 ** Updated copyright header.
243 **
244 ** Revision 1.11 2000/03/03 14:05:29 meichel
245 ** Implemented library support for redirecting error messages into memory
246 ** instead of printing them to stdout/stderr for GUI applications.
247 **
248 ** Revision 1.10 2000/02/10 10:50:56 joergr
249 ** Added new feature to dcmdump (enhanced print method of dcmdata): write
250 ** pixel data/item value fields to raw files.
251 **
252 ** Revision 1.9 1999/03/31 09:25:11 meichel
253 ** Updated copyright header in module dcmdata
254 **
255 ** Revision 1.8 1998/11/12 16:47:58 meichel
256 ** Implemented operator= for all classes derived from DcmObject.
257 **
258 ** Revision 1.7 1997/07/21 08:25:18 andreas
259 ** - Replace all boolean types (BOOLEAN, CTNBOOLEAN, DICOM_BOOL, BOOL)
260 ** with one unique boolean type OFBool.
261 **
262 ** Revision 1.6 1997/04/18 08:13:34 andreas
263 ** - The put/get-methods for all VRs did not conform to the C++-Standard
264 ** draft. Some Compilers (e.g. SUN-C++ Compiler, Metroworks
265 ** CodeWarrier, etc.) create many warnings concerning the hiding of
266 ** overloaded get methods in all derived classes of DcmElement.
267 ** So the interface of all value representation classes in the
268 ** library are changed rapidly, e.g.
269 ** OFCondition get(Uint16 & value, const unsigned long pos);
270 ** becomes
271 ** OFCondition getUint16(Uint16 & value, const unsigned long pos);
272 ** All (retired) "returntype get(...)" methods are deleted.
273 ** For more information see dcmdata/include/dcelem.h
274 **
275 ** Revision 1.5 1996/08/05 08:45:41 andreas
276 ** new print routine with additional parameters:
277 ** - print into files
278 ** - fix output length for elements
279 ** corrected error in search routine with parameter ESM_fromStackTop
280 **
281 ** Revision 1.4 1996/01/29 13:38:19 andreas
282 ** - new put method for every VR to put value as a string
283 ** - better and unique print methods
284 **
285 ** Revision 1.3 1996/01/05 13:23:12 andreas
286 ** - changed to support new streaming facilities
287 ** - more cleanups
288 ** - merged read / write methods for block and file transfer
289 **
290 */


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