00001 /* 00002 * 00003 * Copyright (C) 1994-2005, 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 DcmDecimalString 00023 * 00024 * Last Update: $Author: meichel $ 00025 * Update Date: $Date: 2005/12/08 16:28:56 $ 00026 * Source File: $Source: /share/dicom/cvs-depot/dcmtk/dcmdata/include/dcmtk/dcmdata/dcvrds.h,v $ 00027 * CVS/RCS Revision: $Revision: 1.15 $ 00028 * Status: $State: Exp $ 00029 * 00030 * CVS/RCS Log at end of file 00031 * 00032 */ 00033 00034 00035 #ifndef DCVRDS_H 00036 #define DCVRDS_H 00037 00038 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 00039 00040 #include "dcmtk/dcmdata/dctypes.h" 00041 #include "dcmtk/dcmdata/dcbytstr.h" 00042 00043 00046 class DcmDecimalString 00047 : public DcmByteString 00048 { 00049 00050 public: 00051 00057 DcmDecimalString(const DcmTag &tag, 00058 const Uint32 len = 0); 00059 00063 DcmDecimalString(const DcmDecimalString &old); 00064 00067 virtual ~DcmDecimalString(); 00068 00073 DcmDecimalString &operator=(const DcmDecimalString &obj); 00074 00078 virtual DcmObject *clone() const 00079 { 00080 return new DcmDecimalString(*this); 00081 } 00082 00086 virtual DcmEVR ident() const; 00087 00093 virtual OFCondition getFloat64(Float64 &doubleVal, 00094 const unsigned long pos = 0); 00095 00102 virtual OFCondition getOFString(OFString &stringVal, 00103 const unsigned long pos, 00104 OFBool normalize = OFTrue); 00105 }; 00106 00107 00108 #endif // DCVRDS_H 00109 00110 00111 /* 00112 ** CVS/RCS Log: 00113 ** $Log: dcvrds.h,v $ 00114 ** Revision 1.15 2005/12/08 16:28:56 meichel 00115 ** Changed include path schema for all DCMTK header files 00116 ** 00117 ** Revision 1.14 2004/07/01 12:28:25 meichel 00118 ** Introduced virtual clone method for DcmObject and derived classes. 00119 ** 00120 ** Revision 1.13 2002/12/06 12:49:15 joergr 00121 ** Enhanced "print()" function by re-working the implementation and replacing 00122 ** the boolean "showFullData" parameter by a more general integer flag. 00123 ** Added doc++ documentation. 00124 ** Made source code formatting more consistent with other modules/files. 00125 ** 00126 ** Revision 1.12 2002/04/25 09:51:08 joergr 00127 ** Removed getOFStringArray() implementation. 00128 ** 00129 ** Revision 1.11 2001/09/25 17:19:30 meichel 00130 ** Adapted dcmdata to class OFCondition 00131 ** 00132 ** Revision 1.10 2001/06/01 15:48:49 meichel 00133 ** Updated copyright header 00134 ** 00135 ** Revision 1.9 2000/03/08 16:26:22 meichel 00136 ** Updated copyright header. 00137 ** 00138 ** Revision 1.8 1999/03/31 09:24:58 meichel 00139 ** Updated copyright header in module dcmdata 00140 ** 00141 ** Revision 1.7 1998/11/12 16:47:47 meichel 00142 ** Implemented operator= for all classes derived from DcmObject. 00143 ** 00144 ** Revision 1.6 1997/09/11 15:13:13 hewett 00145 ** Modified getOFString method arguments by removing a default value 00146 ** for the pos argument. By requiring the pos argument to be provided 00147 ** ensures that callers realise getOFString only gets one component of 00148 ** a multi-valued string. 00149 ** 00150 ** Revision 1.5 1997/08/29 08:32:41 andreas 00151 ** - Added methods getOFString and getOFStringArray for all 00152 ** string VRs. These methods are able to normalise the value, i. e. 00153 ** to remove leading and trailing spaces. This will be done only if 00154 ** it is described in the standard that these spaces are not relevant. 00155 ** These methods do not test the strings for conformance, this means 00156 ** especially that they do not delete spaces where they are not allowed! 00157 ** getOFStringArray returns the string with all its parts separated by \ 00158 ** and getOFString returns only one value of the string. 00159 ** CAUTION: Currently getString returns a string with trailing 00160 ** spaces removed (if dcmEnableAutomaticInputDataCorrection == OFTrue) and 00161 ** truncates the original string (since it is not copied!). If you rely on this 00162 ** behaviour please change your application now. 00163 ** Future changes will ensure that getString returns the original 00164 ** string from the DICOM object (NULL terminated) inclusive padding. 00165 ** Currently, if you call getOF... before calling getString without 00166 ** normalisation, you can get the original string read from the DICOM object. 00167 ** 00168 ** Revision 1.4 1997/05/12 07:37:44 andreas 00169 ** - new get-Methods for DcmDecimalString: getFloat64 and 00170 ** DcmIntegerString: getSint32 00171 ** 00172 ** Revision 1.3 1996/01/05 13:23:04 andreas 00173 ** - changed to support new streaming facilities 00174 ** - more cleanups 00175 ** - merged read / write methods for block and file transfer 00176 ** 00177 */