00001 /* 00002 * 00003 * Copyright (C) 1996-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: dcmimgle 00015 * 00016 * Author: Joerg Riesmeier 00017 * 00018 * Purpose: DicomColorOutputPixel (Header) 00019 * 00020 * Last Update: $Author: joergr $ 00021 * Update Date: $Date: 2010-10-14 13:16:29 $ 00022 * CVS/RCS Revision: $Revision: 1.21 $ 00023 * Status: $State: Exp $ 00024 * 00025 * CVS/RCS Log at end of file 00026 * 00027 */ 00028 00029 00030 #ifndef DICOOPX_H 00031 #define DICOOPX_H 00032 00033 #include "dcmtk/config/osconfig.h" 00034 #include "dcmtk/dcmimgle/diutils.h" 00035 #include "dcmtk/ofstd/ofstream.h" 00036 00037 #define INCLUDE_CSTDLIB 00038 #define INCLUDE_CSTDIO 00039 #include "dcmtk/ofstd/ofstdinc.h" 00040 00041 00042 /*------------------------* 00043 * forward declarations * 00044 *------------------------*/ 00045 00046 class DiPixel; 00047 00048 00049 /*---------------------* 00050 * class declaration * 00051 *---------------------*/ 00052 00055 class DiColorOutputPixel 00056 { 00057 00058 public: 00059 00066 DiColorOutputPixel(const DiPixel *pixel, 00067 const unsigned long size, 00068 const unsigned long frame); 00069 00072 virtual ~DiColorOutputPixel(); 00073 00078 virtual EP_Representation getRepresentation() const = 0; 00079 00084 virtual const void *getData() const = 0; 00085 00090 virtual void *getDataPtr() = 0; 00091 00098 virtual const void *getPlane(const int plane) const = 0; 00099 00104 virtual size_t getItemSize() const = 0; 00105 00112 virtual int writePPM(STD_NAMESPACE ostream& stream) const = 0; 00113 00120 virtual int writePPM(FILE *stream) const = 0; 00121 00126 inline unsigned long getCount() const 00127 { 00128 return FrameSize; 00129 } 00130 00131 00132 protected: 00133 00135 /*const*/ unsigned long Count; 00137 const unsigned long FrameSize; 00138 }; 00139 00140 00141 #endif 00142 00143 00144 /* 00145 * 00146 * CVS/RCS Log: 00147 * $Log: dicoopx.h,v $ 00148 * Revision 1.21 2010-10-14 13:16:29 joergr 00149 * Updated copyright header. Added reference to COPYRIGHT file. 00150 * 00151 * Revision 1.20 2006/08/15 16:35:01 meichel 00152 * Updated the code in module dcmimage to correctly compile when 00153 * all standard C++ classes remain in namespace std. 00154 * 00155 * Revision 1.19 2005/12/08 16:01:32 meichel 00156 * Changed include path schema for all DCMTK header files 00157 * 00158 * Revision 1.18 2004/02/06 11:18:18 joergr 00159 * Distinguish more clearly between const and non-const access to pixel data. 00160 * 00161 * Revision 1.17 2003/12/23 11:23:30 joergr 00162 * Added missing API documentation. 00163 * 00164 * Revision 1.16 2003/12/17 18:13:41 joergr 00165 * Removed leading underscore characters from preprocessor symbols (reserved 00166 * symbols). 00167 * 00168 * Revision 1.15 2002/11/27 14:16:56 meichel 00169 * Adapted module dcmimage to use of new header file ofstdinc.h 00170 * 00171 * Revision 1.14 2002/04/16 13:54:42 joergr 00172 * Added configurable support for C++ ANSI standard includes (e.g. streams). 00173 * 00174 * Revision 1.13 2001/06/01 15:49:28 meichel 00175 * Updated copyright header 00176 * 00177 * Revision 1.12 2000/03/08 16:21:50 meichel 00178 * Updated copyright header. 00179 * 00180 * Revision 1.11 2000/02/23 15:09:39 meichel 00181 * Corrected macro for Borland C++ Builder 4 workaround. 00182 * 00183 * Revision 1.10 2000/02/01 11:02:19 meichel 00184 * Avoiding to include <stdlib.h> as extern "C" on Borland C++ Builder 4, 00185 * workaround for bug in compiler header files. 00186 * 00187 * Revision 1.9 1999/07/23 13:20:44 joergr 00188 * Enhanced handling of corrupted pixel data (wrong length). 00189 * 00190 * Revision 1.8 1999/04/29 09:31:12 joergr 00191 * Moved color related image files back to non-public part. 00192 * 00193 * Revision 1.1 1999/04/28 14:57:31 joergr 00194 * Moved files from dcmimage module to dcmimgle to support new pastel color 00195 * output format. 00196 * 00197 * Revision 1.6 1999/02/03 16:53:42 joergr 00198 * Added BEGIN_EXTERN_C and END_EXTERN_C to some C includes. 00199 * 00200 * Revision 1.5 1999/01/20 14:42:06 joergr 00201 * Replaced invocation of getCount() by member variable Count where possible. 00202 * 00203 * Revision 1.4 1998/11/27 13:44:29 joergr 00204 * Added copyright message. 00205 * 00206 * Revision 1.3 1998/05/11 14:53:12 joergr 00207 * Added CVS/RCS header to each file. 00208 * 00209 * 00210 */