Sophie

Sophie

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

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>ecat7ml.c 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.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>
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">ecat7ml.c File Reference</div>  </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;stdio.h&gt;</code><br/>
<code>#include &lt;stdlib.h&gt;</code><br/>
<code>#include &lt;math.h&gt;</code><br/>
<code>#include &lt;ctype.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &lt;unistd.h&gt;</code><br/>
<code>#include &lt;time.h&gt;</code><br/>
<code>#include &lt;swap.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="img_8h_source.html">include/img.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="ecat7_8h_source.html">include/ecat7.h</a>&quot;</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for ecat7ml.c:</div>
<div class="dyncontent">
<div class="center"><img src="ecat7ml_8c__incl.png" border="0" usemap="#ecat7ml_8c" alt=""/></div>
<map name="ecat7ml_8c" id="ecat7ml_8c">
<area shape="rect" id="node19" href="img_8h.html" title="include/img.h" alt="" coords="701,83,800,112"/><area shape="rect" id="node23" href="ecat7_8h.html" title="include/ecat7.h" alt="" coords="824,83,933,112"/></map>
</div>
</div>
<p><a href="ecat7ml_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ecat7ml_8c.html#a0826a19efcf80e53e28473189d07949e">ecat7InitMatlist</a> (<a class="el" href="structECAT7__MATRIXLIST.html">ECAT7_MATRIXLIST</a> *mlist)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ecat7ml_8c.html#a570804c248c25f15c172568043a8f0a5">ecat7EmptyMatlist</a> (<a class="el" href="structECAT7__MATRIXLIST.html">ECAT7_MATRIXLIST</a> *mlist)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ecat7ml_8c.html#a0304c6b68597ab6fe00bb35a44c19dcb">ecat7ReadMatlist</a> (FILE *fp, <a class="el" href="structECAT7__MATRIXLIST.html">ECAT7_MATRIXLIST</a> *ml)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ecat7ml_8c.html#ad50b3297af530071a5f115c14f40c701">ecat7PrintMatlist</a> (<a class="el" href="structECAT7__MATRIXLIST.html">ECAT7_MATRIXLIST</a> *ml)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ecat7ml_8c.html#a8f97f2b4eb5bea323738dc3687e773b8">ecat7EnterMatrix</a> (FILE *fp, int matrix_id, int block_nr)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ecat7ml_8c.html#acad3263ebf24cf2e10d7c43491810481">ecat7_val_to_id</a> (int frame, int plane, int gate, int data, int bed)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ecat7ml_8c.html#a4cf0dc3b586a1c62d177f21b5e8e2328">ecat7_id_to_val</a> (int matrix_id, <a class="el" href="structECAT7__Matval.html">ECAT7_Matval</a> *matval)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ecat7ml_8c.html#a4c5fe6841c5c02db200f5aa92d652014">ecat7SortMatlistByPlane</a> (<a class="el" href="structECAT7__MATRIXLIST.html">ECAT7_MATRIXLIST</a> *ml)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ecat7ml_8c.html#a1005274d31eb31ae483b5740dae6af1e">ecat7SortMatlistByFrame</a> (<a class="el" href="structECAT7__MATRIXLIST.html">ECAT7_MATRIXLIST</a> *ml)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ecat7ml_8c.html#ae366d8f1a8202f053debfdbe2a8c6be7">ecat7CheckMatlist</a> (<a class="el" href="structECAT7__MATRIXLIST.html">ECAT7_MATRIXLIST</a> *ml)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ecat7ml_8c.html#adcf9c5b0fb57d5b49ccb8b38c6e3d987">ecat7DeleteLateFrames</a> (<a class="el" href="structECAT7__MATRIXLIST.html">ECAT7_MATRIXLIST</a> *ml, int frame_nr)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ecat7ml_8c.html#a233c8c21f8ef8975c4cf486c6137a53d">ecat7GetPlaneAndFrameNr</a> (<a class="el" href="structECAT7__MATRIXLIST.html">ECAT7_MATRIXLIST</a> *mlist, <a class="el" href="structecat7__mainheader.html">ECAT7_mainheader</a> *h, int *plane_nr, int *frame_nr)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ecat7ml_8c.html#a24438ca2c1691deba0e4101d8fadb1c8">ecat7GetMatrixBlockSize</a> (<a class="el" href="structECAT7__MATRIXLIST.html">ECAT7_MATRIXLIST</a> *mlist, int *blk_nr)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ecat7ml_8c.html#a4eeccd90124f09c4c68c31a4c9c05b78">ecat7GetNums</a> (<a class="el" href="structECAT7__MATRIXLIST.html">ECAT7_MATRIXLIST</a> *ml, <a class="el" href="structecat7__mainheader.html">ECAT7_mainheader</a> *mh, FILE *fp, short int *num_planes, short int *num_frames, short int *num_gates, short int *num_bed_pos)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ecat7ml_8c.html#ad061c624a2cc95af6b54e6fdebdfc64d">ecat7GatherMatlist</a> (<a class="el" href="structECAT7__MATRIXLIST.html">ECAT7_MATRIXLIST</a> *ml, short int do_planes, short int do_frames, short int do_gates, short int do_beds)</td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a4cf0dc3b586a1c62d177f21b5e8e2328"></a><!-- doxytag: member="ecat7ml.c::ecat7_id_to_val" ref="a4cf0dc3b586a1c62d177f21b5e8e2328" args="(int matrix_id, ECAT7_Matval *matval)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ecat7_id_to_val </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>matrix_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structECAT7__Matval.html">ECAT7_Matval</a> *&#160;</td>
          <td class="paramname"><em>matval</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Conversion of matrix identifier to numerical values</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">matrix_id</td><td>matrix identifire coding </td></tr>
    <tr><td class="paramname">matval</td><td>matrix values structure </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="ecat7ml_8c_source.html#l00299">299</a> of file <a class="el" href="ecat7ml_8c_source.html">ecat7ml.c</a>.</p>

