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: Andreas Barth 00017 * 00018 * Purpose: 00019 * Interface of class DcmPolymorphOBOW for Tags that can change their VR 00020 * between OB and OW (e.g. Tag PixelData, OverlayData). This class shall 00021 * not be used directly in applications. No identification exists. 00022 * 00023 * Last Update: $Author: joergr $ 00024 * Update Date: $Date: 2010-10-14 13:15:43 $ 00025 * CVS/RCS Revision: $Revision: 1.18 $ 00026 * Status: $State: Exp $ 00027 * 00028 * CVS/RCS Log at end of file 00029 * 00030 */ 00031 00032 #ifndef DCVRPOBW_H 00033 #define DCVRPOBW_H 00034 00035 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 00036 #include "dcmtk/dcmdata/dcvrobow.h" 00037 00041 class DcmPolymorphOBOW : public DcmOtherByteOtherWord 00042 { 00043 public: 00044 00049 DcmPolymorphOBOW( 00050 const DcmTag & tag, 00051 const Uint32 len = 0); 00052 00054 DcmPolymorphOBOW( 00055 const DcmPolymorphOBOW & old); 00056 00058 virtual ~DcmPolymorphOBOW(); 00059 00063 DcmPolymorphOBOW &operator=( 00064 const DcmPolymorphOBOW &obj); 00065 00069 virtual DcmObject *clone() const 00070 { 00071 return new DcmPolymorphOBOW(*this); 00072 } 00073 00086 virtual OFCondition copyFrom(const DcmObject& rhs); 00087 00103 virtual OFCondition read( 00104 DcmInputStream & inStream, 00105 const E_TransferSyntax ixfer, 00106 const E_GrpLenEncoding glenc, 00107 const Uint32 maxReadLength); 00108 00131 virtual OFCondition write( 00132 DcmOutputStream &outStream, 00133 const E_TransferSyntax oxfer, 00134 const E_EncodingType enctype, 00135 DcmWriteCache *wcache); 00136 00144 virtual OFCondition writeSignatureFormat( 00145 DcmOutputStream &outStream, 00146 const E_TransferSyntax oxfer, 00147 const E_EncodingType enctype, 00148 DcmWriteCache *wcache); 00149 00153 virtual void transferInit(); 00154 00158 virtual void transferEnd(); 00159 00168 virtual OFCondition getUint8Array(Uint8 *&val); // for bytes 00169 00178 virtual OFCondition getUint16Array(Uint16 *&val); 00179 00186 virtual OFCondition putUint8Array(const Uint8 *vals, const unsigned long num); 00187 00194 virtual OFCondition putUint16Array(const Uint16 *vals, const unsigned long num); 00195 00203 virtual OFCondition createUint8Array( 00204 const Uint32 numBytes, 00205 Uint8 * & bytes); 00206 00207 00215 virtual OFCondition createUint16Array( 00216 const Uint32 numWords, 00217 Uint16 * & words); 00218 00219 private: 00220 00226 OFBool changeVR; 00227 00229 DcmEVR currentVR; 00230 00231 }; 00232 #endif 00233 00234 /* 00235 ** CVS/RCS Log: 00236 ** $Log: dcvrpobw.h,v $ 00237 ** Revision 1.18 2010-10-14 13:15:43 joergr 00238 ** Updated copyright header. Added reference to COPYRIGHT file. 00239 ** 00240 ** Revision 1.17 2008-07-17 11:19:49 onken 00241 ** Updated copyFrom() documentation. 00242 ** 00243 ** Revision 1.16 2008-07-17 10:30:23 onken 00244 ** Implemented copyFrom() method for complete DcmObject class hierarchy, which 00245 ** permits setting an instance's value from an existing object. Implemented 00246 ** assignment operator where necessary. 00247 ** 00248 ** Revision 1.15 2007-11-29 14:30:19 meichel 00249 ** Write methods now handle large raw data elements (such as pixel data) 00250 ** without loading everything into memory. This allows very large images to 00251 ** be sent over a network connection, or to be copied without ever being 00252 ** fully in memory. 00253 ** 00254 ** Revision 1.14 2007/06/07 09:00:59 joergr 00255 ** Fixed incorrect comment. 00256 ** 00257 ** Revision 1.13 2005/12/08 16:29:06 meichel 00258 ** Changed include path schema for all DCMTK header files 00259 ** 00260 ** Revision 1.12 2004/07/01 12:28:25 meichel 00261 ** Introduced virtual clone method for DcmObject and derived classes. 00262 ** 00263 ** Revision 1.11 2002/09/12 14:07:16 joergr 00264 ** Added method "createUint8Array" which works similar to the 16 bit variant. 00265 ** 00266 ** Revision 1.10 2002/08/27 16:55:40 meichel 00267 ** Initial release of new DICOM I/O stream classes that add support for stream 00268 ** compression (deflated little endian explicit VR transfer syntax) 00269 ** 00270 ** Revision 1.9 2001/09/25 17:19:33 meichel 00271 ** Adapted dcmdata to class OFCondition 00272 ** 00273 ** Revision 1.8 2001/06/01 15:48:52 meichel 00274 ** Updated copyright header 00275 ** 00276 ** Revision 1.7 2001/05/10 12:52:56 meichel 00277 ** Added public createUint16Array() method in class DcmPolymorphOBOW. 00278 ** 00279 ** Revision 1.6 2000/11/07 16:56:11 meichel 00280 ** Initial release of dcmsign module for DICOM Digital Signatures 00281 ** 00282 ** Revision 1.5 2000/03/08 16:26:25 meichel 00283 ** Updated copyright header. 00284 ** 00285 ** Revision 1.4 1999/03/31 09:25:05 meichel 00286 ** Updated copyright header in module dcmdata 00287 ** 00288 ** Revision 1.3 1998/11/12 16:47:53 meichel 00289 ** Implemented operator= for all classes derived from DcmObject. 00290 ** 00291 ** Revision 1.2 1997/07/31 06:59:00 andreas 00292 ** Error correction and additonal functionality for 00293 ** DcmPolymorphOBOW to support getting and putting of Uint8 and 00294 ** Uint16 data independent of the VR. 00295 ** 00296 ** Revision 1.1 1997/07/21 07:54:00 andreas 00297 ** - Support for CP 14. PixelData and OverlayData can have VR OW or OB 00298 ** (depending on the transfer syntax). New internal value 00299 ** representation (only for ident()) for OverlayData. 00300 ** 00301 */