Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > ce1f17e7ec5e62f35dbe9f064c5f74d7 > files > 1175

libtpcimgio-devel-1.5.10-4.fc15.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>vol.h Source File</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.7.4 -->
<div id="top">
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="dir_a8d1f883face730575470ec1817ab013.html">include</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">vol.h</div>  </div>
</div>
<div class="contents">
<a href="vol_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/******************************************************************************</span>
<a name="l00002"></a>00002 <span class="comment">  Copyright (c)  2003,2004 by Turku PET Centre</span>
<a name="l00003"></a>00003 <span class="comment"></span>
<a name="l00004"></a>00004 <span class="comment">  vol.h - definitions for vol.c</span>
<a name="l00005"></a>00005 <span class="comment"></span>
<a name="l00006"></a>00006 <span class="comment">  Version:</span>
<a name="l00007"></a>00007 <span class="comment">  2003-12-18 Vesa Oikonen</span>
<a name="l00008"></a>00008 <span class="comment">    Added 3D structures VOL and SVOL and related functions.</span>
<a name="l00009"></a>00009 <span class="comment">  2004-01-29 VO</span>
<a name="l00010"></a>00010 <span class="comment">    Added functions vol2img() and svol2img.</span>
<a name="l00011"></a>00011 <span class="comment">  2004-08-23 VO</span>
<a name="l00012"></a>00012 <span class="comment">    Some Doxygen style comments.</span>
<a name="l00013"></a>00013 <span class="comment"></span>
<a name="l00014"></a>00014 <span class="comment"></span>
<a name="l00015"></a>00015 <span class="comment"></span>
<a name="l00016"></a>00016 <span class="comment">******************************************************************************/</span>
<a name="l00017"></a>00017 <span class="preprocessor">#ifndef _VOL_H</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define _VOL_H</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="comment">/*****************************************************************************/</span>
<a name="l00020"></a><a class="code" href="vol_8h.html#a489a4f8e50534af5cf3981b9ea273c37">00020</a> <span class="keywordtype">int</span> <a class="code" href="vol_8h.html#a489a4f8e50534af5cf3981b9ea273c37">VOL_TEST</a>;
<a name="l00021"></a>00021 <span class="comment">/*****************************************************************************/</span>
<a name="l00022"></a>00022 
<a name="l00023"></a>00023 <span class="comment">/*****************************************************************************/</span>
<a name="l00024"></a><a class="code" href="structVOL__PIXEL.html">00024</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00025"></a><a class="code" href="structVOL__PIXEL.html#a1d7bbcdb8aaddb38f9c6a5dd3d009958">00025</a>   <span class="keywordtype">int</span> <a class="code" href="structVOL__PIXEL.html#a1d7bbcdb8aaddb38f9c6a5dd3d009958">x</a>;  <span class="comment">/* [1..dimx] */</span>
<a name="l00026"></a><a class="code" href="structVOL__PIXEL.html#a87b52b4e7aa4824c3682eb1f29e9a0fc">00026</a>   <span class="keywordtype">int</span> <a class="code" href="structVOL__PIXEL.html#a87b52b4e7aa4824c3682eb1f29e9a0fc">y</a>;  <span class="comment">/* [1..dimy] */</span>
<a name="l00027"></a><a class="code" href="structVOL__PIXEL.html#a814205b30bea56837e9fee66368b73cd">00027</a>   <span class="keywordtype">int</span> <a class="code" href="structVOL__PIXEL.html#a814205b30bea56837e9fee66368b73cd">z</a>;  <span class="comment">/* [1..dimz] */</span>
<a name="l00028"></a>00028 } <a class="code" href="structVOL__PIXEL.html">VOL_PIXEL</a>;
<a name="l00029"></a><a class="code" href="structVOL__RANGE.html">00029</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00030"></a><a class="code" href="structVOL__RANGE.html#a1768f56d43613f8280438838e90bb7d7">00030</a>   <span class="keywordtype">int</span> x1, <a class="code" href="structVOL__RANGE.html#a1768f56d43613f8280438838e90bb7d7">x2</a>;  <span class="comment">/* [1..dimx] */</span>
<a name="l00031"></a><a class="code" href="structVOL__RANGE.html#a4e3cd17ed8dcd646ae6bd9872576b4e4">00031</a>   <span class="keywordtype">int</span> y1, <a class="code" href="structVOL__RANGE.html#a4e3cd17ed8dcd646ae6bd9872576b4e4">y2</a>;  <span class="comment">/* [1..dimy] */</span>
<a name="l00032"></a><a class="code" href="structVOL__RANGE.html#a8191b2018985003977741b0044b2ffa0">00032</a>   <span class="keywordtype">int</span> z1, <a class="code" href="structVOL__RANGE.html#a8191b2018985003977741b0044b2ffa0">z2</a>;  <span class="comment">/* [1..dimz] */</span>
<a name="l00033"></a>00033 } <a class="code" href="structVOL__RANGE.html">VOL_RANGE</a>;  
<a name="l00034"></a>00034 <span class="comment">/*****************************************************************************/</span>
<a name="l00035"></a>00035   
<a name="l00036"></a>00036 <span class="comment">/*****************************************************************************/</span>
<a name="l00037"></a>00037 <span class="comment">/*</span>
<a name="l00038"></a>00038 <span class="comment"> *  3D volume data structure - 4-byte float voxels</span>
<a name="l00039"></a>00039 <span class="comment"> */</span>
<a name="l00040"></a><a class="code" href="structVOL.html">00040</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00041"></a>00041 
<a name="l00043"></a><a class="code" href="structVOL.html#a16d55152891623fe116ef2fbdebbb65c">00043</a>   <span class="keywordtype">char</span> <a class="code" href="structVOL.html#a16d55152891623fe116ef2fbdebbb65c">status</a>;
<a name="l00045"></a><a class="code" href="structVOL.html#a840fbb016748dfaf23001947a3734e51">00045</a>   <span class="keywordtype">char</span> *<a class="code" href="structVOL.html#a840fbb016748dfaf23001947a3734e51">statmsg</a>;
<a name="l00047"></a><a class="code" href="structVOL.html#a50f67a13fbc89a4635b1956fe2806038">00047</a>   <span class="keywordtype">int</span> <a class="code" href="structVOL.html#a50f67a13fbc89a4635b1956fe2806038">orientation</a>;
<a name="l00049"></a><a class="code" href="structVOL.html#aac853149c1716ad931b2efd5a2f4fe6b">00049</a>   <span class="keywordtype">float</span> sizex, sizey, <a class="code" href="structVOL.html#aac853149c1716ad931b2efd5a2f4fe6b">sizez</a>;
<a name="l00051"></a><a class="code" href="structVOL.html#a68964cf738d37bfb0d3337bc3b79da1d">00051</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> <span class="keywordtype">int</span> dimx, dimy, <a class="code" href="structVOL.html#a68964cf738d37bfb0d3337bc3b79da1d">dimz</a>;
<a name="l00053"></a><a class="code" href="structVOL.html#a3bef2dbeba5aa3d953c494da7a8d5de4">00053</a>   <span class="keywordtype">float</span> *<a class="code" href="structVOL.html#a3bef2dbeba5aa3d953c494da7a8d5de4">_vxl</a>, *_col, **_row, ***_pln;
<a name="l00055"></a><a class="code" href="structVOL.html#a6b6568c99ed3ac9909c110f069f18565">00055</a>   <span class="keywordtype">float</span> ***v, ***plane, **row, *column, *<a class="code" href="structVOL.html#a6b6568c99ed3ac9909c110f069f18565">voxel</a>;
<a name="l00056"></a>00056 
<a name="l00057"></a>00057 } <a class="code" href="structVOL.html">VOL</a>;
<a name="l00058"></a>00058 <span class="comment">/*****************************************************************************/</span>
<a name="l00059"></a>00059 <span class="comment">/*</span>
<a name="l00060"></a>00060 <span class="comment"> *  3D volume data structure - 2-byte short int voxels</span>
<a name="l00061"></a>00061 <span class="comment"> */</span>
<a name="l00062"></a><a class="code" href="structSVOL.html">00062</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00063"></a>00063 
<a name="l00065"></a><a class="code" href="structSVOL.html#abab75c9bd9db9239446e4992b3306c4e">00065</a>   <span class="keywordtype">char</span> <a class="code" href="structSVOL.html#abab75c9bd9db9239446e4992b3306c4e">status</a>;
<a name="l00067"></a><a class="code" href="structSVOL.html#ac6e5d2b91b1f95a26830486f70192775">00067</a>   <span class="keywordtype">char</span> *<a class="code" href="structSVOL.html#ac6e5d2b91b1f95a26830486f70192775">statmsg</a>;
<a name="l00069"></a><a class="code" href="structSVOL.html#a29c52139a6e978f2b1c95b6e07be97c5">00069</a>   <span class="keywordtype">int</span> <a class="code" href="structSVOL.html#a29c52139a6e978f2b1c95b6e07be97c5">orientation</a>;
<a name="l00071"></a><a class="code" href="structSVOL.html#a685b7ab2ce3f0b3db66f4dbb56077ce4">00071</a>   <span class="keywordtype">float</span> sizex, sizey, <a class="code" href="structSVOL.html#a685b7ab2ce3f0b3db66f4dbb56077ce4">sizez</a>;
<a name="l00073"></a><a class="code" href="structSVOL.html#a26ab4c04267d695d52e0cf0d09b96319">00073</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> <span class="keywordtype">int</span> dimx, dimy, <a class="code" href="structSVOL.html#a26ab4c04267d695d52e0cf0d09b96319">dimz</a>;
<a name="l00075"></a><a class="code" href="structSVOL.html#ab9a127085156ad3668b35d405e257f5f">00075</a>   <span class="keywordtype">float</span> <a class="code" href="structSVOL.html#ab9a127085156ad3668b35d405e257f5f">scale_factor</a>;
<a name="l00077"></a><a class="code" href="structSVOL.html#a304a8e760c9b0cdca03773b418c73660">00077</a>   <span class="keywordtype">short</span> <span class="keywordtype">int</span> *<a class="code" href="structSVOL.html#a304a8e760c9b0cdca03773b418c73660">_vxl</a>, *_col, **_row, ***_pln;
<a name="l00079"></a><a class="code" href="structSVOL.html#a0f6e70cec2ed8845a20656fa85e0268c">00079</a>   <span class="keywordtype">short</span> <span class="keywordtype">int</span> ***v, ***plane, **row, *column, *<a class="code" href="structSVOL.html#a0f6e70cec2ed8845a20656fa85e0268c">voxel</a>;
<a name="l00080"></a>00080 
<a name="l00081"></a>00081 } <a class="code" href="structSVOL.html">SVOL</a>;
<a name="l00082"></a>00082 <span class="comment">/*****************************************************************************/</span>
<a name="l00083"></a>00083 
<a name="l00084"></a>00084 <span class="comment">/*****************************************************************************/</span>
<a name="l00085"></a>00085 <span class="comment">/*</span>
<a name="l00086"></a>00086 <span class="comment"> *  Function definitions</span>
<a name="l00087"></a>00087 <span class="comment"> */</span>
<a name="l00088"></a>00088 <span class="comment">/* 4-byte floats */</span>
<a name="l00089"></a>00089 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="vol_8c.html#a4fcf2277a539c9dd147676fcbb75ae6d">volInit</a>(<a class="code" href="structVOL.html">VOL</a> *vol);
<a name="l00090"></a>00090 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="vol_8c.html#ab4e7ca1b78280f9d5573bd8bc34ce899">volEmpty</a>(<a class="code" href="structVOL.html">VOL</a> *vol);
<a name="l00091"></a>00091 <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="vol_8c.html#a81ef356e4ce5640eab652ff90f0fb4d5">volAllocate</a>(<a class="code" href="structVOL.html">VOL</a> *vol, <span class="keywordtype">int</span> planes, <span class="keywordtype">int</span> rows, <span class="keywordtype">int</span> columns);
<a name="l00092"></a>00092 <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="vol_8c.html#ab8e38cb0c2f98d0b17604f62c8753727">img2vol</a>(<a class="code" href="structIMG.html">IMG</a> *img, <a class="code" href="structVOL.html">VOL</a> *vol, <span class="keywordtype">int</span> frame);
<a name="l00093"></a>00093 <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="vol_8c.html#ae7f549b3214d93ced7be00aba4c7bd62">vol2img</a>(<a class="code" href="structVOL.html">VOL</a> *vol, <a class="code" href="structIMG.html">IMG</a> *img, <span class="keywordtype">int</span> frame);
<a name="l00094"></a>00094 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="vol_8c.html#aa6177bbbeb99b94e46f944c788561e5e">volInfo</a>(<a class="code" href="structVOL.html">VOL</a> *vol, FILE *fp);
<a name="l00095"></a>00095 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="vol_8c.html#a254213af969bbc3b01b209f8f46a5742">volContents</a>(<a class="code" href="structVOL.html">VOL</a> *vol, <a class="code" href="structVOL__RANGE.html">VOL_RANGE</a> r, FILE *fp);
<a name="l00096"></a>00096 <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="vol_8c.html#a103ff5054657bc65dba9ac5987a694a6">volMax</a>(<a class="code" href="structVOL.html">VOL</a> *vol, <a class="code" href="structVOL__RANGE.html">VOL_RANGE</a> r, <a class="code" href="structVOL__PIXEL.html">VOL_PIXEL</a> *p, <span class="keywordtype">float</span> *maxv);
<a name="l00097"></a>00097 <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="vol_8c.html#ac3d6465823646c219a5bcb8b188a5206">volAvg</a>(<a class="code" href="structVOL.html">VOL</a> *vol, <a class="code" href="structVOL__RANGE.html">VOL_RANGE</a> r, <span class="keywordtype">float</span> *avg);
<a name="l00098"></a>00098 <span class="comment">/* 2-byte short ints */</span>
<a name="l00099"></a>00099 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="vol_8c.html#a24aa1af9ebf7dcdd60fddaa866001e84">svolInit</a>(<a class="code" href="structSVOL.html">SVOL</a> *svol);
<a name="l00100"></a>00100 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="vol_8c.html#a5786ad61a2571e7a22d9e3755c74f2e8">svolEmpty</a>(<a class="code" href="structSVOL.html">SVOL</a> *svol);
<a name="l00101"></a>00101 <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="vol_8c.html#a4a18e3bfe8bb42d1abe2eef27d6dfe51">svolAllocate</a>(<a class="code" href="structSVOL.html">SVOL</a> *svol, <span class="keywordtype">int</span> planes, <span class="keywordtype">int</span> rows, <span class="keywordtype">int</span> columns);
<a name="l00102"></a>00102 <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="vol_8c.html#abd08e7e43e4a4d75e14f9857d4a21453">img2svol</a>(<a class="code" href="structIMG.html">IMG</a> *img, <a class="code" href="structSVOL.html">SVOL</a> *svol, <span class="keywordtype">int</span> frame);
<a name="l00103"></a>00103 <span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="vol_8c.html#a7e337783e85d45dbbb1af9b96153d340">svol2img</a>(<a class="code" href="structSVOL.html">SVOL</a> *svol, <a class="code" href="structIMG.html">IMG</a> *img, <span class="keywordtype">int</span> frame);
<a name="l00104"></a>00104 <span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="vol_8c.html#ab6c8fe364e495214eb0273a4deac062d">svolInfo</a>(<a class="code" href="structSVOL.html">SVOL</a> *svol, FILE *fp);
<a name="l00105"></a>00105 <span class="comment">/*****************************************************************************/</span>
<a name="l00106"></a>00106 
<a name="l00107"></a>00107 <span class="comment">/*****************************************************************************/</span>
<a name="l00108"></a>00108 <span class="preprocessor">#endif </span><span class="comment">/* _VOL_H */</span>
<a name="l00109"></a>00109 
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Mon Aug 8 2011 by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>