00001 /* 00002 * 00003 * Copyright (C) 1994-2010, OFFIS e.V. 00004 * All rights reserved. See COPYRIGHT file for details. 00005 * 00006 * This software and supporting documentation were developed by 00007 * 00008 * OFFIS e.V. 00009 * R&D Division Health 00010 * Escherweg 2 00011 * D-26121 Oldenburg, Germany 00012 * 00013 * 00014 * Module: dcmdata 00015 * 00016 * Author: Gerd Ehlers, Andreas Barth 00017 * 00018 * Purpose: Interface of class DcmUnsignedLong 00019 * 00020 * Last Update: $Author: joergr $ 00021 * Update Date: $Date: 2010-11-05 09:34:11 $ 00022 * CVS/RCS Revision: $Revision: 1.27 $ 00023 * Status: $State: Exp $ 00024 * 00025 * CVS/RCS Log at end of file 00026 * 00027 */ 00028 00029 00030 #ifndef DCVRUL_H 00031 #define DCVRUL_H 00032 00033 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 00034 00035 #include "dcmtk/dcmdata/dcelem.h" 00036 00037 00040 class DcmUnsignedLong 00041 : public DcmElement 00042 { 00043 00044 public: 00045 00051 DcmUnsignedLong(const DcmTag &tag, 00052 const Uint32 len = 0); 00053 00057 DcmUnsignedLong(const DcmUnsignedLong &old); 00058 00061 virtual ~DcmUnsignedLong(); 00062 00067 DcmUnsignedLong &operator=(const DcmUnsignedLong &obj); 00068 00072 virtual DcmObject *clone() const 00073 { 00074 return new DcmUnsignedLong(*this); 00075 } 00076 00089 virtual OFCondition copyFrom(const DcmObject& rhs); 00090 00094 virtual DcmEVR ident() const; 00095 00103 virtual OFCondition checkValue(const OFString &vm = "1-n", 00104 const OFBool oldFormat = OFFalse); 00105 00109 virtual unsigned long getVM(); 00110 00119 virtual void print(STD_NAMESPACE ostream&out, 00120 const size_t flags = 0, 00121 const int level = 0, 00122 const char *pixelFileName = NULL, 00123 size_t *pixelCounter = NULL); 00124 00130 virtual OFCondition getUint32(Uint32 &uintVal, 00131 const unsigned long pos = 0); 00132 00138 virtual OFCondition getUint32Array(Uint32 *&uintVals); 00139 00146 virtual OFCondition getOFString(OFString &stringVal, 00147 const unsigned long pos, 00148 OFBool normalize = OFTrue); 00149 00155 virtual OFCondition putUint32(const Uint32 uintVal, 00156 const unsigned long pos = 0); 00157 00163 virtual OFCondition putUint32Array(const Uint32 *uintVals, 00164 const unsigned long numUints); 00165 00172 virtual OFCondition putString(const char *stringVal); 00173 00178 virtual OFCondition verify(const OFBool autocorrect = OFFalse); 00179 }; 00180 00181 00182 #endif // DCVRUL_H 00183 00184 00185 /* 00186 ** CVS/RCS Log: 00187 ** $Log: dcvrul.h,v $ 00188 ** Revision 1.27 2010-11-05 09:34:11 joergr 00189 ** Added support for checking the value multiplicity "9" (see Supplement 131). 00190 ** 00191 ** Revision 1.26 2010-10-14 13:15:43 joergr 00192 ** Updated copyright header. Added reference to COPYRIGHT file. 00193 ** 00194 ** Revision 1.25 2010-04-23 15:26:13 joergr 00195 ** Specify an appropriate default value for the "vm" parameter of checkValue(). 00196 ** 00197 ** Revision 1.24 2010-04-23 14:25:27 joergr 00198 ** Added new method to all VR classes which checks whether the stored value 00199 ** conforms to the VR definition and to the specified VM. 00200 ** 00201 ** Revision 1.23 2009-11-04 09:58:08 uli 00202 ** Switched to logging mechanism provided by the "new" oflog module 00203 ** 00204 ** Revision 1.22 2008-07-17 11:19:49 onken 00205 ** Updated copyFrom() documentation. 00206 ** 00207 ** Revision 1.21 2008-07-17 10:30:23 onken 00208 ** Implemented copyFrom() method for complete DcmObject class hierarchy, which 00209 ** permits setting an instance's value from an existing object. Implemented 00210 ** assignment operator where necessary. 00211 ** 00212 ** Revision 1.20 2006-08-15 15:49:56 meichel 00213 ** Updated all code in module dcmdata to correctly compile when 00214 ** all standard C++ classes remain in namespace std. 00215 ** 00216 ** Revision 1.19 2005/12/08 16:29:13 meichel 00217 ** Changed include path schema for all DCMTK header files 00218 ** 00219 ** Revision 1.18 2004/07/01 12:28:25 meichel 00220 ** Introduced virtual clone method for DcmObject and derived classes. 00221 ** 00222 ** Revision 1.17 2002/12/06 12:49:20 joergr 00223 ** Enhanced "print()" function by re-working the implementation and replacing 00224 ** the boolean "showFullData" parameter by a more general integer flag. 00225 ** Added doc++ documentation. 00226 ** Made source code formatting more consistent with other modules/files. 00227 ** 00228 ** Revision 1.16 2002/04/25 10:01:55 joergr 00229 ** Added getOFString() implementation. 00230 ** 00231 ** Revision 1.15 2001/09/25 17:19:35 meichel 00232 ** Adapted dcmdata to class OFCondition 00233 ** 00234 ** Revision 1.14 2001/06/01 15:48:54 meichel 00235 ** Updated copyright header 00236 ** 00237 ** Revision 1.13 2000/04/14 15:31:36 meichel 00238 ** Removed default value from output stream passed to print() method. 00239 ** Required for use in multi-thread environments. 00240 ** 00241 ** Revision 1.12 2000/03/08 16:26:27 meichel 00242 ** Updated copyright header. 00243 ** 00244 ** Revision 1.11 2000/03/03 14:05:28 meichel 00245 ** Implemented library support for redirecting error messages into memory 00246 ** instead of printing them to stdout/stderr for GUI applications. 00247 ** 00248 ** Revision 1.10 2000/02/10 10:50:56 joergr 00249 ** Added new feature to dcmdump (enhanced print method of dcmdata): write 00250 ** pixel data/item value fields to raw files. 00251 ** 00252 ** Revision 1.9 1999/03/31 09:25:10 meichel 00253 ** Updated copyright header in module dcmdata 00254 ** 00255 ** Revision 1.8 1998/11/12 16:47:57 meichel 00256 ** Implemented operator= for all classes derived from DcmObject. 00257 ** 00258 ** Revision 1.7 1997/07/21 08:25:17 andreas 00259 ** - Replace all boolean types (BOOLEAN, CTNBOOLEAN, DICOM_BOOL, BOOL) 00260 ** with one unique boolean type OFBool. 00261 ** 00262 ** Revision 1.6 1997/04/18 08:13:33 andreas 00263 ** - The put/get-methods for all VRs did not conform to the C++-Standard 00264 ** draft. Some Compilers (e.g. SUN-C++ Compiler, Metroworks 00265 ** CodeWarrier, etc.) create many warnings concerning the hiding of 00266 ** overloaded get methods in all derived classes of DcmElement. 00267 ** So the interface of all value representation classes in the 00268 ** library are changed rapidly, e.g. 00269 ** OFCondition get(Uint16 & value, const unsigned long pos); 00270 ** becomes 00271 ** OFCondition getUint16(Uint16 & value, const unsigned long pos); 00272 ** All (retired) "returntype get(...)" methods are deleted. 00273 ** For more information see dcmdata/include/dcelem.h 00274 ** 00275 ** Revision 1.5 1996/08/05 08:45:39 andreas 00276 ** new print routine with additional parameters: 00277 ** - print into files 00278 ** - fix output length for elements 00279 ** corrected error in search routine with parameter ESM_fromStackTop 00280 ** 00281 ** Revision 1.4 1996/01/29 13:38:18 andreas 00282 ** - new put method for every VR to put value as a string 00283 ** - better and unique print methods 00284 ** 00285 ** Revision 1.3 1996/01/05 13:23:11 andreas 00286 ** - changed to support new streaming facilities 00287 ** - more cleanups 00288 ** - merged read / write methods for block and file transfer 00289 ** 00290 */ 00291 00292