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: DicomInputPixel (Header) 00023 * 00024 * Last Update: $Author: meichel $ 00025 * Update Date: $Date: 2005/12/08 16:47:43 $ 00026 * CVS/RCS Revision: $Revision: 1.17 $ 00027 * Status: $State: Exp $ 00028 * 00029 * CVS/RCS Log at end of file 00030 * 00031 */ 00032 00033 00034 #ifndef DIINPX_H 00035 #define DIINPX_H 00036 00037 #include "dcmtk/config/osconfig.h" 00038 #include "dcmtk/ofstd/ofconsol.h" 00039 #include "dcmtk/dcmdata/dctypes.h" 00040 00041 #include "dcmtk/dcmimgle/diutils.h" 00042 00043 00044 /*---------------------* 00045 * class declaration * 00046 *---------------------*/ 00047 00050 class DiInputPixel 00051 { 00052 00053 public: 00054 00061 DiInputPixel(const unsigned int bits, 00062 const unsigned long start, 00063 const unsigned long count); 00064 00067 virtual ~DiInputPixel(); 00068 00073 virtual int determineMinMax() = 0; 00074 00081 virtual EP_Representation getRepresentation() const = 0; 00082 00087 virtual const void *getData() const = 0; 00088 00093 virtual void *getDataPtr() = 0; 00094 00097 virtual void removeDataReference() = 0; 00098 00106 virtual double getMinValue(const int idx) const = 0; 00107 00115 virtual double getMaxValue(const int idx) const = 0; 00116 00121 inline unsigned int getBits() const 00122 { 00123 return Bits; 00124 } 00125 00130 inline double getAbsMinimum() const 00131 { 00132 return AbsMinimum; 00133 } 00134 00139 inline double getAbsMaximum() const 00140 { 00141 return AbsMaximum; 00142 } 00143 00148 inline double getAbsMaxRange() const 00149 { 00150 return AbsMaximum - AbsMinimum + 1; 00151 } 00152 00157 inline unsigned long getCount() const 00158 { 00159 return Count; 00160 } 00161 00166 inline unsigned long getPixelStart() const 00167 { 00168 return PixelStart; 00169 } 00170 00175 inline unsigned long getPixelCount() const 00176 { 00177 return PixelCount; 00178 } 00179 00184 inline unsigned long getComputedCount() const 00185 { 00186 return ComputedCount; 00187 } 00188 00189 00190 protected: 00191 00193 unsigned long Count; 00195 unsigned int Bits; 00196 00198 unsigned long PixelStart; 00200 unsigned long PixelCount; 00201 00203 unsigned long ComputedCount; 00204 00206 double AbsMinimum; 00208 double AbsMaximum; 00209 }; 00210 00211 00212 #endif 00213 00214 00215 /* 00216 * 00217 * CVS/RCS Log: 00218 * $Log: diinpx.h,v $ 00219 * Revision 1.17 2005/12/08 16:47:43 meichel 00220 * Changed include path schema for all DCMTK header files 00221 * 00222 * Revision 1.16 2004/02/06 11:07:50 joergr 00223 * Distinguish more clearly between const and non-const access to pixel data. 00224 * 00225 * Revision 1.15 2003/12/08 18:23:09 joergr 00226 * Removed leading underscore characters from preprocessor symbols (reserved 00227 * symbols). Updated copyright header. 00228 * 00229 * Revision 1.14 2002/06/26 16:02:31 joergr 00230 * Enhanced handling of corrupted pixel data and/or length. 00231 * 00232 * Revision 1.13 2001/09/28 13:04:58 joergr 00233 * Enhanced algorithm to determine the min and max value. 00234 * 00235 * Revision 1.12 2001/06/01 15:49:42 meichel 00236 * Updated copyright header 00237 * 00238 * Revision 1.11 2000/04/27 13:08:38 joergr 00239 * Dcmimgle library code now consistently uses ofConsole for error output. 00240 * 00241 * Revision 1.10 2000/03/08 16:24:16 meichel 00242 * Updated copyright header. 00243 * 00244 * Revision 1.9 2000/03/03 14:09:11 meichel 00245 * Implemented library support for redirecting error messages into memory 00246 * instead of printing them to stdout/stderr for GUI applications. 00247 * 00248 * Revision 1.8 1999/09/17 12:13:18 joergr 00249 * Added/changed/completed DOC++ style comments in the header files. 00250 * 00251 * Revision 1.7 1999/07/23 13:54:37 joergr 00252 * Optimized memory usage for converting input pixel data (reference instead 00253 * of copying where possible). 00254 * 00255 * Revision 1.6 1999/03/24 17:20:02 joergr 00256 * Added/Modified comments and formatting. 00257 * 00258 * Revision 1.5 1999/02/03 17:03:47 joergr 00259 * Added member variable and related methods to store number of bits used for 00260 * pixel data. 00261 * 00262 * Revision 1.4 1999/01/20 15:00:54 joergr 00263 * Added routine to calculate absolute range of pixel data. 00264 * 00265 * Revision 1.3 1998/12/22 14:18:40 joergr 00266 * Added implementation of methods to return member variables AbsMinimum/ 00267 * Maximum. 00268 * 00269 * Revision 1.2 1998/12/16 16:30:34 joergr 00270 * Added methods to determine absolute minimum and maximum value for given 00271 * value representation. 00272 * 00273 * Revision 1.1 1998/11/27 15:06:38 joergr 00274 * Added copyright message. 00275 * 00276 * Revision 1.3 1998/05/11 14:53:17 joergr 00277 * Added CVS/RCS header to each file. 00278 * 00279 * 00280 */