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 DcmFloatingPointDouble 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 DCVRFD_H 00031 #define DCVRFD_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 DcmFloatingPointDouble 00041 : public DcmElement 00042 { 00043 00044 public: 00045 00051 DcmFloatingPointDouble(const DcmTag &tag, 00052 const Uint32 len = 0); 00053 00057 DcmFloatingPointDouble( const DcmFloatingPointDouble &old); 00058 00061 virtual ~DcmFloatingPointDouble(); 00062 00067 DcmFloatingPointDouble &operator=(const DcmFloatingPointDouble &obj); 00068 00072 virtual DcmObject *clone() const 00073 { 00074 return new DcmFloatingPointDouble(*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 00121 virtual void print(STD_NAMESPACE ostream&out, 00122 const size_t flags = 0, 00123 const int level = 0, 00124 const char *pixelFileName = NULL, 00125 size_t *pixelCounter = NULL); 00126 00132 virtual OFCondition getFloat64(Float64 &doubleVal, 00133 const unsigned long pos = 0); 00134 00139 virtual OFCondition getFloat64Array(Float64 *&doubleVals); 00140 00149 virtual OFCondition getOFString(OFString &stringVal, 00150 const unsigned long pos, 00151 OFBool normalize = OFTrue); 00152 00158 virtual OFCondition putFloat64(const Float64 doubleval, 00159 const unsigned long pos = 0); 00160 00166 virtual OFCondition putFloat64Array(const Float64 *doubleVals, 00167 const unsigned long numDoubles); 00168 00175 virtual OFCondition putString(const char *stringVal); 00176 00181 virtual OFCondition verify(const OFBool autocorrect = OFFalse); 00182 }; 00183 00184 00185 #endif // DCVRFD_H 00186 00187 00188 /* 00189 ** CVS/RCS Log: 00190 ** $Log: dcvrfd.h,v $ 00191 ** Revision 1.27 2010-11-05 09:34:11 joergr 00192 ** Added support for checking the value multiplicity "9" (see Supplement 131). 00193 ** 00194 ** Revision 1.26 2010-10-14 13:15:42 joergr 00195 ** Updated copyright header. Added reference to COPYRIGHT file. 00196 ** 00197 ** Revision 1.25 2010-04-23 15:26:13 joergr 00198 ** Specify an appropriate default value for the "vm" parameter of checkValue(). 00199 ** 00200 ** Revision 1.24 2010-04-23 14:25:27 joergr 00201 ** Added new method to all VR classes which checks whether the stored value 00202 ** conforms to the VR definition and to the specified VM. 00203 ** 00204 ** Revision 1.23 2009-11-04 09:58:07 uli 00205 ** Switched to logging mechanism provided by the "new" oflog module 00206 ** 00207 ** Revision 1.22 2008-07-17 11:19:49 onken 00208 ** Updated copyFrom() documentation. 00209 ** 00210 ** Revision 1.21 2008-07-17 10:30:23 onken 00211 ** Implemented copyFrom() method for complete DcmObject class hierarchy, which 00212 ** permits setting an instance's value from an existing object. Implemented 00213 ** assignment operator where necessary. 00214 ** 00215 ** Revision 1.20 2006-08-15 15:49:56 meichel 00216 ** Updated all code in module dcmdata to correctly compile when 00217 ** all standard C++ classes remain in namespace std. 00218 ** 00219 ** Revision 1.19 2005/12/08 16:28:58 meichel 00220 ** Changed include path schema for all DCMTK header files 00221 ** 00222 ** Revision 1.18 2004/07/01 12:28:25 meichel 00223 ** Introduced virtual clone method for DcmObject and derived classes. 00224 ** 00225 ** Revision 1.17 2002/12/06 12:49:15 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:51:42 joergr 00232 ** Added getOFString() implementation. 00233 ** 00234 ** Revision 1.15 2001/09/25 17:19:31 meichel 00235 ** Adapted dcmdata to class OFCondition 00236 ** 00237 ** Revision 1.14 2001/06/01 15:48:49 meichel 00238 ** Updated copyright header 00239 ** 00240 ** Revision 1.13 2000/04/14 15:31:34 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:23 meichel 00245 ** Updated copyright header. 00246 ** 00247 ** Revision 1.11 2000/03/03 14:05:26 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:54 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:00 meichel 00256 ** Updated copyright header in module dcmdata 00257 ** 00258 ** Revision 1.8 1998/11/12 16:47:48 meichel 00259 ** Implemented operator= for all classes derived from DcmObject. 00260 ** 00261 ** Revision 1.7 1997/07/21 08:25:14 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:29 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:31 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:16 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:05 andreas 00289 ** - changed to support new streaming facilities 00290 ** - more cleanups 00291 ** - merged read / write methods for block and file transfer 00292 ** 00293 */