1 /* 2 * 3 * Copyright (C) 1996-2002, OFFIS 4 * 5 * This software and supporting documentation were developed by 6 * 7 * Kuratorium OFFIS e.V. 8 * Healthcare Information and Communication Systems 9 * Escherweg 2 10 * D-26121 Oldenburg, Germany 11 * 12 * THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND OFFIS MAKES NO WARRANTY 13 * REGARDING THE SOFTWARE, ITS PERFORMANCE, ITS MERCHANTABILITY OR 14 * FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES OR 15 * ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND 16 * PERFORMANCE OF THE SOFTWARE IS WITH THE USER. 17 * 18 * Module: dcmimgle 19 * 20 * Author: Joerg Riesmeier 21 * 22 * Purpose: DicomGSDFLUT (Header) 23 * 24 */ 25 26 27 #ifndef __DIGSDLUT_H 28 #define __DIGSDLUT_H 29 30 #include "osconfig.h" 31 32 #include "didislut.h" 33 34 35 /*---------------------* 36 * class declaration * 37 *---------------------*/ 38 39 /** Class to compute and store the GSDF lookup table 40 */ 41 class DiGSDFLUT 42 : public DiDisplayLUT 43 { 44 public: 45 46 /** constructor 47 * 48 ** @param count number of values to be stored 49 * @param max maximum value to be stored 50 * @param ddl_tab array of DDL values 51 * @param val_tab array of values 52 * @param ddl_cnt number of DDL values 53 * @param gsdf_tab array with GSDF 54 * @param gsdf_spl array with helper function used for interpolation 55 * @param gsdf_cnt number of values in GSDF 56 * @param jnd_min minimum JND index value 57 * @param jnd_max maximum JND index value 58 * @param amb (reflected) ambient light value 59 * @param illum illumination value 60 * @param inverse apply inverse transformation 61 * @param stream output stream (used to write curve data to a file) 62 * @param printMode write CC and PSC to stream if OFTrue 63 */ 64 DiGSDFLUT(const unsigned long count, 65 const Uint16 max, 66 const Uint16 *ddl_tab, 67 const double *val_tab, 68 const unsigned long ddl_cnt, 69 const double *gsdf_tab, 70 const double *gsdf_spl, 71 const unsigned int gsdf_cnt, 72 const double jnd_min, 73 const double jnd_max, 74 const double amb, 75 const double illum, 76 const OFBool inverse = OFFalse, 77 ostream *stream = NULL, 78 const OFBool printMode = OFTrue); 79 80 /** destructor 81 */ 82 virtual ~DiGSDFLUT(); 83 84 85 protected: 86 87 /** create lookup table 88 * 89 ** @param ddl_tab array of DDL values 90 * @param val_tab array of values 91 * @param ddl_cnt number of DDL values 92 * @param gsdf_tab array with GSDF 93 * @param gsdf_spl array with helper function used for interpolation 94 * @param gsdf_cnt number of values in GSDF 95 * @param jnd_min minimum JND index value 96 * @param jnd_max maximum JND index value 97 * @param inverse apply inverse transformation 98 * @param stream output stream (used to write curve data to a file) 99 * @param printMode write CC and PSC to stream if OFTrue 100 * 101 ** @return status, true if successful, false otherwise 102 */ 103 int createLUT(const Uint16 *ddl_tab, 104 const double *val_tab, 105 const unsigned long ddl_cnt, 106 const double *gsdf_tab, 107 const double *gsdf_spl, 108 const unsigned int gsdf_cnt, 109 const double jnd_min, 110 const double jnd_max, 111 const OFBool inverse = OFFalse, 112 ostream *stream = NULL, 113 const OFBool mode = OFTrue); 114 }; 115 116 117 #endif 118