digsdfn.h

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


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