00001 /* 00002 * 00003 * Copyright (C) 1994-2002, OFFIS 00004 * 00005 * This software and supporting documentation were developed by 00006 * 00007 * Kuratorium OFFIS e.V. 00008 * Healthcare Information and Communication Systems 00009 * Escherweg 2 00010 * D-26121 Oldenburg, Germany 00011 * 00012 * THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND OFFIS MAKES NO WARRANTY 00013 * REGARDING THE SOFTWARE, ITS PERFORMANCE, ITS MERCHANTABILITY OR 00014 * FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES OR 00015 * ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND 00016 * PERFORMANCE OF THE SOFTWARE IS WITH THE USER. 00017 * 00018 * Module: dcmdata 00019 * 00020 * Author: Gerd Ehlers, Andreas Barth 00021 * 00022 * Purpose: Interface of class DcmSignedShort 00023 * 00024 * Last Update: $Author: joergr $ 00025 * Update Date: $Date: 2002/12/06 12:49:18 $ 00026 * Source File: $Source: /share/dicom/cvs-depot/dcmtk/dcmdata/include/dcvrss.h,v $ 00027 * CVS/RCS Revision: $Revision: 1.17 $ 00028 * Status: $State: Exp $ 00029 * 00030 * CVS/RCS Log at end of file 00031 * 00032 */ 00033 00034 00035 #ifndef DCVRSS_H 00036 #define DCVRSS_H 00037 00038 #include "osconfig.h" /* make sure OS specific configuration is included first */ 00039 00040 #include "dcelem.h" 00041 00042 00045 class DcmSignedShort 00046 : public DcmElement 00047 { 00048 00049 public: 00050 00056 DcmSignedShort(const DcmTag &tag, 00057 const Uint32 len = 0); 00058 00062 DcmSignedShort(const DcmSignedShort &old); 00063 00066 virtual ~DcmSignedShort(); 00067 00072 DcmSignedShort &operator=(const DcmSignedShort &obj); 00073 00077 virtual DcmEVR ident() const; 00078 00083 virtual unsigned long getVM(); 00084 00093 virtual void print(ostream &out, 00094 const size_t flags = 0, 00095 const int level = 0, 00096 const char *pixelFileName = NULL, 00097 size_t *pixelCounter = NULL); 00098 00104 virtual OFCondition getSint16(Sint16 &sintVal, 00105 const unsigned long pos = 0); 00106 00111 virtual OFCondition getSint16Array(Sint16 *&sintVals); 00112 00119 virtual OFCondition getOFString(OFString &stringVal, 00120 const unsigned long pos, 00121 OFBool normalize = OFTrue); 00122 00128 virtual OFCondition putSint16(const Sint16 sintVal, 00129 const unsigned long pos = 0); 00130 00136 virtual OFCondition putSint16Array(const Sint16 *sintVals, 00137 const unsigned long numSints); 00138 00145 virtual OFCondition putString(const char *stringVal); 00146 00151 virtual OFCondition verify(const OFBool autocorrect = OFFalse); 00152 }; 00153 00154 00155 #endif // DCVRSS_H 00156 00157 00158 /* 00159 ** CVS/RCS Log: 00160 ** $Log: dcvrss.h,v $ 00161 ** Revision 1.17 2002/12/06 12:49:18 joergr 00162 ** Enhanced "print()" function by re-working the implementation and replacing 00163 ** the boolean "showFullData" parameter by a more general integer flag. 00164 ** Added doc++ documentation. 00165 ** Made source code formatting more consistent with other modules/files. 00166 ** 00167 ** Revision 1.16 2002/04/25 09:57:46 joergr 00168 ** Added getOFString() implementation. 00169 ** 00170 ** Revision 1.15 2001/09/25 17:19:34 meichel 00171 ** Adapted dcmdata to class OFCondition 00172 ** 00173 ** Revision 1.14 2001/06/01 15:48:53 meichel 00174 ** Updated copyright header 00175 ** 00176 ** Revision 1.13 2000/04/14 15:31:35 meichel 00177 ** Removed default value from output stream passed to print() method. 00178 ** Required for use in multi-thread environments. 00179 ** 00180 ** Revision 1.12 2000/03/08 16:26:26 meichel 00181 ** Updated copyright header. 00182 ** 00183 ** Revision 1.11 2000/03/03 14:05:28 meichel 00184 ** Implemented library support for redirecting error messages into memory 00185 ** instead of printing them to stdout/stderr for GUI applications. 00186 ** 00187 ** Revision 1.10 2000/02/10 10:50:55 joergr 00188 ** Added new feature to dcmdump (enhanced print method of dcmdata): write 00189 ** pixel data/item value fields to raw files. 00190 ** 00191 ** Revision 1.9 1999/03/31 09:25:07 meichel 00192 ** Updated copyright header in module dcmdata 00193 ** 00194 ** Revision 1.8 1998/11/12 16:47:55 meichel 00195 ** Implemented operator= for all classes derived from DcmObject. 00196 ** 00197 ** Revision 1.7 1997/07/21 08:25:16 andreas 00198 ** - Replace all boolean types (BOOLEAN, CTNBOOLEAN, DICOM_BOOL, BOOL) 00199 ** with one unique boolean type OFBool. 00200 ** 00201 ** Revision 1.6 1997/04/18 08:13:32 andreas 00202 ** - The put/get-methods for all VRs did not conform to the C++-Standard 00203 ** draft. Some Compilers (e.g. SUN-C++ Compiler, Metroworks 00204 ** CodeWarrier, etc.) create many warnings concerning the hiding of 00205 ** overloaded get methods in all derived classes of DcmElement. 00206 ** So the interface of all value representation classes in the 00207 ** library are changed rapidly, e.g. 00208 ** OFCondition get(Uint16 & value, const unsigned long pos); 00209 ** becomes 00210 ** OFCondition getUint16(Uint16 & value, const unsigned long pos); 00211 ** All (retired) "returntype get(...)" methods are deleted. 00212 ** For more information see dcmdata/include/dcelem.h 00213 ** 00214 ** Revision 1.5 1996/08/05 08:45:36 andreas 00215 ** new print routine with additional parameters: 00216 ** - print into files 00217 ** - fix output length for elements 00218 ** corrected error in search routine with parameter ESM_fromStackTop 00219 ** 00220 ** Revision 1.4 1996/01/29 13:38:18 andreas 00221 ** - new put method for every VR to put value as a string 00222 ** - better and unique print methods 00223 ** 00224 ** Revision 1.3 1996/01/05 13:23:09 andreas 00225 ** - changed to support new streaming facilities 00226 ** - more cleanups 00227 ** - merged read / write methods for block and file transfer 00228 ** 00229 */ 00230