1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
---|
2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
---|
3 | <title>mixpp: pnm.h Source File</title> |
---|
4 | <link href="tabs.css" rel="stylesheet" type="text/css"> |
---|
5 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
---|
6 | </head><body> |
---|
7 | <!-- Generated by Doxygen 1.5.8 --> |
---|
8 | <script type="text/javascript"> |
---|
9 | <!-- |
---|
10 | function changeDisplayState (e){ |
---|
11 | var num=this.id.replace(/[^[0-9]/g,''); |
---|
12 | var button=this.firstChild; |
---|
13 | var sectionDiv=document.getElementById('dynsection'+num); |
---|
14 | if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){ |
---|
15 | sectionDiv.style.display='block'; |
---|
16 | button.src='open.gif'; |
---|
17 | }else{ |
---|
18 | sectionDiv.style.display='none'; |
---|
19 | button.src='closed.gif'; |
---|
20 | } |
---|
21 | } |
---|
22 | function initDynSections(){ |
---|
23 | var divs=document.getElementsByTagName('div'); |
---|
24 | var sectionCounter=1; |
---|
25 | for(var i=0;i<divs.length-1;i++){ |
---|
26 | if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){ |
---|
27 | var header=divs[i]; |
---|
28 | var section=divs[i+1]; |
---|
29 | var button=header.firstChild; |
---|
30 | if (button!='IMG'){ |
---|
31 | divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild); |
---|
32 | button=document.createElement('img'); |
---|
33 | divs[i].insertBefore(button,divs[i].firstChild); |
---|
34 | } |
---|
35 | header.style.cursor='pointer'; |
---|
36 | header.onclick=changeDisplayState; |
---|
37 | header.id='dynheader'+sectionCounter; |
---|
38 | button.src='closed.gif'; |
---|
39 | section.id='dynsection'+sectionCounter; |
---|
40 | section.style.display='none'; |
---|
41 | section.style.marginLeft='14px'; |
---|
42 | sectionCounter++; |
---|
43 | } |
---|
44 | } |
---|
45 | } |
---|
46 | window.onload = initDynSections; |
---|
47 | --> |
---|
48 | </script> |
---|
49 | <div class="navigation" id="top"> |
---|
50 | <div class="tabs"> |
---|
51 | <ul> |
---|
52 | <li><a href="main.html"><span>Main Page</span></a></li> |
---|
53 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
54 | <li><a href="modules.html"><span>Modules</span></a></li> |
---|
55 | <li><a href="annotated.html"><span>Classes</span></a></li> |
---|
56 | <li class="current"><a href="files.html"><span>Files</span></a></li> |
---|
57 | </ul> |
---|
58 | </div> |
---|
59 | <div class="tabs"> |
---|
60 | <ul> |
---|
61 | <li><a href="files.html"><span>File List</span></a></li> |
---|
62 | <li><a href="globals.html"><span>File Members</span></a></li> |
---|
63 | </ul> |
---|
64 | </div> |
---|
65 | <h1>pnm.h</h1><a href="pnm_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 |
---|
66 | <a name="l00029"></a>00029 <span class="preprocessor">#ifndef PNM_H</span> |
---|
67 | <a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define PNM_H</span> |
---|
68 | <a name="l00031"></a>00031 <span class="preprocessor"></span> |
---|
69 | <a name="l00032"></a>00032 <span class="preprocessor">#include <<a class="code" href="mat_8h.html" title="Matrix Class Definitions.">itpp/base/mat.h</a>></span> |
---|
70 | <a name="l00033"></a>00033 |
---|
71 | <a name="l00034"></a>00034 |
---|
72 | <a name="l00035"></a>00035 <span class="keyword">namespace </span>itpp |
---|
73 | <a name="l00036"></a>00036 { |
---|
74 | <a name="l00037"></a>00037 |
---|
75 | <a name="l00050"></a>00050 <span class="comment">//--------------------------------------------------------------</span> |
---|
76 | <a name="l00051"></a>00051 <span class="comment">// General PNM functions</span> |
---|
77 | <a name="l00059"></a>00059 <span class="comment"></span><span class="keywordtype">char</span> <a class="code" href="group__image.html#g22fec1fa9d791759c2c187fc3a9ecc08" title="Determines the type of a PNM file, based on magic numbers. The returned value is...">pnm_type</a>(<span class="keyword">const</span> std::string & filename); |
---|
78 | <a name="l00060"></a>00060 |
---|
79 | <a name="l00071"></a>00071 <span class="keywordtype">bool</span> <a class="code" href="group__image.html#gb9ebea2b2e8d082dd74a2db32c7818c5" title="Retrieve some information about an pnm file.">pnm_info</a>(<span class="keyword">const</span> std::string & filename, |
---|
80 | <a name="l00072"></a>00072 <span class="keywordtype">char</span> & <a class="code" href="group__image.html#g22fec1fa9d791759c2c187fc3a9ecc08" title="Determines the type of a PNM file, based on magic numbers. The returned value is...">pnm_type</a>, |
---|
81 | <a name="l00073"></a>00073 <span class="keywordtype">int</span> & width, |
---|
82 | <a name="l00074"></a>00074 <span class="keywordtype">int</span> & height, |
---|
83 | <a name="l00075"></a>00075 <span class="keywordtype">int</span> & max_val, |
---|
84 | <a name="l00076"></a>00076 std::string & comments); |
---|
85 | <a name="l00077"></a>00077 |
---|
86 | <a name="l00078"></a>00078 <span class="comment">//--------------------------------------------------------------</span> |
---|
87 | <a name="l00079"></a>00079 <span class="comment">// PGM related functions (gray images)</span> |
---|
88 | <a name="l00089"></a>00089 <span class="comment"></span><span class="keywordtype">bool</span> <a class="code" href="group__image.html#g20e0ba96ec2cc682950fe640fdc4d2f5" title="Read a pgm file of name filename and return the corresponding matrix of integers...">pgm_read</a>(<span class="keyword">const</span> std::string & filename, imat & m, |
---|
89 | <a name="l00090"></a>00090 std::string & comments); |
---|
90 | <a name="l00091"></a>00091 |
---|
91 | <a name="l00092"></a>00092 |
---|
92 | <a name="l00103"></a>00103 <span class="keywordtype">bool</span> <a class="code" href="group__image.html#g20e0ba96ec2cc682950fe640fdc4d2f5" title="Read a pgm file of name filename and return the corresponding matrix of integers...">pgm_read</a>(<span class="keyword">const</span> std::string & filename, imat &m, |
---|
93 | <a name="l00104"></a>00104 <span class="keywordtype">int</span> r1, <span class="keywordtype">int</span> r2, <span class="keywordtype">int</span> c1, <span class="keywordtype">int</span> c2); |
---|
94 | <a name="l00105"></a>00105 |
---|
95 | <a name="l00106"></a>00106 |
---|
96 | <a name="l00114"></a>00114 imat <a class="code" href="group__image.html#g20e0ba96ec2cc682950fe640fdc4d2f5" title="Read a pgm file of name filename and return the corresponding matrix of integers...">pgm_read</a>(<span class="keyword">const</span> std::string & filename); |
---|
97 | <a name="l00115"></a>00115 |
---|
98 | <a name="l00116"></a>00116 |
---|
99 | <a name="l00126"></a>00126 <span class="keywordtype">bool</span> <a class="code" href="group__image.html#g9389ba285569485b8a23c1ec5fb829fd" title="Create an image file from the matrix of integer.">pgm_write</a>(<span class="keyword">const</span> std::string & filename, |
---|
100 | <a name="l00127"></a>00127 <span class="keyword">const</span> imat &m, |
---|
101 | <a name="l00128"></a>00128 <span class="keyword">const</span> std::string & comments = <span class="stringliteral">"Generated by IT++ (http://itpp.sourceforge.net)"</span>); |
---|
102 | <a name="l00129"></a>00129 |
---|
103 | <a name="l00130"></a>00130 |
---|
104 | <a name="l00131"></a>00131 <span class="comment">//--------------------------------------------------------------</span> |
---|
105 | <a name="l00132"></a>00132 <span class="comment">// PPM related functions (color images)</span> |
---|
106 | <a name="l00145"></a>00145 <span class="comment"></span><span class="keywordtype">bool</span> <a class="code" href="group__image.html#g1e74677f86754640c72b49669c6480ea" title="Read a part of the pixmap into the matrix m. The parameters r1, r2, c1 and c2 are...">ppm_read</a>(<span class="keyword">const</span> std::string & filename, |
---|
107 | <a name="l00146"></a>00146 imat &r, imat &g, imat &b, |
---|
108 | <a name="l00147"></a>00147 std::string & comments); |
---|
109 | <a name="l00148"></a>00148 |
---|
110 | <a name="l00149"></a>00149 |
---|
111 | <a name="l00158"></a>00158 <span class="keywordtype">bool</span> <a class="code" href="group__image.html#g1e74677f86754640c72b49669c6480ea" title="Read a part of the pixmap into the matrix m. The parameters r1, r2, c1 and c2 are...">ppm_read</a>(<span class="keyword">const</span> std::string & filename, |
---|
112 | <a name="l00159"></a>00159 imat &r, imat &g, imat &b); |
---|
113 | <a name="l00160"></a>00160 |
---|
114 | <a name="l00161"></a>00161 |
---|
115 | <a name="l00169"></a>00169 <span class="keywordtype">bool</span> <a class="code" href="group__image.html#g1e74677f86754640c72b49669c6480ea" title="Read a part of the pixmap into the matrix m. The parameters r1, r2, c1 and c2 are...">ppm_read</a>(<span class="keyword">const</span> std::string & filename, |
---|
116 | <a name="l00170"></a>00170 imat &r, imat &g, imat &b, |
---|
117 | <a name="l00171"></a>00171 <span class="keywordtype">int</span> r1, <span class="keywordtype">int</span> r2, <span class="keywordtype">int</span> c1, <span class="keywordtype">int</span> c2); |
---|
118 | <a name="l00172"></a>00172 |
---|
119 | <a name="l00184"></a>00184 <span class="keywordtype">bool</span> <a class="code" href="group__image.html#g9141ce9dacd0149ec89fa1977e13a206" title="Write the matrix m as a pixmap.">ppm_write</a>(<span class="keyword">const</span> std::string & filename, |
---|
120 | <a name="l00185"></a>00185 <span class="keyword">const</span> imat &r, |
---|
121 | <a name="l00186"></a>00186 <span class="keyword">const</span> imat &g, |
---|
122 | <a name="l00187"></a>00187 <span class="keyword">const</span> imat &b, |
---|
123 | <a name="l00188"></a>00188 <span class="keyword">const</span> std::string & comments = <span class="stringliteral">"Generated by IT++ (http://itpp.sourceforge.net)"</span>, |
---|
124 | <a name="l00189"></a>00189 <span class="keywordtype">int</span> max_val = 255); |
---|
125 | <a name="l00190"></a>00190 |
---|
126 | <a name="l00206"></a>00206 imat <a class="code" href="group__image.html#g8ac0e04623245c7edc308b76708b8f7b" title="Prepare a matrix of double to be writted as an image.">img_double2int</a>(<span class="keyword">const</span> mat & m, |
---|
127 | <a name="l00207"></a>00207 <span class="keywordtype">int</span> max_val = 255, |
---|
128 | <a name="l00208"></a>00208 <span class="keywordtype">double</span> double_min = 0 , |
---|
129 | <a name="l00209"></a>00209 <span class="keywordtype">double</span> double_max = 1); |
---|
130 | <a name="l00210"></a>00210 |
---|
131 | <a name="l00223"></a>00223 mat <a class="code" href="group__image.html#ga9d05f853b61b2d90323355b40362ed1" title="Return a matrix of double which is a scaled version of the input matrix m of integers...">img_int2double</a>(<span class="keyword">const</span> imat & m, |
---|
132 | <a name="l00224"></a>00224 <span class="keywordtype">int</span> max_val = 255, |
---|
133 | <a name="l00225"></a>00225 <span class="keywordtype">double</span> double_min = 0, |
---|
134 | <a name="l00226"></a>00226 <span class="keywordtype">double</span> double_max = 1); |
---|
135 | <a name="l00227"></a>00227 |
---|
136 | <a name="l00228"></a>00228 } <span class="comment">// namespace itpp</span> |
---|
137 | <a name="l00229"></a>00229 |
---|
138 | <a name="l00230"></a>00230 <span class="preprocessor">#endif // #ifndef PNM_H</span> |
---|
139 | </pre></div></div> |
---|
140 | <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jun 2 10:02:12 2009 for mixpp by |
---|
141 | <a href="http://www.doxygen.org/index.html"> |
---|
142 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address> |
---|
143 | </body> |
---|
144 | </html> |
---|