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: DicomGSDFunction (Header) 00019 * 00020 * Last Update: $Author: joergr $ 00021 * Update Date: $Date: 2010-10-14 13:16:26 $ 00022 * CVS/RCS Revision: $Revision: 1.17 $ 00023 * Status: $State: Exp $ 00024 * 00025 * CVS/RCS Log at end of file 00026 * 00027 */ 00028 00029 00030 #ifndef DIGSDFN_H 00031 #define DIGSDFN_H 00032 00033 #include "dcmtk/config/osconfig.h" 00034 00035 #include "dcmtk/dcmimgle/didispfn.h" 00036 00037 #define INCLUDE_CSTDDEF /* For NULL */ 00038 #include "dcmtk/ofstd/ofstdinc.h" 00039 00040 00041 /*---------------------* 00042 * class declaration * 00043 *---------------------*/ 00044 00047 class DiGSDFunction 00048 : public DiDisplayFunction 00049 { 00050 00051 public: 00052 00064 DiGSDFunction(const char *filename, 00065 const E_DeviceType deviceType = EDT_Monitor, 00066 const signed int ord = -1); 00067 00079 DiGSDFunction(const double *val_tab, 00080 const unsigned long count, 00081 const Uint16 max = 255, 00082 const E_DeviceType deviceType = EDT_Monitor, 00083 const signed int ord = 0); 00084 00097 DiGSDFunction(const Uint16 *ddl_tab, 00098 const double *val_tab, 00099 const unsigned long count, 00100 const Uint16 max = 255, 00101 const E_DeviceType deviceType = EDT_Monitor, 00102 const signed int ord = 0); 00103 00113 DiGSDFunction(const double val_min, 00114 const double val_max, 00115 const unsigned long count = 256, 00116 const E_DeviceType deviceType = EDT_Monitor, 00117 const signed int ord = 0); 00118 00121 virtual ~DiGSDFunction(); 00122 00130 int writeCurveData(const char *filename, 00131 const OFBool mode = OFTrue); 00132 00142 int setAmbientLightValue(const double value); 00143 00153 int setIlluminationValue(const double value); 00154 00163 int setMinDensityValue(const double value); 00164 00173 int setMaxDensityValue(const double value); 00174 00181 static double getJNDIndex(const double lum); 00182 00183 00184 protected: 00185 00192 DiDisplayLUT *getDisplayLUT(unsigned long count); 00193 00198 int calculateGSDF(); 00199 00204 int calculateGSDFSpline(); 00205 00210 int calculateJNDBoundaries(); 00211 00212 00213 private: 00214 00216 double JNDMin; 00218 double JNDMax; 00219 00221 static const unsigned int GSDFCount; 00223 double *GSDFValue; 00225 double *GSDFSpline; 00226 00227 // --- declarations to avoid compiler warnings 00228 00229 DiGSDFunction(const DiGSDFunction &); 00230 DiGSDFunction &operator=(const DiGSDFunction &); 00231 }; 00232 00233 00234 #endif 00235 00236 00237 /* 00238 * 00239 * CVS/RCS Log: 00240 * $Log: digsdfn.h,v $ 00241 * Revision 1.17 2010-10-14 13:16:26 joergr 00242 * Updated copyright header. Added reference to COPYRIGHT file. 00243 * 00244 * Revision 1.16 2010-03-01 09:08:46 uli 00245 * Removed some unnecessary include directives in the headers. 00246 * 00247 * Revision 1.15 2005-12-08 16:47:40 meichel 00248 * Changed include path schema for all DCMTK header files 00249 * 00250 * Revision 1.14 2003/12/08 18:21:00 joergr 00251 * Removed leading underscore characters from preprocessor symbols (reserved 00252 * symbols). Updated CVS header. 00253 * 00254 * Revision 1.13 2003/02/12 11:35:16 joergr 00255 * Added Dmin/max support to CIELAB calibration routines. 00256 * 00257 * Revision 1.12 2003/02/11 10:01:14 joergr 00258 * Added support for Dmin/max to calibration routines (required for printers). 00259 * 00260 * Revision 1.11 2002/07/19 08:24:21 joergr 00261 * Enhanced/corrected comments. 00262 * 00263 * Revision 1.10 2002/07/18 12:30:01 joergr 00264 * Added support for hardcopy and softcopy input devices (camera and scanner). 00265 * Added polygonal curve fitting algorithm as an alternate interpolation 00266 * method. 00267 * 00268 * Revision 1.9 2002/07/02 16:23:42 joergr 00269 * Added support for hardcopy devices to the calibrated output routines. 00270 * 00271 * Revision 1.8 2001/06/01 15:49:41 meichel 00272 * Updated copyright header 00273 * 00274 * Revision 1.7 2000/07/17 14:37:12 joergr 00275 * Moved method getJNDIndex to public part of the interface. 00276 * 00277 * Revision 1.6 2000/03/08 16:24:15 meichel 00278 * Updated copyright header. 00279 * 00280 * Revision 1.5 2000/03/06 18:19:36 joergr 00281 * Moved get-method to base class, renamed method and made method virtual to 00282 * avoid hiding of methods (reported by Sun CC 4.2). 00283 * 00284 * Revision 1.4 1999/10/18 15:05:51 joergr 00285 * Enhanced command line tool dcmdspfn (added new options). 00286 * 00287 * Revision 1.3 1999/09/17 12:11:31 joergr 00288 * Added/changed/completed DOC++ style comments in the header files. 00289 * 00290 * Revision 1.2 1999/09/10 12:17:56 joergr 00291 * Changed parameter type of copy constructor and assignment operator to avoid 00292 * compiler warnings reported by gcc/ecgs on Solaris (with additional flags). 00293 * 00294 * Revision 1.1 1999/09/10 08:50:23 joergr 00295 * Added support for CIELAB display function. Restructured class hierarchy 00296 * for display functions. 00297 * 00298 * 00299 */