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