dcpxitem.h

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, Andreas Barth
00021  *
00022  *  Purpose: Interface of class DcmPixelItem
00023  *
00024  *  Last Update:      $Author: meichel $
00025  *  Update Date:      $Date: 2005/12/08 16:28:32 $
00026  *  Source File:      $Source: /share/dicom/cvs-depot/dcmtk/dcmdata/include/dcmtk/dcmdata/dcpxitem.h,v $
00027  *  CVS/RCS Revision: $Revision: 1.21 $
00028  *  Status:           $State: Exp $
00029  *
00030  *  CVS/RCS Log at end of file
00031  *
00032  */
00033 
00034 #ifndef DCPXITEM_H
00035 #define DCPXITEM_H
00036 
00037 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
00038 #include "dcmtk/ofstd/ofconsol.h"
00039 #include "dcmtk/dcmdata/dctypes.h"
00040 #include "dcmtk/dcmdata/dcvrobow.h"
00041 #include "dcmtk/dcmdata/dcofsetl.h"    /* for class DcmOffsetList */
00042 
00043 // CLASS DcmPixelItem
00044 // This is a pseudo item, that has a value with representation OB
00045 // and has no sub elements. Since a DcmOtherByteOtherWord is defined as a
00046 // Dicom structure with a value of representation OW/OB it is better to
00047 // derive this class from DcmOtherByteOtherWord.
00048 
00049 class DcmPixelItem : public DcmOtherByteOtherWord
00050 
00051 {
00052   protected:
00053     virtual OFCondition writeTagAndLength(DcmOutputStream & outStream,
00054                       const E_TransferSyntax oxfer,
00055                       Uint32 & writtenBytes) const;
00056   public:
00057     DcmPixelItem(const DcmTag &tag, const Uint32 len = 0);
00058     DcmPixelItem(const DcmPixelItem &old);
00059     virtual ~DcmPixelItem();
00060 
00061     DcmPixelItem &operator=(const DcmPixelItem &obj) { DcmOtherByteOtherWord::operator=(obj); return *this; }
00062 
00066     virtual DcmObject *clone() const
00067     {
00068       return new DcmPixelItem(*this);
00069     }
00070 
00071     virtual DcmEVR ident(void) const { return EVR_pixelItem; }
00072 
00073     virtual void print(ostream &out,
00074                        const size_t flags = 0,
00075                        const int level = 0,
00076                        const char *pixelFileName = NULL,
00077                        size_t *pixelCounter = NULL);
00078 
00084     virtual OFCondition createOffsetTable(const DcmOffsetList& offsetList);
00085 
00091     virtual OFCondition writeXML(ostream &out,
00092                                  const size_t flags = 0);
00093 
00096     virtual OFCondition writeSignatureFormat(DcmOutputStream & outStream,
00097                      const E_TransferSyntax oxfer,
00098                      const E_EncodingType enctype
00099                      = EET_UndefinedLength);
00100 
00101 };
00102 
00103 
00104 #endif // DCPXITEM_H
00105 
00106 /*
00107 ** CVS/RCS Log:
00108 ** $Log: dcpxitem.h,v $
00109 ** Revision 1.21  2005/12/08 16:28:32  meichel
00110 ** Changed include path schema for all DCMTK header files
00111 **
00112 ** Revision 1.20  2005/11/24 12:50:57  meichel
00113 ** Fixed bug in code that prepares a byte stream that is fed into the MAC
00114 **   algorithm when creating or verifying a digital signature. The previous
00115 **   implementation was non-conformant when signatures included compressed
00116 **   (encapsulated) pixel data because the item length was included in the byte
00117 **   stream, while it should not. The global variable dcmEnableOldSignatureFormat
00118 **   and a corresponding command line option in dcmsign allow to re-enable the old
00119 **   implementation.
00120 **
00121 ** Revision 1.19  2004/07/01 12:28:25  meichel
00122 ** Introduced virtual clone method for DcmObject and derived classes.
00123 **
00124 ** Revision 1.18  2002/12/06 12:49:12  joergr
00125 ** Enhanced "print()" function by re-working the implementation and replacing
00126 ** the boolean "showFullData" parameter by a more general integer flag.
00127 ** Added doc++ documentation.
00128 ** Made source code formatting more consistent with other modules/files.
00129 **
00130 ** Revision 1.17  2002/08/27 16:55:38  meichel
00131 ** Initial release of new DICOM I/O stream classes that add support for stream
00132 **   compression (deflated little endian explicit VR transfer syntax)
00133 **
00134 ** Revision 1.16  2002/05/24 14:51:42  meichel
00135 ** Moved helper methods that are useful for different compression techniques
00136 **   from module dcmjpeg to module dcmdata
00137 **
00138 ** Revision 1.15  2002/04/25 09:41:46  joergr
00139 ** Added support for XML output of DICOM objects.
00140 **
00141 ** Revision 1.14  2001/11/16 15:54:39  meichel
00142 ** Adapted digital signature code to final text of supplement 41.
00143 **
00144 ** Revision 1.13  2001/09/25 17:19:28  meichel
00145 ** Adapted dcmdata to class OFCondition
00146 **
00147 ** Revision 1.12  2001/06/01 15:48:43  meichel
00148 ** Updated copyright header
00149 **
00150 ** Revision 1.11  2000/04/14 15:31:33  meichel
00151 ** Removed default value from output stream passed to print() method.
00152 **   Required for use in multi-thread environments.
00153 **
00154 ** Revision 1.10  2000/03/08 16:26:17  meichel
00155 ** Updated copyright header.
00156 **
00157 ** Revision 1.9  2000/03/03 14:05:25  meichel
00158 ** Implemented library support for redirecting error messages into memory
00159 **   instead of printing them to stdout/stderr for GUI applications.
00160 **
00161 ** Revision 1.8  2000/02/10 10:50:53  joergr
00162 ** Added new feature to dcmdump (enhanced print method of dcmdata): write
00163 ** pixel data/item value fields to raw files.
00164 **
00165 ** Revision 1.7  1999/03/31 09:24:45  meichel
00166 ** Updated copyright header in module dcmdata
00167 **
00168 ** Revision 1.6  1998/11/12 16:47:43  meichel
00169 ** Implemented operator= for all classes derived from DcmObject.
00170 **
00171 ** Revision 1.5  1997/05/22 16:57:10  andreas
00172 ** - Corrected errors for writing of pixel sequences for encapsulated
00173 **   transfer syntaxes.
00174 **
00175 ** Revision 1.4  1996/01/29 13:38:13  andreas
00176 ** - new put method for every VR to put value as a string
00177 ** - better and unique print methods
00178 **
00179 ** Revision 1.3  1996/01/05 13:22:58  andreas
00180 ** - changed to support new streaming facilities
00181 ** - more cleanups
00182 ** - merged read / write methods for block and file transfer
00183 **
00184 */


Generated on 20 Dec 2005 for OFFIS DCMTK Version 3.5.4 by Doxygen 1.4.5