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 DcmLongText 00019 * 00020 * Last Update: $Author: joergr $ 00021 * Update Date: $Date: 2010-10-14 13:15:43 $ 00022 * CVS/RCS Revision: $Revision: 1.20 $ 00023 * Status: $State: Exp $ 00024 * 00025 * CVS/RCS Log at end of file 00026 * 00027 */ 00028 00029 #ifndef DCVRLT_H 00030 #define DCVRLT_H 00031 00032 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 00033 00034 #include "dcmtk/dcmdata/dcchrstr.h" 00035 00036 00039 class DcmLongText 00040 : public DcmCharString 00041 { 00042 public: 00043 00049 DcmLongText(const DcmTag &tag, 00050 const Uint32 len = 0); 00051 00055 DcmLongText(const DcmLongText &old); 00056 00059 virtual ~DcmLongText(); 00060 00065 DcmLongText &operator=(const DcmLongText &obj); 00066 00070 virtual DcmObject *clone() const 00071 { 00072 return new DcmLongText(*this); 00073 } 00074 00087 virtual OFCondition copyFrom(const DcmObject& rhs); 00088 00092 virtual DcmEVR ident() const; 00093 00099 virtual OFCondition checkValue(const OFString &vm = "", 00100 const OFBool oldFormat = OFFalse); 00101 00107 virtual unsigned long getVM(); 00108 00115 virtual OFCondition getOFString(OFString &stringVal, 00116 const unsigned long pos, 00117 OFBool normalize = OFTrue); 00118 00124 virtual OFCondition getOFStringArray(OFString &stringVal, 00125 OFBool normalize = OFTrue); 00126 00127 /* --- static helper functions --- */ 00128 00133 static OFCondition checkStringValue(const OFString &value); 00134 }; 00135 00136 00137 #endif // DCVRLT_H 00138 00139 00140 /* 00141 ** CVS/RCS Log: 00142 ** $Log: dcvrlt.h,v $ 00143 ** Revision 1.20 2010-10-14 13:15:43 joergr 00144 ** Updated copyright header. Added reference to COPYRIGHT file. 00145 ** 00146 ** Revision 1.19 2010-04-23 15:26:13 joergr 00147 ** Specify an appropriate default value for the "vm" parameter of checkValue(). 00148 ** 00149 ** Revision 1.18 2010-04-23 14:25:27 joergr 00150 ** Added new method to all VR classes which checks whether the stored value 00151 ** conforms to the VR definition and to the specified VM. 00152 ** 00153 ** Revision 1.17 2010-03-01 09:08:45 uli 00154 ** Removed some unnecessary include directives in the headers. 00155 ** 00156 ** Revision 1.16 2009-08-03 09:05:30 joergr 00157 ** Added methods that check whether a given string value conforms to the VR and 00158 ** VM definitions of the DICOM standards. 00159 ** 00160 ** Revision 1.15 2008-07-17 11:19:49 onken 00161 ** Updated copyFrom() documentation. 00162 ** 00163 ** Revision 1.14 2008-07-17 10:30:23 onken 00164 ** Implemented copyFrom() method for complete DcmObject class hierarchy, which 00165 ** permits setting an instance's value from an existing object. Implemented 00166 ** assignment operator where necessary. 00167 ** 00168 ** Revision 1.13 2005-12-08 16:29:02 meichel 00169 ** Changed include path schema for all DCMTK header files 00170 ** 00171 ** Revision 1.12 2004/07/01 12:28:25 meichel 00172 ** Introduced virtual clone method for DcmObject and derived classes. 00173 ** 00174 ** Revision 1.11 2002/12/06 12:49:17 joergr 00175 ** Enhanced "print()" function by re-working the implementation and replacing 00176 ** the boolean "showFullData" parameter by a more general integer flag. 00177 ** Added doc++ documentation. 00178 ** Made source code formatting more consistent with other modules/files. 00179 ** 00180 ** Revision 1.10 2001/09/25 17:19:32 meichel 00181 ** Adapted dcmdata to class OFCondition 00182 ** 00183 ** Revision 1.9 2001/06/01 15:48:51 meichel 00184 ** Updated copyright header 00185 ** 00186 ** Revision 1.8 2000/03/08 16:26:24 meichel 00187 ** Updated copyright header. 00188 ** 00189 ** Revision 1.7 1999/03/31 09:25:03 meichel 00190 ** Updated copyright header in module dcmdata 00191 ** 00192 ** Revision 1.6 1998/11/12 16:47:51 meichel 00193 ** Implemented operator= for all classes derived from DcmObject. 00194 ** 00195 ** Revision 1.5 1997/09/11 15:13:15 hewett 00196 ** Modified getOFString method arguments by removing a default value 00197 ** for the pos argument. By requiring the pos argument to be provided 00198 ** ensures that callers realise getOFString only gets one component of 00199 ** a multi-valued string. 00200 ** 00201 ** Revision 1.4 1997/08/29 08:32:43 andreas 00202 ** - Added methods getOFString and getOFStringArray for all 00203 ** string VRs. These methods are able to normalise the value, i. e. 00204 ** to remove leading and trailing spaces. This will be done only if 00205 ** it is described in the standard that these spaces are not relevant. 00206 ** These methods do not test the strings for conformance, this means 00207 ** especially that they do not delete spaces where they are not allowed! 00208 ** getOFStringArray returns the string with all its parts separated by \ 00209 ** and getOFString returns only one value of the string. 00210 ** CAUTION: Currently getString returns a string with trailing 00211 ** spaces removed (if dcmEnableAutomaticInputDataCorrection == OFTrue) and 00212 ** truncates the original string (since it is not copied!). If you rely on this 00213 ** behaviour please change your application now. 00214 ** Future changes will ensure that getString returns the original 00215 ** string from the DICOM object (NULL terminated) inclusive padding. 00216 ** Currently, if you call getOF... before calling getString without 00217 ** normalisation, you can get the original string read from the DICOM object. 00218 ** 00219 ** Revision 1.3 1996/01/05 13:23:07 andreas 00220 ** - changed to support new streaming facilities 00221 ** - more cleanups 00222 ** - merged read / write methods for block and file transfer 00223 ** 00224 */