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 DcmSignedLong 00019 * 00020 * Last Update: $Author: joergr $ 00021 * Update Date: $Date: 2010-11-05 09:34:11 $ 00022 * CVS/RCS Revision: $Revision: 1.28 $ 00023 * Status: $State: Exp $ 00024 * 00025 * CVS/RCS Log at end of file 00026 * 00027 */ 00028 00029 00030 #ifndef DCVRSL_H 00031 #define DCVRSL_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 DcmSignedLong 00041 : public DcmElement 00042 { 00043 00044 public: 00045 00051 DcmSignedLong(const DcmTag &tag, 00052 const Uint32 len = 0); 00053 00057 DcmSignedLong(const DcmSignedLong &old); 00058 00061 virtual ~DcmSignedLong(); 00062 00067 DcmSignedLong &operator=(const DcmSignedLong &obj); 00068 00072 virtual DcmObject *clone() const 00073 { 00074 return new DcmSignedLong(*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 getSint32(Sint32 &sintVal, 00131 const unsigned long pos = 0); 00132 00138 virtual OFCondition getSint32Array(Sint32 *&sintVals); 00139 00146 virtual OFCondition getOFString(OFString &stringVal, 00147 const unsigned long pos, 00148 OFBool normalize = OFTrue); 00149 00155 virtual OFCondition putSint32(const Sint32 sintVal, 00156 const unsigned long pos = 0); 00157 00163 virtual OFCondition putSint32Array(const Sint32 *sintVals, 00164 const unsigned long numSints); 00165 00172 virtual OFCondition putString(const char *stringVal); 00173 00178 virtual OFCondition verify(const OFBool autocorrect = OFFalse); 00179 }; 00180 00181 00182 #endif // DCVRSL_H 00183 00184 00185 /* 00186 ** CVS/RCS Log: 00187 ** $Log: dcvrsl.h,v $ 00188 ** Revision 1.28 2010-11-05 09:34:11 joergr 00189 ** Added support for checking the value multiplicity "9" (see Supplement 131). 00190 ** 00191 ** Revision 1.27 2010-10-14 13:15:43 joergr 00192 ** Updated copyright header. Added reference to COPYRIGHT file. 00193 ** 00194 ** Revision 1.26 2010-04-23 15:26:13 joergr 00195 ** Specify an appropriate default value for the "vm" parameter of checkValue(). 00196 ** 00197 ** Revision 1.25 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.24 2009-11-04 09:58:07 uli 00202 ** Switched to logging mechanism provided by the "new" oflog module 00203 ** 00204 ** Revision 1.23 2008-07-17 11:19:49 onken 00205 ** Updated copyFrom() documentation. 00206 ** 00207 ** Revision 1.22 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.21 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.20 2005/12/08 16:29:08 meichel 00217 ** Changed include path schema for all DCMTK header files 00218 ** 00219 ** Revision 1.19 2004/07/01 12:28:25 meichel 00220 ** Introduced virtual clone method for DcmObject and derived classes. 00221 ** 00222 ** Revision 1.18 2003/06/12 13:29:06 joergr 00223 ** Fixed inconsistent API documentation reported by Doxygen. 00224 ** 00225 ** Revision 1.17 2002/12/06 12:49:18 joergr 00226 ** Enhanced "print()" function by re-working the implementation and replacing 00227 ** the boolean "showFullData" parameter by a more general integer flag. 00228 ** Added doc++ documentation. 00229 ** Made source code formatting more consistent with other modules/files. 00230 ** 00231 ** Revision 1.16 2002/04/25 09:57:08 joergr 00232 ** Added getOFString() implementation. 00233 ** 00234 ** Revision 1.15 2001/09/25 17:19:34 meichel 00235 ** Adapted dcmdata to class OFCondition 00236 ** 00237 ** Revision 1.14 2001/06/01 15:48:52 meichel 00238 ** Updated copyright header 00239 ** 00240 ** Revision 1.13 2000/04/14 15:31:35 meichel 00241 ** Removed default value from output stream passed to print() method. 00242 ** Required for use in multi-thread environments. 00243 ** 00244 ** Revision 1.12 2000/03/08 16:26:25 meichel 00245 ** Updated copyright header. 00246 ** 00247 ** Revision 1.11 2000/03/03 14:05:27 meichel 00248 ** Implemented library support for redirecting error messages into memory 00249 ** instead of printing them to stdout/stderr for GUI applications. 00250 ** 00251 ** Revision 1.10 2000/02/10 10:50:55 joergr 00252 ** Added new feature to dcmdump (enhanced print method of dcmdata): write 00253 ** pixel data/item value fields to raw files. 00254 ** 00255 ** Revision 1.9 1999/03/31 09:25:06 meichel 00256 ** Updated copyright header in module dcmdata 00257 ** 00258 ** Revision 1.8 1998/11/12 16:47:54 meichel 00259 ** Implemented operator= for all classes derived from DcmObject. 00260 ** 00261 ** Revision 1.7 1997/07/21 08:25:15 andreas 00262 ** - Replace all boolean types (BOOLEAN, CTNBOOLEAN, DICOM_BOOL, BOOL) 00263 ** with one unique boolean type OFBool. 00264 ** 00265 ** Revision 1.6 1997/04/18 08:13:31 andreas 00266 ** - The put/get-methods for all VRs did not conform to the C++-Standard 00267 ** draft. Some Compilers (e.g. SUN-C++ Compiler, Metroworks 00268 ** CodeWarrier, etc.) create many warnings concerning the hiding of 00269 ** overloaded get methods in all derived classes of DcmElement. 00270 ** So the interface of all value representation classes in the 00271 ** library are changed rapidly, e.g. 00272 ** OFCondition get(Uint16 & value, const unsigned long pos); 00273 ** becomes 00274 ** OFCondition getUint16(Uint16 & value, const unsigned long pos); 00275 ** All (retired) "returntype get(...)" methods are deleted. 00276 ** For more information see dcmdata/include/dcelem.h 00277 ** 00278 ** Revision 1.5 1996/08/05 08:45:35 andreas 00279 ** new print routine with additional parameters: 00280 ** - print into files 00281 ** - fix output length for elements 00282 ** corrected error in search routine with parameter ESM_fromStackTop 00283 ** 00284 ** Revision 1.4 1996/01/29 13:38:17 andreas 00285 ** - new put method for every VR to put value as a string 00286 ** - better and unique print methods 00287 ** 00288 ** Revision 1.3 1996/01/05 13:23:09 andreas 00289 ** - changed to support new streaming facilities 00290 ** - more cleanups 00291 ** - merged read / write methods for block and file transfer 00292 ** 00293 */