File: plfiltercontrast_8h-source.html

package info (click to toggle)
paintlib 2.6.2-8
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 7,900 kB
  • ctags: 3,875
  • sloc: cpp: 25,209; sh: 10,600; ansic: 1,891; makefile: 119
file content (101 lines) | stat: -rw-r--r-- 7,608 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>paintlib: plfiltercontrast.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.2 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Compound&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Compound&nbsp;Members</a></div>
<h1>plfiltercontrast.h</h1><div class="fragment"><pre>00001 <span class="comment">/*</span>
00002 <span class="comment">/--------------------------------------------------------------------</span>
00003 <span class="comment">|</span>
00004 <span class="comment">|      $Id: plfiltercontrast_8h-source.html,v 1.4 2004/09/15 15:26:29 uzadow Exp $</span>
00005 <span class="comment">|</span>
00006 <span class="comment">|      Copyright (c) 1996-2002 Ulrich von Zadow</span>
00007 <span class="comment">|</span>
00008 <span class="comment">\--------------------------------------------------------------------</span>
00009 <span class="comment">*/</span>
00010 
00011 <span class="preprocessor">#if !defined(INCL_PLFILTERCONTRAST)</span>
00012 <span class="preprocessor"></span><span class="preprocessor">#define INCL_PLFILTERCONTRAST</span>
00013 <span class="preprocessor"></span>
00014 <span class="preprocessor">#if _MSC_VER &gt; 1000</span>
00015 <span class="preprocessor"></span><span class="preprocessor">#pragma once</span>
00016 <span class="preprocessor"></span><span class="preprocessor">#endif // _MSC_VER &gt; 1000</span>
00017 <span class="preprocessor"></span>
00018 <span class="preprocessor">#include "plfilter.h"</span>
00019 <span class="preprocessor">#include "<a class="code" href="plpaintlibdefs_8h.html">plpaintlibdefs.h</a>"</span>
00020 
00021 <span class="keyword">class </span><a class="code" href="classPLBmp.html">PLBmp</a>;
00022 <span class="comment"></span>
00023 <span class="comment">//! Enhances or reduces the image contrast using a linear mapping</span>
00024 <span class="comment">//! between input and output. The zero point (i. e., the intensity</span>
00025 <span class="comment">//! that is neither enhanced nor reduced) has to be provided.</span>
00026 <span class="comment">//! (A Contrast filter is defined in the following way: It lowers all</span>
00027 <span class="comment">//! intensity values below a given threshold, and it raises them</span>
00028 <span class="comment">//! beyond. Most applications position the threshold at 50 %. This</span>
00029 <span class="comment">//! does not always yield the best results, especially if you have an</span>
00030 <span class="comment">//! unbalanced dark/light ratio of pixels. The best you can do here</span>
00031 <span class="comment">//! is play around with the threshold.)</span>
00032 <span class="comment">//! Works for 24 and 32 bpp bitmaps.</span>
<a name="l00033"></a><a class="code" href="classPLFilterContrast.html">00033</a> <span class="comment"></span><span class="keyword">class </span><a class="code" href="classPLFilterContrast.html">PLFilterContrast</a> : <span class="keyword">public</span> <a class="code" href="classPLFilter.html">PLFilter</a>
00034 {
00035 <span class="keyword">public</span>:<span class="comment"></span>
00036 <span class="comment">  //! contrast is the slope of the function. offset is the intensity</span>
00037 <span class="comment">  //! at which the color stays the same. Above this value, intensities</span>
00038 <span class="comment">  //! are increased. Below it, they are reduced. With offset 128 and</span>
00039 <span class="comment">  //! contrast 1, the image stays unchanged.</span>
00040 <span class="comment"></span>  <a class="code" href="classPLFilterContrast.html#a0">PLFilterContrast</a>(<span class="keywordtype">double</span> contrast,
00041                    PLBYTE offset);
00042   <span class="keyword">virtual</span> ~<a class="code" href="classPLFilterContrast.html">PLFilterContrast</a>();
00043   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPLFilterContrast.html#a2">Apply</a>(<a class="code" href="classPLBmpBase.html">PLBmpBase</a> *pBmpSource, <a class="code" href="classPLBmp.html">PLBmp</a>* pBmpDest) <span class="keyword">const</span>;
00044 
00045 <span class="keyword">protected</span>:
00046   <span class="keywordtype">double</span> m_contrast;
00047   <span class="keywordtype">double</span> m_offset;
00048 };
00049 <span class="preprocessor">#endif</span>
00050 <span class="preprocessor"></span>
00051 <span class="comment">/*</span>
00052 <span class="comment">/--------------------------------------------------------------------</span>
00053 <span class="comment">|</span>
00054 <span class="comment">|      $Log: plfiltercontrast_8h-source.html,v $
00054 <span class="comment">|      Revision 1.4  2004/09/15 15:26:29  uzadow
00054 <span class="comment">|      Linux compatibility changes, doc update.
00054 <span class="comment">|</span>
00055 <span class="comment">|      Revision 1.4  2004/06/15 10:26:13  uzadow</span>
00056 <span class="comment">|      Initial nonfunctioning version of plbmpbase.</span>
00057 <span class="comment">|</span>
00058 <span class="comment">|      Revision 1.3  2002/02/24 13:00:46  uzadow</span>
00059 <span class="comment">|      Documentation update; removed buggy PLFilterRotate.</span>
00060 <span class="comment">|</span>
00061 <span class="comment">|      Revision 1.2  2001/10/06 22:03:26  uzadow</span>
00062 <span class="comment">|      Added PL prefix to basic data types.</span>
00063 <span class="comment">|</span>
00064 <span class="comment">|      Revision 1.1  2001/09/16 19:03:23  uzadow</span>
00065 <span class="comment">|      Added global name prefix PL, changed most filenames.</span>
00066 <span class="comment">|</span>
00067 <span class="comment">|      Revision 1.5  2001/01/15 15:05:31  uzadow</span>
00068 <span class="comment">|      Added PLBmp::ApplyFilter() and PLBmp::CreateFilteredCopy()</span>
00069 <span class="comment">|</span>
00070 <span class="comment">|      Revision 1.4  2001/01/13 14:44:52  uzadow</span>
00071 <span class="comment">|      Doc update.</span>
00072 <span class="comment">|</span>
00073 <span class="comment">|      Revision 1.3  2001/01/12 23:30:01  uzadow</span>
00074 <span class="comment">|      Doc update.</span>
00075 <span class="comment">|</span>
00076 <span class="comment">|      Revision 1.2  2001/01/12 23:04:37  uzadow</span>
00077 <span class="comment">|      Comments.</span>
00078 <span class="comment">|</span>
00079 <span class="comment">|      Revision 1.1  2000/11/06 23:20:22  uzadow</span>
00080 <span class="comment">|      Added Contrast, Intensity and Lightness filters by</span>
00081 <span class="comment">|      Thomas Hirschmann</span>
00082 <span class="comment">|</span>
00083 <span class="comment">|</span>
00084 <span class="comment">\--------------------------------------------------------------------</span>
00085 <span class="comment">*/</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Sep 13 16:16:40 2004 for paintlib by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.2 </small></address>
</body>
</html>