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 00021 * 00022 * Purpose: Interface of class DcmOtherByteOtherWord 00023 * 00024 * Last Update: $Author: meichel $ 00025 * Update Date: $Date: 2005/12/08 16:29:03 $ 00026 * Source File: $Source: /share/dicom/cvs-depot/dcmtk/dcmdata/include/dcmtk/dcmdata/dcvrobow.h,v $ 00027 * CVS/RCS Revision: $Revision: 1.26 $ 00028 * Status: $State: Exp $ 00029 * 00030 * CVS/RCS Log at end of file 00031 * 00032 */ 00033 00034 00035 #ifndef DCVROBOW_H 00036 #define DCVROBOW_H 00037 00038 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 00039 #include "dcmtk/dcmdata/dcelem.h" 00040 00041 00045 class DcmOtherByteOtherWord 00046 : public DcmElement 00047 { 00048 00049 public: 00050 00056 DcmOtherByteOtherWord(const DcmTag &tag, 00057 const Uint32 len = 0); 00058 00062 DcmOtherByteOtherWord(const DcmOtherByteOtherWord &old); 00063 00066 virtual ~DcmOtherByteOtherWord(); 00067 00072 DcmOtherByteOtherWord &operator=(const DcmOtherByteOtherWord &obj); 00073 00077 virtual DcmObject *clone() const 00078 { 00079 return new DcmOtherByteOtherWord(*this); 00080 } 00081 00085 virtual DcmEVR ident() const; 00086 00090 virtual unsigned long getVM(); 00091 00098 virtual OFCondition setVR(DcmEVR vr); 00099 00109 virtual void print(ostream &out, 00110 const size_t flags = 0, 00111 const int level = 0, 00112 const char *pixelFileName = NULL, 00113 size_t *pixelCounter = NULL); 00114 00120 virtual OFBool canWriteXfer(const E_TransferSyntax newXfer, 00121 const E_TransferSyntax oldXfer); 00122 00129 virtual OFCondition write(DcmOutputStream &outStream, 00130 const E_TransferSyntax oxfer, 00131 const E_EncodingType enctype = EET_UndefinedLength); 00132 00138 virtual OFCondition writeXML(ostream &out, 00139 const size_t flags = 0); 00140 00147 virtual OFCondition writeSignatureFormat(DcmOutputStream &outStream, 00148 const E_TransferSyntax oxfer, 00149 const E_EncodingType enctype = EET_UndefinedLength); 00150 00157 virtual OFCondition getUint8(Uint8 &byteVal, 00158 const unsigned long pos = 0); 00159 00166 virtual OFCondition getUint16(Uint16 &wordVal, 00167 const unsigned long pos = 0); 00168 00174 virtual OFCondition getUint8Array(Uint8 *&byteVals); 00175 00181 virtual OFCondition getUint16Array(Uint16 *&wordVals); 00182 00192 virtual OFCondition getOFString(OFString &stringVal, 00193 const unsigned long pos, 00194 OFBool normalize = OFTrue); 00195 00205 virtual OFCondition getOFStringArray(OFString &stringVal, 00206 OFBool normalize = OFTrue); 00207 00214 virtual OFCondition putUint8Array(const Uint8 *byteValue, 00215 const unsigned long numBytes); 00216 00224 virtual OFCondition putUint16Array(const Uint16 *wordValue, 00225 const unsigned long numWords); 00226 00234 virtual OFCondition putString(const char *stringVal); 00235 00240 virtual OFCondition verify(const OFBool autocorrect = OFFalse); 00241 00242 00243 protected: 00244 00248 virtual void postLoadValue(); 00249 00253 OFCondition alignValue(); 00254 00263 void printPixel(ostream &out, 00264 const size_t flags, 00265 const int level, 00266 const char *pixelFileName, 00267 size_t *pixelCounter); 00268 }; 00269 00270 00271 #endif // DCVROBOW_H 00272 00273 00274 /* 00275 ** CVS/RCS Log: 00276 ** $Log: dcvrobow.h,v $ 00277 ** Revision 1.26 2005/12/08 16:29:03 meichel 00278 ** Changed include path schema for all DCMTK header files 00279 ** 00280 ** Revision 1.25 2004/07/01 12:28:25 meichel 00281 ** Introduced virtual clone method for DcmObject and derived classes. 00282 ** 00283 ** Revision 1.24 2003/07/09 12:13:13 meichel 00284 ** Included dcmodify in MSVC build system, updated headers 00285 ** 00286 ** Revision 1.23 2003/06/12 13:29:28 joergr 00287 ** Fixed inconsistent API documentation reported by Doxygen. 00288 ** 00289 ** Revision 1.22 2002/12/06 12:49:17 joergr 00290 ** Enhanced "print()" function by re-working the implementation and replacing 00291 ** the boolean "showFullData" parameter by a more general integer flag. 00292 ** Added doc++ documentation. 00293 ** Made source code formatting more consistent with other modules/files. 00294 ** 00295 ** Revision 1.21 2002/08/27 16:55:40 meichel 00296 ** Initial release of new DICOM I/O stream classes that add support for stream 00297 ** compression (deflated little endian explicit VR transfer syntax) 00298 ** 00299 ** Revision 1.20 2002/04/25 10:03:45 joergr 00300 ** Added getOFString() implementation. 00301 ** Added/modified getOFStringArray() implementation. 00302 ** Added support for XML output of DICOM objects. 00303 ** 00304 ** Revision 1.19 2001/10/02 11:47:34 joergr 00305 ** Added getUint8/16 routines to class DcmOtherByteOtherWord. 00306 ** 00307 ** Revision 1.18 2001/09/25 17:19:32 meichel 00308 ** Adapted dcmdata to class OFCondition 00309 ** 00310 ** Revision 1.17 2001/06/01 15:48:51 meichel 00311 ** Updated copyright header 00312 ** 00313 ** Revision 1.16 2000/11/07 16:56:10 meichel 00314 ** Initial release of dcmsign module for DICOM Digital Signatures 00315 ** 00316 ** Revision 1.15 2000/04/14 15:31:34 meichel 00317 ** Removed default value from output stream passed to print() method. 00318 ** Required for use in multi-thread environments. 00319 ** 00320 ** Revision 1.14 2000/03/08 16:26:24 meichel 00321 ** Updated copyright header. 00322 ** 00323 ** Revision 1.13 2000/03/03 14:05:27 meichel 00324 ** Implemented library support for redirecting error messages into memory 00325 ** instead of printing them to stdout/stderr for GUI applications. 00326 ** 00327 ** Revision 1.12 2000/02/10 10:50:55 joergr 00328 ** Added new feature to dcmdump (enhanced print method of dcmdata): write 00329 ** pixel data/item value fields to raw files. 00330 ** 00331 ** Revision 1.11 1999/03/31 09:25:03 meichel 00332 ** Updated copyright header in module dcmdata 00333 ** 00334 ** Revision 1.10 1998/11/12 16:47:51 meichel 00335 ** Implemented operator= for all classes derived from DcmObject. 00336 ** 00337 ** Revision 1.9 1997/07/21 08:25:15 andreas 00338 ** - Replace all boolean types (BOOLEAN, CTNBOOLEAN, DICOM_BOOL, BOOL) 00339 ** with one unique boolean type OFBool. 00340 ** 00341 ** Revision 1.8 1997/05/27 13:48:30 andreas 00342 ** - Add method canWriteXfer to class DcmObject and all derived classes. 00343 ** This method checks whether it is possible to convert the original 00344 ** transfer syntax to an new transfer syntax. The check is used in the 00345 ** dcmconv utility to prohibit the change of a compressed transfer 00346 ** syntax to a uncompressed. 00347 ** 00348 ** Revision 1.7 1997/05/16 08:31:20 andreas 00349 ** - Revised handling of GroupLength elements and support of 00350 ** DataSetTrailingPadding elements. The enumeratio E_GrpLenEncoding 00351 ** got additional enumeration values (for a description see dctypes.h). 00352 ** addGroupLength and removeGroupLength methods are replaced by 00353 ** computeGroupLengthAndPadding. To support Padding, the parameters of 00354 ** element and sequence write functions changed. 00355 ** 00356 ** Revision 1.6 1997/04/18 08:13:31 andreas 00357 ** - The put/get-methods for all VRs did not conform to the C++-Standard 00358 ** draft. Some Compilers (e.g. SUN-C++ Compiler, Metroworks 00359 ** CodeWarrier, etc.) create many warnings concerning the hiding of 00360 ** overloaded get methods in all derived classes of DcmElement. 00361 ** So the interface of all value representation classes in the 00362 ** library are changed rapidly, e.g. 00363 ** OFCondition get(Uint16 & value, const unsigned long pos); 00364 ** becomes 00365 ** OFCondition getUint16(Uint16 & value, const unsigned long pos); 00366 ** All (retired) "returntype get(...)" methods are deleted. 00367 ** For more information see dcmdata/include/dcelem.h 00368 ** 00369 ** Revision 1.5 1996/08/05 08:45:33 andreas 00370 ** new print routine with additional parameters: 00371 ** - print into files 00372 ** - fix output length for elements 00373 ** corrected error in search routine with parameter ESM_fromStackTop 00374 ** 00375 ** Revision 1.4 1996/01/29 13:38:17 andreas 00376 ** - new put method for every VR to put value as a string 00377 ** - better and unique print methods 00378 ** 00379 ** Revision 1.3 1996/01/05 13:23:07 andreas 00380 ** - changed to support new streaming facilities 00381 ** - more cleanups 00382 ** - merged read / write methods for block and file transfer 00383 ** 00384 */