Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 4f45e7bdfd4a5ff17f5f8eaab90d017f > files > 431

albumshaper-2.1-6mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>AlbumShaper: blur.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>blur.h File Reference</h1>
<p>
<div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dynsection">
</div>

<p>
<a href="blur_8h_source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="blur_8h.html#e7be57816a66918a26e567655f4b8e1c">blurImage</a> (QImage &amp;image, float sigma)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="blur_8h.html#e42c06320d849e8fca2912fa5dd38eed">blurImage</a> (QImage &amp;image, float sigma, QPoint offset, QSize fullImageRes, QImage *edges, int *regions, int numRegions, bool targetEdges)</td></tr>

</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="e42c06320d849e8fca2912fa5dd38eed"></a><!-- doxytag: member="blur.h::blurImage" ref="e42c06320d849e8fca2912fa5dd38eed" args="(QImage &amp;image, float sigma, QPoint offset, QSize fullImageRes, QImage *edges, int *regions, int numRegions, bool targetEdges)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void blurImage           </td>
          <td>(</td>
          <td class="paramtype">QImage &amp;&nbsp;</td>
          <td class="paramname"> <em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>sigma</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QPoint&nbsp;</td>
          <td class="paramname"> <em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QSize&nbsp;</td>
          <td class="paramname"> <em>fullImageRes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QImage *&nbsp;</td>
          <td class="paramname"> <em>edges</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>regions</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>numRegions</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>targetEdges</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="blur_8cpp_source.html#l00101">101</a> of file <a class="el" href="blur_8cpp_source.html">blur.cpp</a>.</p>

<p>References <a class="el" href="blur_8cpp_source.html#l00204">blurBuffer()</a>, <a class="el" href="blur_8cpp_source.html#l00080">buffer</a>, <a class="el" href="blur_8cpp_source.html#l00082">colBuffer</a>, <a class="el" href="blur_8cpp_source.html#l00150">computeCoeffs()</a>, <a class="el" href="blur_8cpp_source.html#l00090">displayOffset</a>, <a class="el" href="blur_8cpp_source.html#l00087">edgeImage</a>, <a class="el" href="blur_8cpp_source.html#l00172">fillBuffer()</a>, <a class="el" href="blur_8cpp_source.html#l00091">fullRes</a>, <a class="el" href="blur_8cpp_source.html#l00079">height</a>, <a class="el" href="blur_8cpp_source.html#l00085">regionColBuffer</a>, <a class="el" href="blur_8cpp_source.html#l00089">regionCount</a>, <a class="el" href="blur_8cpp_source.html#l00088">regionMap</a>, <a class="el" href="blur_8cpp_source.html#l00084">regionRowBuffer</a>, <a class="el" href="blur_8cpp_source.html#l00527">resetImageData()</a>, <a class="el" href="blur_8cpp_source.html#l00081">rowBuffer</a>, and <a class="el" href="blur_8cpp_source.html#l00079">width</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00105"></a>00105 {
<a name="l00106"></a>00106   <a class="code" href="blur_8cpp.html#8bb23dbf5a4b8bb7e3e90e0567712bdd">edgeImage</a> = edges;
<a name="l00107"></a>00107   <a class="code" href="blur_8cpp.html#9752978c7e4bd6f4fbdedbce54b5776d">regionMap</a> = regions;
<a name="l00108"></a>00108   <a class="code" href="blur_8cpp.html#99011823ef56f33be976af30f313f132">regionCount</a> = numRegions;
<a name="l00109"></a>00109   <a class="code" href="blur_8cpp.html#b9f240ebcd7065350a7b041439db28ab">displayOffset</a> = offset;
<a name="l00110"></a>00110   <a class="code" href="blur_8cpp.html#b903d24dabd249aee4c0d5335f332d02">fullRes</a> = fullImageRes;
<a name="l00111"></a>00111   
<a name="l00112"></a>00112   <span class="comment">//compute blurring coeffecients</span>
<a name="l00113"></a>00113   <a class="code" href="blur_8cpp.html#05a2bdd9a08d923f1cbb51fb3c82e87a">computeCoeffs</a>(sigma);
<a name="l00114"></a>00114   
<a name="l00115"></a>00115   <span class="comment">//store image dimensions</span>
<a name="l00116"></a>00116   <a class="code" href="blur_8cpp.html#2474a5474cbff19523a51eb1de01cda4">width</a> = image.width();
<a name="l00117"></a>00117   <a class="code" href="blur_8cpp.html#d12fc34ce789bce6c8a05d8a17138534">height</a> = image.height();
<a name="l00118"></a>00118   
<a name="l00119"></a>00119   <span class="comment">//Construct float buffer that is the size of the image/</span>
<a name="l00120"></a>00120   <span class="comment">//In order to conserve memory process image three times, once for</span>
<a name="l00121"></a>00121   <span class="comment">//each color channel.</span>
<a name="l00122"></a>00122   <a class="code" href="blur_8cpp.html#fa761c0753ecc94346e155a39bd9ed9c">buffer</a> = <span class="keyword">new</span> <span class="keywordtype">float</span>[ <a class="code" href="blur_8cpp.html#2474a5474cbff19523a51eb1de01cda4">width</a> * <a class="code" href="blur_8cpp.html#d12fc34ce789bce6c8a05d8a17138534">height</a> ];
<a name="l00123"></a>00123 
<a name="l00124"></a>00124   <a class="code" href="blur_8cpp.html#89c34a2d7f884fa813593747fd9e4bdb">rowBuffer</a> = <span class="keyword">new</span> <span class="keywordtype">float</span>[<a class="code" href="blur_8cpp.html#2474a5474cbff19523a51eb1de01cda4">width</a>];
<a name="l00125"></a>00125   <a class="code" href="blur_8cpp.html#aec903fd4cc73f7ef5918cbe5ecfc1c1">colBuffer</a> = <span class="keyword">new</span> <span class="keywordtype">float</span>[<a class="code" href="blur_8cpp.html#d12fc34ce789bce6c8a05d8a17138534">height</a>];
<a name="l00126"></a>00126   
<a name="l00127"></a>00127   <a class="code" href="blur_8cpp.html#cf497bcaec224469d3e0906be03a438b">regionRowBuffer</a> = <span class="keyword">new</span> <span class="keywordtype">float</span>[<a class="code" href="blur_8cpp.html#2474a5474cbff19523a51eb1de01cda4">width</a> * numRegions];
<a name="l00128"></a>00128   <a class="code" href="blur_8cpp.html#2cce1ac8bdf75e631a3cc099d7444c7a">regionColBuffer</a> = <span class="keyword">new</span> <span class="keywordtype">float</span>[<a class="code" href="blur_8cpp.html#d12fc34ce789bce6c8a05d8a17138534">height</a> * numRegions];
<a name="l00129"></a>00129   
<a name="l00130"></a>00130   <span class="comment">//iterate over each color channel</span>
<a name="l00131"></a>00131   <span class="keywordtype">int</span> channel;
<a name="l00132"></a>00132   <span class="keywordflow">for</span>( channel = 0; channel &lt;=2; channel++)
<a name="l00133"></a>00133   {
<a name="l00134"></a>00134     <span class="comment">//copy color data into float buffer</span>
<a name="l00135"></a>00135     <a class="code" href="blur_8cpp.html#4f60299801c18dfeb6188d1905dc9753">fillBuffer</a>( image, channel );
<a name="l00136"></a>00136     
<a name="l00137"></a>00137     <span class="comment">//blur buffer data</span>
<a name="l00138"></a>00138     <a class="code" href="blur_8cpp.html#94205af164693648b9082eefcbb9cdbc">blurBuffer</a>();
<a name="l00139"></a>00139     
<a name="l00140"></a>00140     <span class="comment">//reset image data used blurred buffer</span>
<a name="l00141"></a>00141     <a class="code" href="blur_8cpp.html#7fbca6e5494a3008dd90ec0d6103bba0">resetImageData</a>(image, channel, targetEdges);
<a name="l00142"></a>00142   }
<a name="l00143"></a>00143   
<a name="l00144"></a>00144   <span class="comment">//delete buffer</span>
<a name="l00145"></a>00145   <span class="keyword">delete</span>[] <a class="code" href="blur_8cpp.html#fa761c0753ecc94346e155a39bd9ed9c">buffer</a>;
<a name="l00146"></a>00146   <span class="keyword">delete</span>[] <a class="code" href="blur_8cpp.html#89c34a2d7f884fa813593747fd9e4bdb">rowBuffer</a>;
<a name="l00147"></a>00147   <span class="keyword">delete</span>[] <a class="code" href="blur_8cpp.html#aec903fd4cc73f7ef5918cbe5ecfc1c1">colBuffer</a>;
<a name="l00148"></a>00148 }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="e7be57816a66918a26e567655f4b8e1c"></a><!-- doxytag: member="blur.h::blurImage" ref="e7be57816a66918a26e567655f4b8e1c" args="(QImage &amp;image, float sigma)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void blurImage           </td>
          <td>(</td>
          <td class="paramtype">QImage &amp;&nbsp;</td>
          <td class="paramname"> <em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&nbsp;</td>
          <td class="paramname"> <em>sigma</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>Definition at line <a class="el" href="blur_8cpp_source.html#l00094">94</a> of file <a class="el" href="blur_8cpp_source.html">blur.cpp</a>.</p>

<p>References <a class="el" href="blur_8cpp_source.html#l00094">blurImage()</a>.</p>

<p>Referenced by <a class="el" href="grainEditor_8cpp_source.html#l00262">GrainEditor::adjustImage()</a>, <a class="el" href="blur_8cpp_source.html#l00094">blurImage()</a>, <a class="el" href="edgeDetect_8cpp_source.html#l00859">EdgeDetect::constructEdgeImage()</a>, and <a class="el" href="sharpen_8cpp_source.html#l00092">sharpenImage()</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00095"></a>00095 {
<a name="l00096"></a>00096   <span class="comment">//supply dummy data for edges, notably NULL for the edge image pointer.</span>
<a name="l00097"></a>00097   <span class="comment">//other values have no effect</span>
<a name="l00098"></a>00098   <a class="code" href="blur_8cpp.html#e7be57816a66918a26e567655f4b8e1c">blurImage</a>( image, sigma, QPoint(0,0), image.size(), NULL, NULL, 0, false );
<a name="l00099"></a>00099 }
</pre></div>
<p>

</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun Aug 23 02:34:29 2009 for AlbumShaper by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
</body>
</html>