<p>References <a class="el" href="ecat7_8h_source.html#l00617">ECAT7_Matval::bed</a>, <a class="el" href="ecat7_8h_source.html#l00617">ECAT7_Matval::data</a>, <a class="el" href="ecat7_8h_source.html#l00617">ECAT7_Matval::frame</a>, <a class="el" href="ecat7_8h_source.html#l00617">ECAT7_Matval::gate</a>, and <a class="el" href="ecat7_8h_source.html#l00617">ECAT7_Matval::plane</a>.</p>

<p>Referenced by <a class="el" href="ecat7ml_8c_source.html#l00383">ecat7DeleteLateFrames()</a>, <a class="el" href="ecat7ml_8c_source.html#l00572">ecat7GatherMatlist()</a>, <a class="el" href="ecat7ml_8c_source.html#l00489">ecat7GetNums()</a>, <a class="el" href="ecat7ml_8c_source.html#l00409">ecat7GetPlaneAndFrameNr()</a>, <a class="el" href="ecat7ml_8c_source.html#l00149">ecat7PrintMatlist()</a>, <a class="el" href="ecat7p_8c_source.html#l00532">ecat7PrintSubheader()</a>, <a class="el" href="ecat7ml_8c_source.html#l00340">ecat7SortMatlistByFrame()</a>, <a class="el" href="ecat7ml_8c_source.html#l00314">ecat7SortMatlistByPlane()</a>, <a class="el" href="img__e7_8c_source.html#l00083">imgReadEcat7()</a>, and <a class="el" href="img__e7_8c_source.html#l01051">imgReadEcat7Frame()</a>.</p>

</div>
</div>
<a class="anchor" id="acad3263ebf24cf2e10d7c43491810481"></a><!-- doxytag: member="ecat7ml.c::ecat7_val_to_id" ref="acad3263ebf24cf2e10d7c43491810481" args="(int frame, int plane, int gate, int data, int bed)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ecat7_val_to_id </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>frame</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>plane</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>gate</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>bed</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the matrix identifier.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">frame</td><td>frame number [0..65536] </td></tr>
    <tr><td class="paramname">plane</td><td>plane number [0..65536] </td></tr>
    <tr><td class="paramname">gate</td><td>gate number [0..64] </td></tr>
    <tr><td class="paramname">data</td><td>data [0..1] </td></tr>
    <tr><td class="paramname">bed</td><td>bed position [0..16] </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>matrix identifier coding </dd></dl>

<p>Definition at line <a class="el" href="ecat7ml_8c_source.html#l00282">282</a> of file <a class="el" href="ecat7ml_8c_source.html">ecat7ml.c</a>.</p>

<p>Referenced by <a class="el" href="ecat7ml_8c_source.html#l00572">ecat7GatherMatlist()</a>, <a class="el" href="img__e7_8c_source.html#l00498">imgWrite2DEcat7()</a>, <a class="el" href="img__e7_8c_source.html#l00380">imgWriteEcat7()</a>, <a class="el" href="img__e7_8c_source.html#l01222">imgWriteEcat7Frame()</a>, and <a class="el" href="img__e7_8c_source.html#l00606">imgWritePolarmap()</a>.</p>

</div>
</div>
<a class="anchor" id="ae366d8f1a8202f053debfdbe2a8c6be7"></a><!-- doxytag: member="ecat7ml.c::ecat7CheckMatlist" ref="ae366d8f1a8202f053debfdbe2a8c6be7" args="(ECAT7_MATRIXLIST *ml)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ecat7CheckMatlist </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structECAT7__MATRIXLIST.html">ECAT7_MATRIXLIST</a> *&#160;</td>
          <td class="paramname"><em>ml</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Checks that all matrixlist entries have read/write status.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">ml</td><td>checked matrix list </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 if ok, or 1 if an entry is marked as deleted or unfinished </dd></dl>

<p>Definition at line <a class="el" href="ecat7ml_8c_source.html#l00366">366</a> of file <a class="el" href="ecat7ml_8c_source.html">ecat7ml.c</a>.</p>

<p>References <a class="el" href="ecat7_8h_source.html#l00614">ECAT7_MATRIXLIST::matdir</a>, <a class="el" href="ecat7_8h_source.html#l00612">ECAT7_MATRIXLIST::matrixNr</a>, and <a class="el" href="ecat7_8h_source.html#l00609">ECAT7_MatDir::status</a>.</p>

<p>Referenced by <a class="el" href="img__e7_8c_source.html#l00083">imgReadEcat7()</a>, <a class="el" href="img__e7_8c_source.html#l01051">imgReadEcat7Frame()</a>, and <a class="el" href="img__e7_8c_source.html#l00827">imgReadEcat7Header()</a>.</p>

