Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | Related Pages

dcvrpobw.h

00001 /*
00002  *
00003  *  Copyright (C) 1994-2002, 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:  Andreas Barth
00021  *
00022  *  Purpose:
00023  *  Interface of class DcmPolymorphOBOW for Tags that can change their VR
00024  *  between OB and OW (e.g. Tag PixelData, OverlayData). This class shall
00025  *  not be used directly in applications. No identification exists.
00026  *
00027  *  Last Update:      $Author: joergr $
00028  *  Update Date:      $Date: 2002/09/12 14:07:16 $
00029  *  Source File:      $Source: /share/dicom/cvs-depot/dcmtk/dcmdata/include/dcvrpobw.h,v $
00030  *  CVS/RCS Revision: $Revision: 1.11 $
00031  *  Status:           $State: Exp $
00032  *
00033  *  CVS/RCS Log at end of file
00034  *
00035  */
00036 
00037 #ifndef DCVRPOBW_H
00038 #define DCVRPOBW_H
00039 
00040 #include "osconfig.h"    /* make sure OS specific configuration is included first */
00041 #include "dcvrobow.h"
00042 
00043 class DcmPolymorphOBOW : public DcmOtherByteOtherWord
00044 {
00045 private:
00046     OFBool changeVR;
00047     DcmEVR currentVR;    // current VR of value field (can change)
00048 
00049 public:
00050     DcmPolymorphOBOW(
00051         const DcmTag & tag,
00052         const Uint32 len = 0);
00053 
00054     DcmPolymorphOBOW(
00055         const DcmPolymorphOBOW & old);
00056 
00057     virtual ~DcmPolymorphOBOW();
00058 
00059     DcmPolymorphOBOW &operator=(
00060         const DcmPolymorphOBOW &obj);
00061 
00062     virtual OFCondition read(
00063         DcmInputStream & inStream,
00064         const E_TransferSyntax ixfer,
00065         const E_GrpLenEncoding glenc,
00066         const Uint32 maxReadLength);
00067 
00068     virtual OFCondition write(
00069         DcmOutputStream & outStream,
00070         const E_TransferSyntax oxfer,
00071         const E_EncodingType enctype = EET_UndefinedLength);
00072 
00075     virtual OFCondition writeSignatureFormat(
00076         DcmOutputStream & outStream,
00077         const E_TransferSyntax oxfer,
00078         const E_EncodingType enctype = EET_UndefinedLength);
00079 
00080     virtual void transferInit();
00081     virtual void transferEnd();
00082 
00083     // get data as Uint8 Array
00084     virtual OFCondition getUint8Array(
00085         Uint8 * & bytes);
00086 
00087     // get data as Uint16 Array
00088     virtual OFCondition getUint16Array(
00089         Uint16 * & words);
00090 
00091     // put an Unit8 array. It is converted to OW if VR == OW
00092     virtual OFCondition putUint8Array(
00093         const Uint8 * byteValue,
00094         const unsigned long length);
00095 
00096     // put an Unit16 array. It is converted to OB if VR == OB
00097     virtual OFCondition putUint16Array(
00098         const Uint16 * wordValue,
00099         const unsigned long length );
00100 
00101     // create an empty Uint8 array of given number of words and set it
00102     virtual OFCondition createUint8Array(
00103         const Uint32 numBytes,
00104         Uint8 * & bytes);
00105 
00106     // create an empty Uint16 array of given number of words and set it
00107     virtual OFCondition createUint16Array(
00108         const Uint32 numWords,
00109         Uint16 * & words);
00110 };
00111 #endif
00112 
00113 /*
00114 ** CVS/RCS Log:
00115 ** $Log: dcvrpobw.h,v $
00116 ** Revision 1.11  2002/09/12 14:07:16  joergr
00117 ** Added method "createUint8Array" which works similar to the 16 bit variant.
00118 **
00119 ** Revision 1.10  2002/08/27 16:55:40  meichel
00120 ** Initial release of new DICOM I/O stream classes that add support for stream
00121 **   compression (deflated little endian explicit VR transfer syntax)
00122 **
00123 ** Revision 1.9  2001/09/25 17:19:33  meichel
00124 ** Adapted dcmdata to class OFCondition
00125 **
00126 ** Revision 1.8  2001/06/01 15:48:52  meichel
00127 ** Updated copyright header
00128 **
00129 ** Revision 1.7  2001/05/10 12:52:56  meichel
00130 ** Added public createUint16Array() method in class DcmPolymorphOBOW.
00131 **
00132 ** Revision 1.6  2000/11/07 16:56:11  meichel
00133 ** Initial release of dcmsign module for DICOM Digital Signatures
00134 **
00135 ** Revision 1.5  2000/03/08 16:26:25  meichel
00136 ** Updated copyright header.
00137 **
00138 ** Revision 1.4  1999/03/31 09:25:05  meichel
00139 ** Updated copyright header in module dcmdata
00140 **
00141 ** Revision 1.3  1998/11/12 16:47:53  meichel
00142 ** Implemented operator= for all classes derived from DcmObject.
00143 **
00144 ** Revision 1.2  1997/07/31 06:59:00  andreas
00145 ** Error correction and additonal functionality for
00146 ** DcmPolymorphOBOW to support getting and putting of Uint8 and
00147 ** Uint16 data independent of the VR.
00148 **
00149 ** Revision 1.1  1997/07/21 07:54:00  andreas
00150 ** - Support for CP 14. PixelData and OverlayData can have VR OW or OB
00151 **   (depending on the transfer syntax). New internal value
00152 **   representation (only for ident()) for OverlayData.
00153 **
00154 */


Generated on 26 Apr 2005 for OFFIS DCMTK Version 3.5.3 by Doxygen 1.4.2