OFFIS DCMTK  Version 3.6.0
dcvrat.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 DcmAttributeTag
19  *
20  * Last Update: $Author: joergr $
21  * Update Date: $Date: 2010-11-05 09:34:11 $
22  * CVS/RCS Revision: $Revision: 1.30 $
23  * Status: $State: Exp $
24  *
25  * CVS/RCS Log at end of file
26  *
27  */
28 
29 
30 #ifndef DCVRAT_H
31 #define DCVRAT_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  DcmAttributeTag(const DcmTag &tag,
52  const Uint32 len = 0);
53 
57  DcmAttributeTag(const DcmAttributeTag &old);
58 
61  virtual ~DcmAttributeTag();
62 
68 
72  virtual DcmObject *clone() const
73  {
74  return new DcmAttributeTag(*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 
120  virtual void print(STD_NAMESPACE ostream&out,
121  const size_t flags = 0,
122  const int level = 0,
123  const char *pixelFileName = NULL,
124  size_t *pixelCounter = NULL);
125 
131  virtual OFCondition getTagVal(DcmTagKey &tagVal,
132  const unsigned long pos = 0);
133 
141  virtual OFCondition getUint16Array(Uint16 *&uintVals);
142 
151  virtual OFCondition getOFString(OFString &stringVal,
152  const unsigned long pos,
153  OFBool normalize = OFTrue);
154 
160  virtual OFCondition putTagVal(const DcmTagKey &tagVal,
161  const unsigned long pos = 0);
162 
172  virtual OFCondition putUint16Array(const Uint16 *uintVals,
173  const unsigned long numUints);
174 
182  virtual OFCondition putString(const char *stringVal);
183 
188  virtual OFCondition verify(const OFBool autocorrect = OFFalse);
189 
190  /* --- static helper functions --- */
191 
200  static OFCondition checkStringValue(const OFString &value,
201  const OFString &vm = "1-n");
202 };
203 
204 
205 #endif // DCVRAT_H
206 
207 
208 /*
209 ** CVS/RCS Log:
210 ** $Log: dcvrat.h,v $
211 ** Revision 1.30 2010-11-05 09:34:11 joergr
212 ** Added support for checking the value multiplicity "9" (see Supplement 131).
213 **
214 ** Revision 1.29 2010-10-14 13:15:42 joergr
215 ** Updated copyright header. Added reference to COPYRIGHT file.
216 **
217 ** Revision 1.28 2010-04-23 15:26:12 joergr
218 ** Specify an appropriate default value for the "vm" parameter of checkValue().
219 **
220 ** Revision 1.27 2010-04-23 14:25:27 joergr
221 ** Added new method to all VR classes which checks whether the stored value
222 ** conforms to the VR definition and to the specified VM.
223 **
224 ** Revision 1.26 2009-11-04 09:58:07 uli
225 ** Switched to logging mechanism provided by the "new" oflog module
226 **
227 ** Revision 1.25 2008-07-17 11:19:49 onken
228 ** Updated copyFrom() documentation.
229 **
230 ** Revision 1.24 2008-07-17 10:30:23 onken
231 ** Implemented copyFrom() method for complete DcmObject class hierarchy, which
232 ** permits setting an instance's value from an existing object. Implemented
233 ** assignment operator where necessary.
234 **
235 ** Revision 1.23 2006-08-15 15:49:56 meichel
236 ** Updated all code in module dcmdata to correctly compile when
237 ** all standard C++ classes remain in namespace std.
238 **
239 ** Revision 1.22 2005/12/08 16:28:53 meichel
240 ** Changed include path schema for all DCMTK header files
241 **
242 ** Revision 1.21 2004/07/01 12:28:25 meichel
243 ** Introduced virtual clone method for DcmObject and derived classes.
244 **
245 ** Revision 1.20 2003/06/12 13:31:46 joergr
246 ** Fixed inconsistent API documentation reported by Doxygen.
247 **
248 ** Revision 1.19 2002/12/06 12:49:14 joergr
249 ** Enhanced "print()" function by re-working the implementation and replacing
250 ** the boolean "showFullData" parameter by a more general integer flag.
251 ** Added doc++ documentation.
252 ** Made source code formatting more consistent with other modules/files.
253 **
254 ** Revision 1.18 2002/04/25 09:50:38 joergr
255 ** Added getOFString() implementation.
256 **
257 ** Revision 1.17 2001/09/25 17:19:30 meichel
258 ** Adapted dcmdata to class OFCondition
259 **
260 ** Revision 1.16 2001/06/01 15:48:48 meichel
261 ** Updated copyright header
262 **
263 ** Revision 1.15 2000/04/14 15:31:34 meichel
264 ** Removed default value from output stream passed to print() method.
265 ** Required for use in multi-thread environments.
266 **
267 ** Revision 1.14 2000/03/08 16:26:22 meichel
268 ** Updated copyright header.
269 **
270 ** Revision 1.13 2000/03/03 14:05:26 meichel
271 ** Implemented library support for redirecting error messages into memory
272 ** instead of printing them to stdout/stderr for GUI applications.
273 **
274 ** Revision 1.12 2000/02/10 10:50:54 joergr
275 ** Added new feature to dcmdump (enhanced print method of dcmdata): write
276 ** pixel data/item value fields to raw files.
277 **
278 ** Revision 1.11 1999/03/31 09:24:56 meichel
279 ** Updated copyright header in module dcmdata
280 **
281 ** Revision 1.10 1998/11/12 16:47:45 meichel
282 ** Implemented operator= for all classes derived from DcmObject.
283 **
284 ** Revision 1.9 1997/07/21 08:25:13 andreas
285 ** - Replace all boolean types (BOOLEAN, CTNBOOLEAN, DICOM_BOOL, BOOL)
286 ** with one unique boolean type OFBool.
287 **
288 ** Revision 1.8 1997/04/18 08:13:29 andreas
289 ** - The put/get-methods for all VRs did not conform to the C++-Standard
290 ** draft. Some Compilers (e.g. SUN-C++ Compiler, Metroworks
291 ** CodeWarrier, etc.) create many warnings concerning the hiding of
292 ** overloaded get methods in all derived classes of DcmElement.
293 ** So the interface of all value representation classes in the
294 ** library are changed rapidly, e.g.
295 ** OFCondition get(Uint16 & value, const unsigned long pos);
296 ** becomes
297 ** OFCondition getUint16(Uint16 & value, const unsigned long pos);
298 ** All (retired) "returntype get(...)" methods are deleted.
299 ** For more information see dcmdata/include/dcelem.h
300 **
301 ** Revision 1.7 1996/08/05 08:45:29 andreas
302 ** new print routine with additional parameters:
303 ** - print into files
304 ** - fix output length for elements
305 ** corrected error in search routine with parameter ESM_fromStackTop
306 **
307 ** Revision 1.6 1996/04/16 16:01:37 andreas
308 ** - put methods for AttributeTag with DcmTagKey Parameter
309 ** - better support for NULL values
310 **
311 ** Revision 1.5 1996/01/29 13:38:15 andreas
312 ** - new put method for every VR to put value as a string
313 ** - better and unique print methods
314 **
315 ** Revision 1.4 1996/01/09 11:06:17 andreas
316 ** New Support for Visual C++
317 ** Correct problems with inconsistent const declarations
318 **
319 ** Revision 1.3 1996/01/05 13:23:03 andreas
320 ** - changed to support new streaming facilities
321 ** - more cleanups
322 ** - merged read / write methods for block and file transfer
323 **
324 */


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