</div>
</div>
<a class="anchor" id="adcf9c5b0fb57d5b49ccb8b38c6e3d987"></a><!-- doxytag: member="ecat7ml.c::ecat7DeleteLateFrames" ref="adcf9c5b0fb57d5b49ccb8b38c6e3d987" args="(ECAT7_MATRIXLIST *ml, int frame_nr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ecat7DeleteLateFrames </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structECAT7__MATRIXLIST.html">ECAT7_MATRIXLIST</a> *&#160;</td>
          <td class="paramname"><em>ml</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>frame_nr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Mark deleted the frames after the specified frame number.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">ml</td><td>target matrix list </td></tr>
    <tr><td class="paramname">frame_nr</td><td>first index to be marked as deleted [1..number of frames] </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Returns the number of deleted matrices. </dd></dl>

<p>Definition at line <a class="el" href="ecat7ml_8c_source.html#l00383">383</a> of file <a class="el" href="ecat7ml_8c_source.html">ecat7ml.c</a>.</p>

<p>References <a class="el" href="ecat7ml_8c_source.html#l00299">ecat7_id_to_val()</a>, <a class="el" href="ecat7_8h_source.html#l00617">ECAT7_Matval::frame</a>, <a class="el" href="ecat7_8h_source.html#l00606">ECAT7_MatDir::id</a>, <a class="el" href="ecat7_8h_source.html#l00614">ECAT7_MATRIXLIST::matdir</a>, <a class="el" href="ecat7_8h_source.html#l00612">ECAT7_MATRIXLIST::matrixNr</a>, and <a class="el" href="ecat7_8h_source.html#l00609">ECAT7_MatDir::status</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ecat7ml_8c_adcf9c5b0fb57d5b49ccb8b38c6e3d987_cgraph.png" border="0" usemap="#ecat7ml_8c_adcf9c5b0fb57d5b49ccb8b38c6e3d987_cgraph" alt=""/></div>
<map name="ecat7ml_8c_adcf9c5b0fb57d5b49ccb8b38c6e3d987_cgraph" id="ecat7ml_8c_adcf9c5b0fb57d5b49ccb8b38c6e3d987_cgraph">
<area shape="rect" id="node3" href="ecat7ml_8c.html#a4cf0dc3b586a1c62d177f21b5e8e2328" title="ecat7_id_to_val" alt="" coords="217,5,329,35"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a570804c248c25f15c172568043a8f0a5"></a><!-- doxytag: member="ecat7ml.c::ecat7EmptyMatlist" ref="a570804c248c25f15c172568043a8f0a5" args="(ECAT7_MATRIXLIST *mlist)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ecat7EmptyMatlist </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structECAT7__MATRIXLIST.html">ECAT7_MATRIXLIST</a> *&#160;</td>
          <td class="paramname"><em>mlist</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Free memory allocated for ECAT matrix list.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">mlist</td><td>target matrix list that has allocated memory </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="ecat7ml_8c_source.html#l00070">70</a> of file <a class="el" href="ecat7ml_8c_source.html">ecat7ml.c</a>.</p>

<p>References <a class="el" href="ecat7_8h_source.html#l00614">ECAT7_MATRIXLIST::matdir</a>, <a class="el" href="ecat7_8h_source.html#l00612">ECAT7_MATRIXLIST::matrixNr</a>, and <a class="el" href="ecat7_8h_source.html#l00613">ECAT7_MATRIXLIST::matrixSpace</a>.</p>

<p>Referenced by <a class="el" href="ecat7p_8c_source.html#l00532">ecat7PrintSubheader()</a>, <a class="el" href="ecat7ml_8c_source.html#l00086">ecat7ReadMatlist()</a>, <a class="el" href="img__e7_8c_source.html#l00083">imgReadEcat7()</a>, <a class="el" href="img__e7_8c_source.html#l01051">imgReadEcat7Frame()</a>, and <a class="el" href="img__e7_8c_source.html#l00827">imgReadEcat7Header()</a>.</p>

</div>
</div>
<a class="anchor" id="a8f97f2b4eb5bea323738dc3687e773b8"></a><!-- doxytag: member="ecat7ml.c::ecat7EnterMatrix" ref="a8f97f2b4eb5bea323738dc3687e773b8" args="(FILE *fp, int matrix_id, int block_nr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ecat7EnterMatrix </td>
          <td>(</td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>fp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>matrix_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>block_nr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Prepare matrix list for additional matrix data and return block number for matrix header. Directory records are written in big endian byte order. Set block_nr to the number of data blocks + (nr of header blocks - 1)</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">fp</td><td>file pointer </td></tr>
    <tr><td class="paramname">matrix_id</td><td>matrix identifier coding </td></tr>
    <tr><td class="paramname">block_nr</td><td>matrix number [1..number of matrixes] </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>returns the block number for matrix header, -1 if invalid input, -2 if first directory block is not found, -3 if failed to read first block, -9 if other directory block is not found, -10 if failed to read other block, -11 if place for new directory block is not found, -12 if failed clear new block, -15 if place for new directory block is not found, -16 if failed to write into new block </dd></dl>

<p>Definition at line <a class="el" href="ecat7ml_8c_source.html#l00184">184</a> of file <a class="el" href="ecat7ml_8c_source.html">ecat7ml.c</a>.</p>

<p>References <a class="el" href="ecat7_8h_source.html#l00101">ECAT7_TEST</a>, <a class="el" href="ecat63_8h_source.html#l00027">MatBLKSIZE</a>, and <a class="el" href="ecat63_8h_source.html#l00028">MatFirstDirBlk</a>.</p>

<p>Referenced by <a class="el" href="ecat7w_8c_source.html#l00767">ecat7Write2DScanMatrix()</a>, <a class="el" href="ecat7w_8c_source.html#l00682">ecat7WriteImageMatrix()</a>, <a class="el" href="ecat7w_8c_source.html#l00939">ecat7WritePolarmapMatrix()</a>, and <a class="el" href="ecat7w_8c_source.html#l00852">ecat7WriteScanMatrix()</a>.</p>

</div>
</div>
<a class="anchor" id="ad061c624a2cc95af6b54e6fdebdfc64d"></a><!-- doxytag: member="ecat7ml.c::ecat7GatherMatlist" ref="ad061c624a2cc95af6b54e6fdebdfc64d" args="(ECAT7_MATRIXLIST *ml, short int do_planes, short int do_frames, short int do_gates, short int do_beds)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ecat7GatherMatlist </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structECAT7__MATRIXLIST.html">ECAT7_MATRIXLIST</a> *&#160;</td>
          <td class="paramname"><em>ml</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short int&#160;</td>
          <td class="paramname"><em>do_planes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short int&#160;</td>
          <td class="paramname"><em>do_frames</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short int&#160;</td>
          <td class="paramname"><em>do_gates</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short int&#160;</td>
          <td class="paramname"><em>do_beds</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Matrix numbers in ECAT 7 matrix list are edited, when necessary, so that plane, frame, gate and/or bed numbers are continuous, starting from one (planes, frames and gates) or from zero (beds). List order is not changed.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">ml</td><td>ECAT 7 matrix list, where the matrix numbers will be edited </td></tr>
    <tr><td class="paramname">do_planes</td><td>Plane numbers are gathered together (1) or not (0) </td></tr>
    <tr><td class="paramname">do_frames</td><td>Frame numbers are gathered together (1) or not (0) </td></tr>
    <tr><td class="paramname">do_gates</td><td>Gate numbers are gathered together (1) or not (0) </td></tr>
    <tr><td class="paramname">do_beds</td><td>Bed numbers are gathered together (1) or not (0) </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 if successful, 1 if invalid input, 3 failed to allocate memory </dd></dl>

<p>Definition at line <a class="el" href="ecat7ml_8c_source.html#l00572">572</a> of file <a class="el" href="ecat7ml_8c_source.html">ecat7ml.c</a>.</p>

<p>References <a class="el" href="ecat7_8h_source.html#l00617">ECAT7_Matval::bed</a>, <a class="el" href="ecat7ml_8c_source.html#l00299">ecat7_id_to_val()</a>, <a class="el" href="ecat7ml_8c_source.html#l00282">ecat7_val_to_id()</a>, <a class="el" href="ecat7_8h_source.html#l00617">ECAT7_Matval::frame</a>, <a class="el" href="ecat7_8h_source.html#l00617">ECAT7_Matval::gate</a>, <a class="el" href="ecat7_8h_source.html#l00606">ECAT7_MatDir::id</a>, <a class="el" href="ecat7_8h_source.html#l00614">ECAT7_MATRIXLIST::matdir</a>, <a class="el" href="ecat7_8h_source.html#l00612">ECAT7_MATRIXLIST::matrixNr</a>, and <a class="el" href="ecat7_8h_source.html#l00617">ECAT7_Matval::plane</a>.</p>

<p>Referenced by <a class="el" href="img__e7_8c_source.html#l01051">imgReadEcat7Frame()</a>, and <a class="el" href="img__e7_8c_source.html#l00827">imgReadEcat7Header()</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ecat7ml_8c_ad061c624a2cc95af6b54e6fdebdfc64d_cgraph.png" border="0" usemap="#ecat7ml_8c_ad061c624a2cc95af6b54e6fdebdfc64d_cgraph" alt=""/></div>
<map name="ecat7ml_8c_ad061c624a2cc95af6b54e6fdebdfc64d_cgraph" id="ecat7ml_8c_ad061c624a2cc95af6b54e6fdebdfc64d_cgraph">
<area shape="rect" id="node3" href="ecat7ml_8c.html#a4cf0dc3b586a1c62d177f21b5e8e2328" title="ecat7_id_to_val" alt="" coords="188,5,300,35"/><area shape="rect" id="node5" href="ecat7ml_8c.html#acad3263ebf24cf2e10d7c43491810481" title="ecat7_val_to_id" alt="" coords="188,59,300,88"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a24438ca2c1691deba0e4101d8fadb1c8"></a><!-- doxytag: member="ecat7ml.c::ecat7GetMatrixBlockSize" ref="a24438ca2c1691deba0e4101d8fadb1c8" args="(ECAT7_MATRIXLIST *mlist, int *blk_nr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ecat7GetMatrixBlockSize </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structECAT7__MATRIXLIST.html">ECAT7_MATRIXLIST</a> *&#160;</td>
          <td class="paramname"><em>mlist</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>blk_nr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Calculate the size of one data matrix in ECAT7 file matrix list, and check that the size is same in all matrices.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">mlist</td><td>Ecat7 matrix list; note that this list is here sorted by planes </td></tr>
    <tr><td class="paramname">blk_nr</td><td>number of blocks will be put here; NULL if not needed </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>errstatus, which is STATUS_OK (0) when call was successful, and &gt;0 in case of an error. </dd></dl>

<p>Definition at line <a class="el" href="ecat7ml_8c_source.html#l00455">455</a> of file <a class="el" href="ecat7ml_8c_source.html">ecat7ml.c</a>.</p>

<p>References <a class="el" href="ecat7_8h_source.html#l00608">ECAT7_MatDir::endblk</a>, <a class="el" href="ecat7_8h_source.html#l00614">ECAT7_MATRIXLIST::matdir</a>, <a class="el" href="ecat7_8h_source.html#l00612">ECAT7_MATRIXLIST::matrixNr</a>, <a class="el" href="img_8h_source.html#l00118">STATUS_FAULT</a>, <a class="el" href="img_8h_source.html#l00118">STATUS_OK</a>, <a class="el" href="img_8h_source.html#l00120">STATUS_VARMATSIZE</a>, and <a class="el" href="ecat7_8h_source.html#l00607">ECAT7_MatDir::strtblk</a>.</p>

<p>Referenced by <a class="el" href="img__e7_8c_source.html#l00827">imgReadEcat7Header()</a>.</p>

</div>
</div>
<a class="anchor" id="a4eeccd90124f09c4c68c31a4c9c05b78"></a><!-- doxytag: member="ecat7ml.c::ecat7GetNums" ref="a4eeccd90124f09c4c68c31a4c9c05b78" args="(ECAT7_MATRIXLIST *ml, ECAT7_mainheader *mh, FILE *fp, short int *num_planes, short int *num_frames, short int *num_gates, short int *num_bed_pos)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ecat7GetNums </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structECAT7__MATRIXLIST.html">ECAT7_MATRIXLIST</a> *&#160;</td>
          <td class="paramname"><em>ml</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structecat7__mainheader.html">ECAT7_mainheader</a> *&#160;</td>
          <td class="paramname"><em>mh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>fp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short int *&#160;</td>
          <td class="paramname"><em>num_planes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short int *&#160;</td>
          <td class="paramname"><em>num_frames</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short int *&#160;</td>
          <td class="paramname"><em>num_gates</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short int *&#160;</td>
          <td class="paramname"><em>num_bed_pos</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Read the maximum plane, frame, gate and bed number from matrixlist. In case of 3D formats, num_planes is checked from the first subheader.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">ml</td><td>Pointer to matrixlist </td></tr>
    <tr><td class="paramname">mh</td><td>Pointer to mainheader </td></tr>
    <tr><td class="paramname">fp</td><td>File pointer to ECAT7 file opened in binary mode </td></tr>
    <tr><td class="paramname">num_planes</td><td>num_planes will be put here; NULL if not needed to be read </td></tr>
    <tr><td class="paramname">num_frames</td><td>num_planes will be put here; NULL if not needed to be read </td></tr>
    <tr><td class="paramname">num_gates</td><td>num_planes will be put here; NULL if not needed to be read </td></tr>
    <tr><td class="paramname">num_bed_pos</td><td>num_planes will be put here; NULL if not needed to be read </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 if successful, 1 if invalid input, 2 if no matrixes, 3 failed to allocate memory, 5 if failed to read image/scan header information </dd></dl>

<p>Definition at line <a class="el" href="ecat7ml_8c_source.html#l00489">489</a> of file <a class="el" href="ecat7ml_8c_source.html">ecat7ml.c</a>.</p>

<p>References <a class="el" href="ecat7_8h_source.html#l00617">ECAT7_Matval::bed</a>, <a class="el" href="ecat7_8h_source.html#l00078">ECAT7_3DSCAN</a>, <a class="el" href="ecat7_8h_source.html#l00079">ECAT7_3DSCAN8</a>, <a class="el" href="ecat7_8h_source.html#l00081">ECAT7_3DSCANFIT</a>, <a class="el" href="ecat7ml_8c_source.html#l00299">ecat7_id_to_val()</a>, <a class="el" href="ecat7_8h_source.html#l00074">ECAT7_VOLUME16</a>, <a class="el" href="ecat7_8h_source.html#l00073">ECAT7_VOLUME8</a>, <a class="el" href="ecat7r_8c_source.html#l00177">ecat7ReadImageheader()</a>, <a class="el" href="ecat7r_8c_source.html#l00424">ecat7ReadScanheader()</a>, <a class="el" href="ecat7_8h_source.html#l00113">ecat7_mainheader::file_type</a>, <a class="el" href="ecat7_8h_source.html#l00617">ECAT7_Matval::frame</a>, <a class="el" href="ecat7_8h_source.html#l00617">ECAT7_Matval::gate</a>, <a class="el" href="ecat7_8h_source.html#l00606">ECAT7_MatDir::id</a>, <a class="el" href="ecat7_8h_source.html#l00614">ECAT7_MATRIXLIST::matdir</a>, <a class="el" href="ecat7_8h_source.html#l00612">ECAT7_MATRIXLIST::matrixNr</a>, <a class="el" href="ecat7_8h_source.html#l00232">ecat7_imageheader::num_dimensions</a>, <a class="el" href="ecat7_8h_source.html#l00365">ecat7_scanheader::num_z_elements</a>, <a class="el" href="ecat7_8h_source.html#l00617">ECAT7_Matval::plane</a>, <a class="el" href="ecat7_8h_source.html#l00607">ECAT7_MatDir::strtblk</a>, and <a class="el" href="ecat7_8h_source.html#l00238">ecat7_imageheader::z_dimension</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ecat7ml_8c_a4eeccd90124f09c4c68c31a4c9c05b78_cgraph.png" border="0" usemap="#ecat7ml_8c_a4eeccd90124f09c4c68c31a4c9c05b78_cgraph" alt=""/></div>
<map name="ecat7ml_8c_a4eeccd90124f09c4c68c31a4c9c05b78_cgraph" id="ecat7ml_8c_a4eeccd90124f09c4c68c31a4c9c05b78_cgraph">
<area shape="rect" id="node3" href="ecat7ml_8c.html#a4cf0dc3b586a1c62d177f21b5e8e2328" title="ecat7_id_to_val" alt="" coords="189,5,301,35"/><area shape="rect" id="node5" href="ecat7r_8c.html#ac96bedc17610a5a05d95ce7742d44b5c" title="ecat7ReadImageheader" alt="" coords="165,59,325,88"/><area shape="rect" id="node7" href="ecat7r_8c.html#a37414b52ef395686b6a81d6229d13143" title="ecat7ReadScanheader" alt="" coords="168,112,323,141"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a233c8c21f8ef8975c4cf486c6137a53d"></a><!-- doxytag: member="ecat7ml.c::ecat7GetPlaneAndFrameNr" ref="a233c8c21f8ef8975c4cf486c6137a53d" args="(ECAT7_MATRIXLIST *mlist, ECAT7_mainheader *h, int *plane_nr, int *frame_nr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ecat7GetPlaneAndFrameNr </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structECAT7__MATRIXLIST.html">ECAT7_MATRIXLIST</a> *&#160;</td>
          <td class="paramname"><em>mlist</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structecat7__mainheader.html">ECAT7_mainheader</a> *&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>plane_nr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>frame_nr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Calculate the number of planes and frames/gates from ECAT7 matrix list. Check that all planes have equal nr of frames/gates, that frames/gates are sequentally numbered.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">mlist</td><td>Ecat7 matrix list; note that this list is here sorted by planes </td></tr>
    <tr><td class="paramname">h</td><td>Ecat7 main header structure </td></tr>
    <tr><td class="paramname">plane_nr</td><td>Number of planes will be put here; NULL if not needed [1..number of planes, or NULL] </td></tr>
    <tr><td class="paramname">frame_nr</td><td>Number of frames/gates will be put here; NULL if not needed [1..number of frames, or NULL] </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>errstatus, which is STATUS_OK (0) when call was successful, and &gt;0 in case of an error. Note that if this is 3D image volume or sinogram, then the returned plane_nr will be one, and the actual Z dim must be read from subheader. </dd></dl>

<p>Definition at line <a class="el" href="ecat7ml_8c_source.html#l00409">409</a> of file <a class="el" href="ecat7ml_8c_source.html">ecat7ml.c</a>.</p>

<p>References <a class="el" href="ecat7ml_8c_source.html#l00299">ecat7_id_to_val()</a>, <a class="el" href="ecat7ml_8c_source.html#l00314">ecat7SortMatlistByPlane()</a>, <a class="el" href="ecat7_8h_source.html#l00617">ECAT7_Matval::frame</a>, <a class="el" href="ecat7_8h_source.html#l00617">ECAT7_Matval::gate</a>, <a class="el" href="ecat7_8h_source.html#l00606">ECAT7_MatDir::id</a>, <a class="el" href="ecat7_8h_source.html#l00614">ECAT7_MATRIXLIST::matdir</a>, <a class="el" href="ecat7_8h_source.html#l00612">ECAT7_MATRIXLIST::matrixNr</a>, <a class="el" href="ecat7_8h_source.html#l00189">ecat7_mainheader::num_frames</a>, <a class="el" href="ecat7_8h_source.html#l00191">ecat7_mainheader::num_gates</a>, <a class="el" href="ecat7_8h_source.html#l00617">ECAT7_Matval::plane</a>, <a class="el" href="img_8h_source.html#l00118">STATUS_FAULT</a>, <a class="el" href="img_8h_source.html#l00119">STATUS_MISSINGMATRIX</a>, and <a class="el" href="img_8h_source.html#l00118">STATUS_OK</a>.</p>

<p>Referenced by <a class="el" href="img__e7_8c_source.html#l00827">imgReadEcat7Header()</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ecat7ml_8c_a233c8c21f8ef8975c4cf486c6137a53d_cgraph.png" border="0" usemap="#ecat7ml_8c_a233c8c21f8ef8975c4cf486c6137a53d_cgraph" alt=""/></div>
<map name="ecat7ml_8c_a233c8c21f8ef8975c4cf486c6137a53d_cgraph" id="ecat7ml_8c_a233c8c21f8ef8975c4cf486c6137a53d_cgraph">
<area shape="rect" id="node3" href="ecat7ml_8c.html#a4cf0dc3b586a1c62d177f21b5e8e2328" title="ecat7_id_to_val" alt="" coords="455,5,567,35"/><area shape="rect" id="node5" href="ecat7ml_8c.html#a4c5fe6841c5c02db200f5aa92d652014" title="ecat7SortMatlistByPlane" alt="" coords="239,31,404,60"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a0826a19efcf80e53e28473189d07949e"></a><!-- doxytag: member="ecat7ml.c::ecat7InitMatlist" ref="a0826a19efcf80e53e28473189d07949e" args="(ECAT7_MATRIXLIST *mlist)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ecat7InitMatlist </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structECAT7__MATRIXLIST.html">ECAT7_MATRIXLIST</a> *&#160;</td>
          <td class="paramname"><em>mlist</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Initiate ECAT matrix list. Call this once before first use.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">mlist</td><td>target matrix list </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="ecat7ml_8c_source.html#l00059">59</a> of file <a class="el" href="ecat7ml_8c_source.html">ecat7ml.c</a>.</p>

<p>References <a class="el" href="ecat7_8h_source.html#l00614">ECAT7_MATRIXLIST::matdir</a>, <a class="el" href="ecat7_8h_source.html#l00612">ECAT7_MATRIXLIST::matrixNr</a>, and <a class="el" href="ecat7_8h_source.html#l00613">ECAT7_MATRIXLIST::matrixSpace</a>.</p>

<p>Referenced by <a class="el" href="ecat7p_8c_source.html#l00532">ecat7PrintSubheader()</a>, <a class="el" href="img__e7_8c_source.html#l00083">imgReadEcat7()</a>, <a class="el" href="img__e7_8c_source.html#l01051">imgReadEcat7Frame()</a>, and <a class="el" href="img__e7_8c_source.html#l00827">imgReadEcat7Header()</a>.</p>

</div>
</div>
<a class="anchor" id="ad50b3297af530071a5f115c14f40c701"></a><!-- doxytag: member="ecat7ml.c::ecat7PrintMatlist" ref="ad50b3297af530071a5f115c14f40c701" args="(ECAT7_MATRIXLIST *ml)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ecat7PrintMatlist </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structECAT7__MATRIXLIST.html">ECAT7_MATRIXLIST</a> *&#160;</td>
          <td class="paramname"><em>ml</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Print ECAT matrix list on stdout.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">ml</td><td>matrix list for Ecat7 file </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="ecat7ml_8c_source.html#l00149">149</a> of file <a class="el" href="ecat7ml_8c_source.html">ecat7ml.c</a>.</p>

<p>References <a class="el" href="ecat7_8h_source.html#l00617">ECAT7_Matval::bed</a>, <a class="el" href="ecat7ml_8c_source.html#l00299">ecat7_id_to_val()</a>, <a class="el" href="ecat7_8h_source.html#l00608">ECAT7_MatDir::endblk</a>, <a class="el" href="ecat7_8h_source.html#l00617">ECAT7_Matval::frame</a>, <a class="el" href="ecat7_8h_source.html#l00617">ECAT7_Matval::gate</a>, <a class="el" href="ecat7_8h_source.html#l00606">ECAT7_MatDir::id</a>, <a class="el" href="ecat7_8h_source.html#l00614">ECAT7_MATRIXLIST::matdir</a>, <a class="el" href="ecat7_8h_source.html#l00612">ECAT7_MATRIXLIST::matrixNr</a>, <a class="el" href="ecat7_8h_source.html#l00617">ECAT7_Matval::plane</a>, <a class="el" href="ecat7_8h_source.html#l00609">ECAT7_MatDir::status</a>, and <a class="el" href="ecat7_8h_source.html#l00607">ECAT7_MatDir::strtblk</a>.</p>

<p>Referenced by <a class="el" href="ecat7p_8c_source.html#l00532">ecat7PrintSubheader()</a>, and <a class="el" href="img__e7_8c_source.html#l00083">imgReadEcat7()</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ecat7ml_8c_ad50b3297af530071a5f115c14f40c701_cgraph.png" border="0" usemap="#ecat7ml_8c_ad50b3297af530071a5f115c14f40c701_cgraph" alt=""/></div>
<map name="ecat7ml_8c_ad50b3297af530071a5f115c14f40c701_cgraph" id="ecat7ml_8c_ad50b3297af530071a5f115c14f40c701_cgraph">
<area shape="rect" id="node3" href="ecat7ml_8c.html#a4cf0dc3b586a1c62d177f21b5e8e2328" title="ecat7_id_to_val" alt="" coords="175,5,287,35"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a0304c6b68597ab6fe00bb35a44c19dcb"></a><!-- doxytag: member="ecat7ml.c::ecat7ReadMatlist" ref="a0304c6b68597ab6fe00bb35a44c19dcb" args="(FILE *fp, ECAT7_MATRIXLIST *ml)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ecat7ReadMatlist </td>
          <td>(</td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>fp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structECAT7__MATRIXLIST.html">ECAT7_MATRIXLIST</a> *&#160;</td>
          <td class="paramname"><em>ml</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Read ECAT matrix list. Matrix list must be initiated (once) before calling this.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">fp</td><td>file pointer </td></tr>
    <tr><td class="paramname">ml</td><td>matrix list structure for Ecat7 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>returns 0 if ok, 1 if invalid input, 2 if first matrix is not found, 3 if failed to read matrix, 4 if data allocation failed for matrix, 5 if other error occurred. </dd></dl>

<p>Definition at line <a class="el" href="ecat7ml_8c_source.html#l00086">86</a> of file <a class="el" href="ecat7ml_8c_source.html">ecat7ml.c</a>.</p>

<p>References <a class="el" href="ecat7_8h_source.html#l00101">ECAT7_TEST</a>, <a class="el" href="ecat7ml_8c_source.html#l00070">ecat7EmptyMatlist()</a>, <a class="el" href="ecat7_8h_source.html#l00608">ECAT7_MatDir::endblk</a>, <a class="el" href="ecat7_8h_source.html#l00606">ECAT7_MatDir::id</a>, <a class="el" href="ecat63_8h_source.html#l00027">MatBLKSIZE</a>, <a class="el" href="ecat7_8h_source.html#l00614">ECAT7_MATRIXLIST::matdir</a>, <a class="el" href="ecat63_8h_source.html#l00028">MatFirstDirBlk</a>, <a class="el" href="ecat7_8h_source.html#l00612">ECAT7_MATRIXLIST::matrixNr</a>, <a class="el" href="ecat7_8h_source.html#l00613">ECAT7_MATRIXLIST::matrixSpace</a>, <a class="el" href="ecat7_8h_source.html#l00609">ECAT7_MatDir::status</a>, and <a class="el" href="ecat7_8h_source.html#l00607">ECAT7_MatDir::strtblk</a>.</p>

<p>Referenced by <a class="el" href="ecat7p_8c_source.html#l00532">ecat7PrintSubheader()</a>, <a class="el" href="img__e7_8c_source.html#l00083">imgReadEcat7()</a>, <a class="el" href="img__e7_8c_source.html#l01051">imgReadEcat7Frame()</a>, and <a class="el" href="img__e7_8c_source.html#l00827">imgReadEcat7Header()</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ecat7ml_8c_a0304c6b68597ab6fe00bb35a44c19dcb_cgraph.png" border="0" usemap="#ecat7ml_8c_a0304c6b68597ab6fe00bb35a44c19dcb_cgraph" alt=""/></div>
<map name="ecat7ml_8c_a0304c6b68597ab6fe00bb35a44c19dcb_cgraph" id="ecat7ml_8c_a0304c6b68597ab6fe00bb35a44c19dcb_cgraph">
<area shape="rect" id="node3" href="ecat7ml_8c.html#a570804c248c25f15c172568043a8f0a5" title="ecat7EmptyMatlist" alt="" coords="179,5,309,35"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a1005274d31eb31ae483b5740dae6af1e"></a><!-- doxytag: member="ecat7ml.c::ecat7SortMatlistByFrame" ref="a1005274d31eb31ae483b5740dae6af1e" args="(ECAT7_MATRIXLIST *ml)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ecat7SortMatlistByFrame </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structECAT7__MATRIXLIST.html">ECAT7_MATRIXLIST</a> *&#160;</td>
          <td class="paramname"><em>ml</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Sort matrixlist by frame and plane. Bubble sorting algorithm.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">ml</td><td>target matrix list </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="ecat7ml_8c_source.html#l00340">340</a> of file <a class="el" href="ecat7ml_8c_source.html">ecat7ml.c</a>.</p>

<p>References <a class="el" href="ecat7ml_8c_source.html#l00299">ecat7_id_to_val()</a>, <a class="el" href="ecat7_8h_source.html#l00617">ECAT7_Matval::frame</a>, <a class="el" href="ecat7_8h_source.html#l00606">ECAT7_MatDir::id</a>, <a class="el" href="ecat7_8h_source.html#l00614">ECAT7_MATRIXLIST::matdir</a>, <a class="el" href="ecat7_8h_source.html#l00612">ECAT7_MATRIXLIST::matrixNr</a>, and <a class="el" href="ecat7_8h_source.html#l00617">ECAT7_Matval::plane</a>.</p>

<p>Referenced by <a class="el" href="img__e7_8c_source.html#l01051">imgReadEcat7Frame()</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ecat7ml_8c_a1005274d31eb31ae483b5740dae6af1e_cgraph.png" border="0" usemap="#ecat7ml_8c_a1005274d31eb31ae483b5740dae6af1e_cgraph" alt=""/></div>
<map name="ecat7ml_8c_a1005274d31eb31ae483b5740dae6af1e_cgraph" id="ecat7ml_8c_a1005274d31eb31ae483b5740dae6af1e_cgraph">
<area shape="rect" id="node3" href="ecat7ml_8c.html#a4cf0dc3b586a1c62d177f21b5e8e2328" title="ecat7_id_to_val" alt="" coords="225,5,337,35"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a4c5fe6841c5c02db200f5aa92d652014"></a><!-- doxytag: member="ecat7ml.c::ecat7SortMatlistByPlane" ref="a4c5fe6841c5c02db200f5aa92d652014" args="(ECAT7_MATRIXLIST *ml)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ecat7SortMatlistByPlane </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structECAT7__MATRIXLIST.html">ECAT7_MATRIXLIST</a> *&#160;</td>
          <td class="paramname"><em>ml</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Sort matrixlist by plane and frame. Bubble sorting algorithm.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">ml</td><td>target matrix list </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="ecat7ml_8c_source.html#l00314">314</a> of file <a class="el" href="ecat7ml_8c_source.html">ecat7ml.c</a>.</p>

<p>References <a class="el" href="ecat7ml_8c_source.html#l00299">ecat7_id_to_val()</a>, <a class="el" href="ecat7_8h_source.html#l00617">ECAT7_Matval::frame</a>, <a class="el" href="ecat7_8h_source.html#l00606">ECAT7_MatDir::id</a>, <a class="el" href="ecat7_8h_source.html#l00614">ECAT7_MATRIXLIST::matdir</a>, <a class="el" href="ecat7_8h_source.html#l00612">ECAT7_MATRIXLIST::matrixNr</a>, and <a class="el" href="ecat7_8h_source.html#l00617">ECAT7_Matval::plane</a>.</p>

<p>Referenced by <a class="el" href="ecat7ml_8c_source.html#l00409">ecat7GetPlaneAndFrameNr()</a>, and <a class="el" href="img__e7_8c_source.html#l00083">imgReadEcat7()</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="ecat7ml_8c_a4c5fe6841c5c02db200f5aa92d652014_cgraph.png" border="0" usemap="#ecat7ml_8c_a4c5fe6841c5c02db200f5aa92d652014_cgraph" alt=""/></div>
<map name="ecat7ml_8c_a4c5fe6841c5c02db200f5aa92d652014_cgraph" id="ecat7ml_8c_a4c5fe6841c5c02db200f5aa92d652014_cgraph">
<area shape="rect" id="node3" href="ecat7ml_8c.html#a4cf0dc3b586a1c62d177f21b5e8e2328" title="ecat7_id_to_val" alt="" coords="223,5,335,35"/></map>
</div>
</p>

</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>