Sophie

Sophie

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

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>imgunit.c 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 class="header">
  <div class="headertitle">
<div class="title">imgunit.c</div>  </div>
</div>
<div class="contents">
<a href="imgunit_8c.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"></span>
<a name="l00003"></a>00003 <span class="comment">  Copyright (c) 2006-2011 Turku PET Centre</span>
<a name="l00004"></a>00004 <span class="comment"></span>
<a name="l00005"></a>00005 <span class="comment">  Library:      imgunit</span>
<a name="l00006"></a>00006 <span class="comment">  Description:  Functions for setting image calibration unit.</span>
<a name="l00007"></a>00007 <span class="comment"></span>
<a name="l00008"></a>00008 <span class="comment">  This library is free software; you can redistribute it and/or</span>
<a name="l00009"></a>00009 <span class="comment">  modify it under the terms of the GNU Lesser General Public</span>
<a name="l00010"></a>00010 <span class="comment">  License as published by the Free Software Foundation; either</span>
<a name="l00011"></a>00011 <span class="comment">  version 2.1 of the License, or (at your option) any later version.</span>
<a name="l00012"></a>00012 <span class="comment"></span>
<a name="l00013"></a>00013 <span class="comment">  This library is distributed in the hope that it will be useful,</span>
<a name="l00014"></a>00014 <span class="comment">  but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00015"></a>00015 <span class="comment">  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</span>
<a name="l00016"></a>00016 <span class="comment">  See the GNU Lesser General Public License for more details:</span>
<a name="l00017"></a>00017 <span class="comment">  http://www.gnu.org/copyleft/lesser.html</span>
<a name="l00018"></a>00018 <span class="comment"></span>
<a name="l00019"></a>00019 <span class="comment">  You should have received a copy of the GNU Lesser General Public License</span>
<a name="l00020"></a>00020 <span class="comment">  along with this library/program; if not, write to the Free Software</span>
<a name="l00021"></a>00021 <span class="comment">  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA </span>
<a name="l00022"></a>00022 <span class="comment"></span>
<a name="l00023"></a>00023 <span class="comment">  Turku PET Centre, Turku, Finland, http://www.turkupetcentre.fi</span>
<a name="l00024"></a>00024 <span class="comment"></span>
<a name="l00025"></a>00025 <span class="comment">  Modification history:</span>
<a name="l00026"></a>00026 <span class="comment">  2006-10-30 Vesa Oikonen</span>
<a name="l00027"></a>00027 <span class="comment">    First created.</span>
<a name="l00028"></a>00028 <span class="comment">  2007-02-02 VO</span>
<a name="l00029"></a>00029 <span class="comment">    imgUnitId() identifies more unit strings.</span>
<a name="l00030"></a>00030 <span class="comment">    Added more IMG units.</span>
<a name="l00031"></a>00031 <span class="comment">    Functions imgUnitFromEcat7() and imgUnit() rewritten.</span>
<a name="l00032"></a>00032 <span class="comment">  2007-17-07 Harri Merisaari</span>
<a name="l00033"></a>00033 <span class="comment">    Modified for optional ANSi compatibility</span>
<a name="l00034"></a>00034 <span class="comment">  2008-07-24 VO</span>
<a name="l00035"></a>00035 <span class="comment">    Added function imgSetUnit().</span>
<a name="l00036"></a>00036 <span class="comment">  2010-05-11 VO</span>
<a name="l00037"></a>00037 <span class="comment">    Function imgUnitFromEcat7() tries to identify unit with imgUnitId()</span>
<a name="l00038"></a>00038 <span class="comment">    always when ECAT 7 calibration_units is 2; previosly in these cases</span>
<a name="l00039"></a>00039 <span class="comment">    unit was assumed to be unknown.</span>
<a name="l00040"></a>00040 <span class="comment">  2011-02-04 VO</span>
<a name="l00041"></a>00041 <span class="comment">    imgUnitToEcat7() writes label &quot;unitless&quot; in the header, previosly header</span>
<a name="l00042"></a>00042 <span class="comment">    was marked to contain no data_units label.</span>
<a name="l00043"></a>00043 <span class="comment"></span>
<a name="l00044"></a>00044 <span class="comment"></span>
<a name="l00045"></a>00045 <span class="comment">******************************************************************************/</span>
<a name="l00046"></a>00046 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00047"></a>00047 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<a name="l00048"></a>00048 <span class="preprocessor">#include &lt;math.h&gt;</span>
<a name="l00049"></a>00049 <span class="preprocessor">#include &lt;time.h&gt;</span>
<a name="l00050"></a>00050 <span class="preprocessor">#include &lt;string.h&gt;</span>
<a name="l00051"></a>00051 <span class="preprocessor">#include &lt;strings.h&gt;</span>
<a name="l00052"></a>00052 <span class="preprocessor">#include &lt;ctype.h&gt;</span>
<a name="l00053"></a>00053 <span class="preprocessor">#include &lt;float.h&gt;</span>
<a name="l00054"></a>00054 <span class="comment">/*****************************************************************************/</span>
<a name="l00055"></a>00055 <span class="preprocessor">#include &quot;<a class="code" href="img_8h.html">img.h</a>&quot;</span>
<a name="l00056"></a>00056 <span class="preprocessor">#include &quot;<a class="code" href="substitutions_8h.html">substitutions.h</a>&quot;</span>
<a name="l00057"></a>00057 <span class="comment">/*****************************************************************************/</span>
<a name="l00058"></a>00058 <span class="preprocessor">#include &quot;<a class="code" href="imgunit_8h.html">include/imgunit.h</a>&quot;</span>
<a name="l00059"></a>00059 <span class="comment">/*****************************************************************************/</span>
<a name="l00061"></a><a class="code" href="imgunit_8c.html#aadd4487a750a028338a419a3c8f65ebb">00061</a> <span class="keyword">static</span> <span class="keywordtype">char</span> *<a class="code" href="imgunit_8c.html#aadd4487a750a028338a419a3c8f65ebb">img_unit_string</a>[] = {
<a name="l00062"></a>00062   <span class="comment">/*  0 */</span>  <span class="stringliteral">&quot;unknown&quot;</span>,
<a name="l00063"></a>00063   <span class="comment">/*  1 */</span>  <span class="stringliteral">&quot;cnts/sec&quot;</span>,
<a name="l00064"></a>00064   <span class="comment">/*  2 */</span>  <span class="stringliteral">&quot;counts&quot;</span>,
<a name="l00065"></a>00065   <span class="comment">/*  3 */</span>  <span class="stringliteral">&quot;kBq/mL&quot;</span>,
<a name="l00066"></a>00066   <span class="comment">/*  4 */</span>  <span class="stringliteral">&quot;sec*kBq/mL&quot;</span>,
<a name="l00067"></a>00067   <span class="comment">/*  5 */</span>  <span class="stringliteral">&quot;1/sec&quot;</span>,
<a name="l00068"></a>00068   <span class="comment">/*  6 */</span>  <span class="stringliteral">&quot;1/min&quot;</span>,
<a name="l00069"></a>00069   <span class="comment">/*  7 */</span>  <span class="stringliteral">&quot;mL/mL&quot;</span>,
<a name="l00070"></a>00070   <span class="comment">/*  8 */</span>  <span class="stringliteral">&quot;mL/dL&quot;</span>,
<a name="l00071"></a>00071   <span class="comment">/*  9 */</span>  <span class="stringliteral">&quot;mL/(mL*min)&quot;</span>,
<a name="l00072"></a>00072   <span class="comment">/* 10 */</span>  <span class="stringliteral">&quot;mL/(dL*min)&quot;</span>,
<a name="l00073"></a>00073   <span class="comment">/* 11 */</span>  <span class="stringliteral">&quot;unitless&quot;</span>,
<a name="l00074"></a>00074   <span class="comment">/* 12 */</span>  <span class="stringliteral">&quot;nCi/mL&quot;</span>,
<a name="l00075"></a>00075   <span class="comment">/* 13 */</span>  <span class="stringliteral">&quot;MBq/mL&quot;</span>,
<a name="l00076"></a>00076   <span class="comment">/* 14 */</span>  <span class="stringliteral">&quot;Bq/cc&quot;</span>,
<a name="l00077"></a>00077   <span class="comment">/* 15 */</span>  <span class="stringliteral">&quot;uCi/cc&quot;</span>,
<a name="l00078"></a>00078   <span class="comment">/* 16 */</span>  <span class="stringliteral">&quot;umol/(100g*min)&quot;</span>,
<a name="l00079"></a>00079   <span class="comment">/* 17 */</span>  <span class="stringliteral">&quot;mg/(100g*min)&quot;</span>,
<a name="l00080"></a>00080             0
<a name="l00081"></a>00081 };
<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="l00091"></a><a class="code" href="imgunit_8h.html#a72fe74ec5a539bc93f4d9bce45f67905">00091</a> <span class="keywordtype">int</span> <a class="code" href="imgunit_8c.html#a72fe74ec5a539bc93f4d9bce45f67905">imgUnitId</a>(<span class="keywordtype">char</span> *unit) {
<a name="l00092"></a>00092   <span class="keywordflow">if</span>(unit==NULL) <span class="keywordflow">return</span>(-1);
<a name="l00093"></a>00093   <span class="keywordflow">if</span>(strlen(unit)==0)                             <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a9f331f5d5ae9c32bb046f1203f19b186">IMGUNIT_UNKNOWN</a>;
<a name="l00094"></a>00094   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;unknown&quot;</span>)==0)         <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a9f331f5d5ae9c32bb046f1203f19b186">IMGUNIT_UNKNOWN</a>;
<a name="l00095"></a>00095   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;cnts/sec&quot;</span>)==0)        <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ad60d265e3743984fdfd772d4f4fefdba">IMGUNIT_CPS</a>;
<a name="l00096"></a>00096   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;counts/sec&quot;</span>)==0)      <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ad60d265e3743984fdfd772d4f4fefdba">IMGUNIT_CPS</a>;
<a name="l00097"></a>00097   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;ECAT counts/sec&quot;</span>)==0) <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ad60d265e3743984fdfd772d4f4fefdba">IMGUNIT_CPS</a>;
<a name="l00098"></a>00098   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;cps&quot;</span>)==0)             <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ad60d265e3743984fdfd772d4f4fefdba">IMGUNIT_CPS</a>;
<a name="l00099"></a>00099   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;counts&quot;</span>)==0)          <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7af57377df454b4a21e6afb15bf12d9e75">IMGUNIT_COUNTS</a>;
<a name="l00100"></a>00100   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;cnts&quot;</span>)==0)            <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7af57377df454b4a21e6afb15bf12d9e75">IMGUNIT_COUNTS</a>;
<a name="l00101"></a>00101   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;kBq/cc&quot;</span>)==0)          <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a537d6b7cc5e3a5d0f577d131114b9cef">IMGUNIT_KBQ_PER_ML</a>;
<a name="l00102"></a>00102   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;kBq/mL&quot;</span>)==0)          <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a537d6b7cc5e3a5d0f577d131114b9cef">IMGUNIT_KBQ_PER_ML</a>;
<a name="l00103"></a>00103   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;sec*kBq/cc&quot;</span>)==0)      <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aca160ce9de7bc96d9e46d1bd118b9bb4">IMGUNIT_SEC_KBQ_PER_ML</a>;
<a name="l00104"></a>00104   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;sec*kBq/mL&quot;</span>)==0)      <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aca160ce9de7bc96d9e46d1bd118b9bb4">IMGUNIT_SEC_KBQ_PER_ML</a>;
<a name="l00105"></a>00105   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;integral&quot;</span>)==0)        <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aca160ce9de7bc96d9e46d1bd118b9bb4">IMGUNIT_SEC_KBQ_PER_ML</a>;
<a name="l00106"></a>00106   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;1/sec&quot;</span>)==0)           <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a870f0f2d6087e8fb47deb18484dda9f0">IMGUNIT_PER_SEC</a>;
<a name="l00107"></a>00107   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;1/s&quot;</span>)==0)             <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a870f0f2d6087e8fb47deb18484dda9f0">IMGUNIT_PER_SEC</a>;
<a name="l00108"></a>00108   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;s-1&quot;</span>)==0)             <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a870f0f2d6087e8fb47deb18484dda9f0">IMGUNIT_PER_SEC</a>;
<a name="l00109"></a>00109   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;1/min&quot;</span>)==0)           <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7afded6246801776330768a35117bd895f">IMGUNIT_PER_MIN</a>;
<a name="l00110"></a>00110   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;min-1&quot;</span>)==0)           <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7afded6246801776330768a35117bd895f">IMGUNIT_PER_MIN</a>;
<a name="l00111"></a>00111   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;mL/mL&quot;</span>)==0)           <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a6968bd765c2c6edac101a4b00edb7308">IMGUNIT_ML_PER_ML</a>;
<a name="l00112"></a>00112   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;mL/cc&quot;</span>)==0)           <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a6968bd765c2c6edac101a4b00edb7308">IMGUNIT_ML_PER_ML</a>;
<a name="l00113"></a>00113   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;mL/dL&quot;</span>)==0)           <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ae0396e6d7bdc533cdad2ff4d39a01b58">IMGUNIT_ML_PER_DL</a>;
<a name="l00114"></a>00114   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;mL/100mL&quot;</span>)==0)        <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ae0396e6d7bdc533cdad2ff4d39a01b58">IMGUNIT_ML_PER_DL</a>;
<a name="l00115"></a>00115   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;mL/(mL*min)&quot;</span>)==0)     <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a26e16ef896829ad1685ac629eecb3251">IMGUNIT_ML_PER_ML_PER_MIN</a>;
<a name="l00116"></a>00116   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;mL/(min*mL)&quot;</span>)==0)     <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a26e16ef896829ad1685ac629eecb3251">IMGUNIT_ML_PER_ML_PER_MIN</a>;
<a name="l00117"></a>00117   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;mL/(cc*min)&quot;</span>)==0)     <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a26e16ef896829ad1685ac629eecb3251">IMGUNIT_ML_PER_ML_PER_MIN</a>;
<a name="l00118"></a>00118   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;mL/(min*cc)&quot;</span>)==0)     <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a26e16ef896829ad1685ac629eecb3251">IMGUNIT_ML_PER_ML_PER_MIN</a>;
<a name="l00119"></a>00119   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;mL/mL/min&quot;</span>)==0)       <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a26e16ef896829ad1685ac629eecb3251">IMGUNIT_ML_PER_ML_PER_MIN</a>;
<a name="l00120"></a>00120   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;mL/min/mL&quot;</span>)==0)       <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a26e16ef896829ad1685ac629eecb3251">IMGUNIT_ML_PER_ML_PER_MIN</a>;
<a name="l00121"></a>00121   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;mL/cc/min&quot;</span>)==0)       <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a26e16ef896829ad1685ac629eecb3251">IMGUNIT_ML_PER_ML_PER_MIN</a>;
<a name="l00122"></a>00122   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;mL/min/cc&quot;</span>)==0)       <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a26e16ef896829ad1685ac629eecb3251">IMGUNIT_ML_PER_ML_PER_MIN</a>;
<a name="l00123"></a>00123   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;mL/(dL*min)&quot;</span>)==0)     <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a9ce649027328bcd83f1b741d0b1e1d2f">IMGUNIT_ML_PER_DL_PER_MIN</a>;
<a name="l00124"></a>00124   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;mL/(min*dL)&quot;</span>)==0)     <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a9ce649027328bcd83f1b741d0b1e1d2f">IMGUNIT_ML_PER_DL_PER_MIN</a>;
<a name="l00125"></a>00125   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;mL/(100mL*min)&quot;</span>)==0)  <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a9ce649027328bcd83f1b741d0b1e1d2f">IMGUNIT_ML_PER_DL_PER_MIN</a>;
<a name="l00126"></a>00126   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;mL/(min*100mL)&quot;</span>)==0)  <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a9ce649027328bcd83f1b741d0b1e1d2f">IMGUNIT_ML_PER_DL_PER_MIN</a>;
<a name="l00127"></a>00127   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;mL/dL/min&quot;</span>)==0)       <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a9ce649027328bcd83f1b741d0b1e1d2f">IMGUNIT_ML_PER_DL_PER_MIN</a>;
<a name="l00128"></a>00128   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;mL/min/dL&quot;</span>)==0)       <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a9ce649027328bcd83f1b741d0b1e1d2f">IMGUNIT_ML_PER_DL_PER_MIN</a>;
<a name="l00129"></a>00129   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;mL/100mL/min&quot;</span>)==0)    <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a9ce649027328bcd83f1b741d0b1e1d2f">IMGUNIT_ML_PER_DL_PER_MIN</a>;
<a name="l00130"></a>00130   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;mL/min/100mL&quot;</span>)==0)    <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a9ce649027328bcd83f1b741d0b1e1d2f">IMGUNIT_ML_PER_DL_PER_MIN</a>;
<a name="l00131"></a>00131   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;unitless&quot;</span>)==0)        <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aa966d1fbff58a5f7114fc8767eaa7f7b">IMGUNIT_UNITLESS</a>;
<a name="l00132"></a>00132   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;nCi/cc&quot;</span>)==0)          <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ac1007d6483f6030ba2077c762c98a324">IMGUNIT_NCI_PER_ML</a>;
<a name="l00133"></a>00133   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;nCi/mL&quot;</span>)==0)          <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ac1007d6483f6030ba2077c762c98a324">IMGUNIT_NCI_PER_ML</a>;
<a name="l00134"></a>00134   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;MBq/cc&quot;</span>)==0)          <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7af8c170967c733a46dea5ef55353ffda1">IMGUNIT_MBQ_PER_ML</a>;
<a name="l00135"></a>00135   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;MBq/mL&quot;</span>)==0)          <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7af8c170967c733a46dea5ef55353ffda1">IMGUNIT_MBQ_PER_ML</a>;
<a name="l00136"></a>00136   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;Bq/cc&quot;</span>)==0)           <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aa16dec8881777e60c9a21a3690a208e5">IMGUNIT_BQ_PER_ML</a>;
<a name="l00137"></a>00137   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;Bq/mL&quot;</span>)==0)           <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aa16dec8881777e60c9a21a3690a208e5">IMGUNIT_BQ_PER_ML</a>;
<a name="l00138"></a>00138   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;uCi/cc&quot;</span>)==0)          <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ad4386c6b7dc8c796a4dddd31754cbf56">IMGUNIT_UCI_PER_ML</a>;
<a name="l00139"></a>00139   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;uCi/mL&quot;</span>)==0)          <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ad4386c6b7dc8c796a4dddd31754cbf56">IMGUNIT_UCI_PER_ML</a>;
<a name="l00140"></a>00140   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;umol/(100g*min)&quot;</span>)==0) <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a93b533e892e5bcdb76d31beabd825aab">IMGUNIT_UMOL_PER_MIN_PER_100G</a>;
<a name="l00141"></a>00141   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;umol/(min*100g)&quot;</span>)==0) <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a93b533e892e5bcdb76d31beabd825aab">IMGUNIT_UMOL_PER_MIN_PER_100G</a>;
<a name="l00142"></a>00142   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;umol/100g/min&quot;</span>)==0)   <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a93b533e892e5bcdb76d31beabd825aab">IMGUNIT_UMOL_PER_MIN_PER_100G</a>;
<a name="l00143"></a>00143   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;umol/min/100g&quot;</span>)==0)   <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a93b533e892e5bcdb76d31beabd825aab">IMGUNIT_UMOL_PER_MIN_PER_100G</a>;
<a name="l00144"></a>00144   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;mg/(100g*min)&quot;</span>)==0)   <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a14e0838f313f10547c94907543a0e1e7">IMGUNIT_MG_PER_MIN_PER_100G</a>;
<a name="l00145"></a>00145   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;mg/(min*100g)&quot;</span>)==0)   <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a14e0838f313f10547c94907543a0e1e7">IMGUNIT_MG_PER_MIN_PER_100G</a>;
<a name="l00146"></a>00146   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;mg/100g/min&quot;</span>)==0)     <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a14e0838f313f10547c94907543a0e1e7">IMGUNIT_MG_PER_MIN_PER_100G</a>;
<a name="l00147"></a>00147   <span class="keywordflow">else</span> <span class="keywordflow">if</span>(strcasecmp(unit, <span class="stringliteral">&quot;mg/min/100g&quot;</span>)==0)     <span class="keywordflow">return</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a14e0838f313f10547c94907543a0e1e7">IMGUNIT_MG_PER_MIN_PER_100G</a>;
<a name="l00148"></a>00148 
<a name="l00149"></a>00149   <span class="keywordflow">return</span>(-3);
<a name="l00150"></a>00150 }
<a name="l00151"></a>00151 <span class="comment">/*****************************************************************************/</span>
<a name="l00152"></a>00152 
<a name="l00153"></a>00153 <span class="comment">/*****************************************************************************/</span>
<a name="l00160"></a><a class="code" href="imgunit_8h.html#a99853914e3480ab82c7163b0612e8b28">00160</a> <span class="keywordtype">void</span> <a class="code" href="imgunit_8c.html#a99853914e3480ab82c7163b0612e8b28">imgUnitFromEcat</a>(<a class="code" href="structIMG.html">IMG</a> *img, <span class="keywordtype">int</span> ecat_unit) {
<a name="l00161"></a>00161   <span class="keywordflow">switch</span>(ecat_unit) {
<a name="l00162"></a>00162     <span class="keywordflow">case</span>  0: <span class="comment">/* Unknown               */</span>
<a name="l00163"></a>00163       img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>=<a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a9f331f5d5ae9c32bb046f1203f19b186">IMGUNIT_UNKNOWN</a>; <span class="keywordflow">break</span>;
<a name="l00164"></a>00164     <span class="keywordflow">case</span>  1: <span class="comment">/* MBq/mL                */</span>
<a name="l00165"></a>00165       img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>=<a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7af8c170967c733a46dea5ef55353ffda1">IMGUNIT_MBQ_PER_ML</a>; <span class="keywordflow">break</span>;
<a name="l00166"></a>00166     <span class="keywordflow">case</span>  2: <span class="comment">/* ECAT counts           */</span>
<a name="l00167"></a>00167       img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>=<a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7af57377df454b4a21e6afb15bf12d9e75">IMGUNIT_COUNTS</a>; <span class="keywordflow">break</span>;
<a name="l00168"></a>00168     <span class="keywordflow">case</span>  3: <span class="comment">/* uCi/ml                */</span>
<a name="l00169"></a>00169       img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>=<a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ad4386c6b7dc8c796a4dddd31754cbf56">IMGUNIT_UCI_PER_ML</a>; <span class="keywordflow">break</span>;
<a name="l00170"></a>00170     <span class="keywordflow">case</span>  4: <span class="comment">/* LMRGlu                */</span>
<a name="l00171"></a>00171       img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>=<a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a9f331f5d5ae9c32bb046f1203f19b186">IMGUNIT_UNKNOWN</a>; <span class="keywordflow">break</span>;
<a name="l00172"></a>00172     <span class="keywordflow">case</span>  5: <span class="comment">/* LMRUGlu umol/min/100g */</span>
<a name="l00173"></a>00173       img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>=<a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a93b533e892e5bcdb76d31beabd825aab">IMGUNIT_UMOL_PER_MIN_PER_100G</a>; <span class="keywordflow">break</span>;
<a name="l00174"></a>00174     <span class="keywordflow">case</span>  6: <span class="comment">/* LMRUGlu mg/min/100g   */</span>
<a name="l00175"></a>00175       img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>=<a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a14e0838f313f10547c94907543a0e1e7">IMGUNIT_MG_PER_MIN_PER_100G</a>; <span class="keywordflow">break</span>;
<a name="l00176"></a>00176     <span class="keywordflow">case</span>  7: <span class="comment">/* nCi/mL                */</span>
<a name="l00177"></a>00177       img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>=<a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ac1007d6483f6030ba2077c762c98a324">IMGUNIT_NCI_PER_ML</a>; <span class="keywordflow">break</span>;
<a name="l00178"></a>00178     <span class="keywordflow">case</span>  8: <span class="comment">/* Well counts           */</span>
<a name="l00179"></a>00179       img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>=<a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ad60d265e3743984fdfd772d4f4fefdba">IMGUNIT_CPS</a>; <span class="keywordflow">break</span>;
<a name="l00180"></a>00180     <span class="keywordflow">case</span>  9: <span class="comment">/* Becquerels            */</span>
<a name="l00181"></a>00181       img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>=<a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aa16dec8881777e60c9a21a3690a208e5">IMGUNIT_BQ_PER_ML</a>; <span class="keywordflow">break</span>;
<a name="l00182"></a>00182     <span class="keywordflow">case</span> 10: <span class="comment">/* kBq/mL                */</span>
<a name="l00183"></a>00183       img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>=<a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a537d6b7cc5e3a5d0f577d131114b9cef">IMGUNIT_KBQ_PER_ML</a>; <span class="keywordflow">break</span>;
<a name="l00184"></a>00184     <span class="keywordflow">case</span> 11: <span class="comment">/* 1/min                 */</span>
<a name="l00185"></a>00185       img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>=<a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7afded6246801776330768a35117bd895f">IMGUNIT_PER_MIN</a>; <span class="keywordflow">break</span>;
<a name="l00186"></a>00186     <span class="keywordflow">case</span> 12: <span class="comment">/* mL/min/100g           */</span>
<a name="l00187"></a>00187       img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>=<a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a9ce649027328bcd83f1b741d0b1e1d2f">IMGUNIT_ML_PER_DL_PER_MIN</a>; <span class="keywordflow">break</span>;
<a name="l00188"></a>00188     <span class="keywordflow">case</span> 13: <span class="comment">/* sec*kBq/mL            */</span>
<a name="l00189"></a>00189       img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>=<a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aca160ce9de7bc96d9e46d1bd118b9bb4">IMGUNIT_SEC_KBQ_PER_ML</a>; <span class="keywordflow">break</span>;
<a name="l00190"></a>00190     <span class="keywordflow">case</span> 14: <span class="comment">/* sec*nCi/mL            */</span>
<a name="l00191"></a>00191       img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>=<a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a9f331f5d5ae9c32bb046f1203f19b186">IMGUNIT_UNKNOWN</a>; <span class="keywordflow">break</span>;
<a name="l00192"></a>00192     <span class="keywordflow">case</span> 15: <span class="comment">/* 1/sec                 */</span>
<a name="l00193"></a>00193       img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>=<a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a870f0f2d6087e8fb47deb18484dda9f0">IMGUNIT_PER_SEC</a>; <span class="keywordflow">break</span>;
<a name="l00194"></a>00194     <span class="keywordflow">case</span> 16: <span class="comment">/* Unitless              */</span>
<a name="l00195"></a>00195       img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>=<a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aa966d1fbff58a5f7114fc8767eaa7f7b">IMGUNIT_UNITLESS</a>; <span class="keywordflow">break</span>;
<a name="l00196"></a>00196     <span class="keywordflow">case</span> 17: <span class="comment">/* Unknown               */</span>
<a name="l00197"></a>00197     <span class="keywordflow">default</span>:
<a name="l00198"></a>00198       img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>=<a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a9f331f5d5ae9c32bb046f1203f19b186">IMGUNIT_UNKNOWN</a>; <span class="keywordflow">break</span>;
<a name="l00199"></a>00199   }
<a name="l00200"></a>00200 }
<a name="l00201"></a>00201 <span class="comment">/*****************************************************************************/</span>
<a name="l00202"></a>00202 
<a name="l00203"></a>00203 <span class="comment">/*****************************************************************************/</span>
<a name="l00210"></a><a class="code" href="imgunit_8h.html#affce8dc83e60543c59d5b85678899db9">00210</a> <span class="keywordtype">void</span> <a class="code" href="imgunit_8c.html#affce8dc83e60543c59d5b85678899db9">imgUnitFromEcat7</a>(<a class="code" href="structIMG.html">IMG</a> *img, <a class="code" href="structecat7__mainheader.html">ECAT7_mainheader</a> *h) {
<a name="l00211"></a>00211   <span class="keywordflow">if</span>(h-&gt;<a class="code" href="structecat7__mainheader.html#a56bb68347079aca9062f24fe0fb24a63">calibration_units</a>==0) { <span class="comment">/* Not calibrated */</span>
<a name="l00212"></a>00212     img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>=1;
<a name="l00213"></a>00213   } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(h-&gt;<a class="code" href="structecat7__mainheader.html#a56bb68347079aca9062f24fe0fb24a63">calibration_units</a>==1) {
<a name="l00214"></a>00214     <span class="keywordflow">if</span>(h-&gt;<a class="code" href="structecat7__mainheader.html#a9ee5c316fc447e305593efc25f51dc67">calibration_units_label</a>==0)
<a name="l00215"></a>00215       img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>=<a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aa16dec8881777e60c9a21a3690a208e5">IMGUNIT_BQ_PER_ML</a>;
<a name="l00216"></a>00216     <span class="keywordflow">else</span>
<a name="l00217"></a>00217       img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>=<a class="code" href="imgunit_8c.html#a72fe74ec5a539bc93f4d9bce45f67905">imgUnitId</a>(h-&gt;<a class="code" href="structecat7__mainheader.html#aa6bbc6d3bc1a60f51dd721db2c3be09d">data_units</a>);
<a name="l00218"></a>00218   } <span class="keywordflow">else</span> <span class="keywordflow">if</span>(h-&gt;<a class="code" href="structecat7__mainheader.html#a56bb68347079aca9062f24fe0fb24a63">calibration_units</a>==2) {
<a name="l00219"></a>00219     img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>=<a class="code" href="imgunit_8c.html#a72fe74ec5a539bc93f4d9bce45f67905">imgUnitId</a>(h-&gt;<a class="code" href="structecat7__mainheader.html#aa6bbc6d3bc1a60f51dd721db2c3be09d">data_units</a>);
<a name="l00220"></a>00220   } <span class="keywordflow">else</span> {
<a name="l00221"></a>00221     img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>=<a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a9f331f5d5ae9c32bb046f1203f19b186">IMGUNIT_UNKNOWN</a>;
<a name="l00222"></a>00222   }
<a name="l00223"></a>00223 }
<a name="l00224"></a>00224 <span class="comment">/*****************************************************************************/</span>
<a name="l00225"></a>00225 
<a name="l00226"></a>00226 <span class="comment">/*****************************************************************************/</span>
<a name="l00233"></a><a class="code" href="imgunit_8h.html#a0d8d16b27eaefdf56d32b5c4c51f3757">00233</a> <span class="keywordtype">int</span> <a class="code" href="imgunit_8c.html#a0d8d16b27eaefdf56d32b5c4c51f3757">imgUnitToEcat6</a>(<a class="code" href="structIMG.html">IMG</a> *img) {
<a name="l00234"></a>00234   <span class="keywordtype">int</span> ecat_unit;
<a name="l00235"></a>00235   <span class="keywordflow">switch</span>(img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>) {
<a name="l00236"></a>00236     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ad60d265e3743984fdfd772d4f4fefdba">IMGUNIT_CPS</a>: ecat_unit=9; <span class="keywordflow">break</span>;
<a name="l00237"></a>00237     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7af57377df454b4a21e6afb15bf12d9e75">IMGUNIT_COUNTS</a>: ecat_unit=2; <span class="keywordflow">break</span>;
<a name="l00238"></a>00238     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a537d6b7cc5e3a5d0f577d131114b9cef">IMGUNIT_KBQ_PER_ML</a>: ecat_unit=10; <span class="keywordflow">break</span>;
<a name="l00239"></a>00239     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aca160ce9de7bc96d9e46d1bd118b9bb4">IMGUNIT_SEC_KBQ_PER_ML</a>: ecat_unit=13; <span class="keywordflow">break</span>;
<a name="l00240"></a>00240     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a870f0f2d6087e8fb47deb18484dda9f0">IMGUNIT_PER_SEC</a>: ecat_unit=15; <span class="keywordflow">break</span>;
<a name="l00241"></a>00241     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7afded6246801776330768a35117bd895f">IMGUNIT_PER_MIN</a>: ecat_unit=11; <span class="keywordflow">break</span>;
<a name="l00242"></a>00242     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a6968bd765c2c6edac101a4b00edb7308">IMGUNIT_ML_PER_ML</a>: ecat_unit=16; <span class="keywordflow">break</span>;
<a name="l00243"></a>00243     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ae0396e6d7bdc533cdad2ff4d39a01b58">IMGUNIT_ML_PER_DL</a>: ecat_unit=16; <span class="keywordflow">break</span>;
<a name="l00244"></a>00244     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a26e16ef896829ad1685ac629eecb3251">IMGUNIT_ML_PER_ML_PER_MIN</a>: ecat_unit=11; <span class="keywordflow">break</span>;
<a name="l00245"></a>00245     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a9ce649027328bcd83f1b741d0b1e1d2f">IMGUNIT_ML_PER_DL_PER_MIN</a>: ecat_unit=12; <span class="keywordflow">break</span>;
<a name="l00246"></a>00246     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aa966d1fbff58a5f7114fc8767eaa7f7b">IMGUNIT_UNITLESS</a>: ecat_unit=16; <span class="keywordflow">break</span>;
<a name="l00247"></a>00247     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ac1007d6483f6030ba2077c762c98a324">IMGUNIT_NCI_PER_ML</a>: ecat_unit=7; <span class="keywordflow">break</span>;
<a name="l00248"></a>00248     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7af8c170967c733a46dea5ef55353ffda1">IMGUNIT_MBQ_PER_ML</a>: ecat_unit=1; <span class="keywordflow">break</span>;
<a name="l00249"></a>00249     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aa16dec8881777e60c9a21a3690a208e5">IMGUNIT_BQ_PER_ML</a>: ecat_unit=9; <span class="keywordflow">break</span>;
<a name="l00250"></a>00250     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ad4386c6b7dc8c796a4dddd31754cbf56">IMGUNIT_UCI_PER_ML</a>: ecat_unit=3; <span class="keywordflow">break</span>;
<a name="l00251"></a>00251     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a93b533e892e5bcdb76d31beabd825aab">IMGUNIT_UMOL_PER_MIN_PER_100G</a>: ecat_unit=5; <span class="keywordflow">break</span>;
<a name="l00252"></a>00252     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a14e0838f313f10547c94907543a0e1e7">IMGUNIT_MG_PER_MIN_PER_100G</a>: ecat_unit=6; <span class="keywordflow">break</span>;
<a name="l00253"></a>00253     <span class="keywordflow">default</span>: ecat_unit=0; <span class="keywordflow">break</span>;
<a name="l00254"></a>00254   }
<a name="l00255"></a>00255   <span class="keywordflow">return</span>(ecat_unit);
<a name="l00256"></a>00256 }
<a name="l00257"></a>00257 <span class="comment">/*****************************************************************************/</span>
<a name="l00258"></a>00258 
<a name="l00259"></a>00259 <span class="comment">/*****************************************************************************/</span>
<a name="l00266"></a><a class="code" href="imgunit_8h.html#ad0fec561f92cbdefe55280201ef73318">00266</a> <span class="keywordtype">void</span> <a class="code" href="imgunit_8c.html#ad0fec561f92cbdefe55280201ef73318">imgUnitToEcat7</a>(<a class="code" href="structIMG.html">IMG</a> *img, <a class="code" href="structecat7__mainheader.html">ECAT7_mainheader</a> *h) {
<a name="l00267"></a>00267   <span class="keywordflow">switch</span>(img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>) {
<a name="l00268"></a>00268     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ad60d265e3743984fdfd772d4f4fefdba">IMGUNIT_CPS</a>:
<a name="l00269"></a>00269     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7af57377df454b4a21e6afb15bf12d9e75">IMGUNIT_COUNTS</a>:
<a name="l00270"></a>00270       h-&gt;<a class="code" href="structecat7__mainheader.html#a56bb68347079aca9062f24fe0fb24a63">calibration_units</a>=0;
<a name="l00271"></a>00271       h-&gt;<a class="code" href="structecat7__mainheader.html#a9ee5c316fc447e305593efc25f51dc67">calibration_units_label</a>=1;
<a name="l00272"></a>00272       strcpy(h-&gt;<a class="code" href="structecat7__mainheader.html#aa6bbc6d3bc1a60f51dd721db2c3be09d">data_units</a>, <span class="stringliteral">&quot;ECAT counts/sec&quot;</span>);
<a name="l00273"></a>00273       <span class="keywordflow">break</span>;
<a name="l00274"></a>00274     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a537d6b7cc5e3a5d0f577d131114b9cef">IMGUNIT_KBQ_PER_ML</a>:
<a name="l00275"></a>00275       h-&gt;<a class="code" href="structecat7__mainheader.html#a56bb68347079aca9062f24fe0fb24a63">calibration_units</a>=1;
<a name="l00276"></a>00276       h-&gt;<a class="code" href="structecat7__mainheader.html#a9ee5c316fc447e305593efc25f51dc67">calibration_units_label</a>=1;
<a name="l00277"></a>00277       strcpy(h-&gt;<a class="code" href="structecat7__mainheader.html#aa6bbc6d3bc1a60f51dd721db2c3be09d">data_units</a>, <span class="stringliteral">&quot;kBq/cc&quot;</span>);
<a name="l00278"></a>00278       <span class="keywordflow">break</span>;
<a name="l00279"></a>00279     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aca160ce9de7bc96d9e46d1bd118b9bb4">IMGUNIT_SEC_KBQ_PER_ML</a>:
<a name="l00280"></a>00280       h-&gt;<a class="code" href="structecat7__mainheader.html#a56bb68347079aca9062f24fe0fb24a63">calibration_units</a>=2;
<a name="l00281"></a>00281       h-&gt;<a class="code" href="structecat7__mainheader.html#a9ee5c316fc447e305593efc25f51dc67">calibration_units_label</a>=1;
<a name="l00282"></a>00282       strcpy(h-&gt;<a class="code" href="structecat7__mainheader.html#aa6bbc6d3bc1a60f51dd721db2c3be09d">data_units</a>, <span class="stringliteral">&quot;sec*kBq/mL&quot;</span>);
<a name="l00283"></a>00283       <span class="keywordflow">break</span>;
<a name="l00284"></a>00284     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a870f0f2d6087e8fb47deb18484dda9f0">IMGUNIT_PER_SEC</a>:
<a name="l00285"></a>00285       h-&gt;<a class="code" href="structecat7__mainheader.html#a56bb68347079aca9062f24fe0fb24a63">calibration_units</a>=2;
<a name="l00286"></a>00286       h-&gt;<a class="code" href="structecat7__mainheader.html#a9ee5c316fc447e305593efc25f51dc67">calibration_units_label</a>=1;
<a name="l00287"></a>00287       strcpy(h-&gt;<a class="code" href="structecat7__mainheader.html#aa6bbc6d3bc1a60f51dd721db2c3be09d">data_units</a>, <span class="stringliteral">&quot;1/sec&quot;</span>);
<a name="l00288"></a>00288       <span class="keywordflow">break</span>;
<a name="l00289"></a>00289     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7afded6246801776330768a35117bd895f">IMGUNIT_PER_MIN</a>:
<a name="l00290"></a>00290       h-&gt;<a class="code" href="structecat7__mainheader.html#a56bb68347079aca9062f24fe0fb24a63">calibration_units</a>=2;
<a name="l00291"></a>00291       h-&gt;<a class="code" href="structecat7__mainheader.html#a9ee5c316fc447e305593efc25f51dc67">calibration_units_label</a>=1;
<a name="l00292"></a>00292       strcpy(h-&gt;<a class="code" href="structecat7__mainheader.html#aa6bbc6d3bc1a60f51dd721db2c3be09d">data_units</a>, <span class="stringliteral">&quot;1/min&quot;</span>);
<a name="l00293"></a>00293       <span class="keywordflow">break</span>;
<a name="l00294"></a>00294     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a6968bd765c2c6edac101a4b00edb7308">IMGUNIT_ML_PER_ML</a>:
<a name="l00295"></a>00295       h-&gt;<a class="code" href="structecat7__mainheader.html#a56bb68347079aca9062f24fe0fb24a63">calibration_units</a>=2;
<a name="l00296"></a>00296       h-&gt;<a class="code" href="structecat7__mainheader.html#a9ee5c316fc447e305593efc25f51dc67">calibration_units_label</a>=1;
<a name="l00297"></a>00297       strcpy(h-&gt;<a class="code" href="structecat7__mainheader.html#aa6bbc6d3bc1a60f51dd721db2c3be09d">data_units</a>, <span class="stringliteral">&quot;mL/mL&quot;</span>);
<a name="l00298"></a>00298       <span class="keywordflow">break</span>;
<a name="l00299"></a>00299     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ae0396e6d7bdc533cdad2ff4d39a01b58">IMGUNIT_ML_PER_DL</a>:
<a name="l00300"></a>00300       h-&gt;<a class="code" href="structecat7__mainheader.html#a56bb68347079aca9062f24fe0fb24a63">calibration_units</a>=2;
<a name="l00301"></a>00301       h-&gt;<a class="code" href="structecat7__mainheader.html#a9ee5c316fc447e305593efc25f51dc67">calibration_units_label</a>=1;
<a name="l00302"></a>00302       strcpy(h-&gt;<a class="code" href="structecat7__mainheader.html#aa6bbc6d3bc1a60f51dd721db2c3be09d">data_units</a>, <span class="stringliteral">&quot;mL/dL&quot;</span>);
<a name="l00303"></a>00303       <span class="keywordflow">break</span>;
<a name="l00304"></a>00304     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a26e16ef896829ad1685ac629eecb3251">IMGUNIT_ML_PER_ML_PER_MIN</a>:
<a name="l00305"></a>00305       h-&gt;<a class="code" href="structecat7__mainheader.html#a56bb68347079aca9062f24fe0fb24a63">calibration_units</a>=2;
<a name="l00306"></a>00306       h-&gt;<a class="code" href="structecat7__mainheader.html#a9ee5c316fc447e305593efc25f51dc67">calibration_units_label</a>=1;
<a name="l00307"></a>00307       strcpy(h-&gt;<a class="code" href="structecat7__mainheader.html#aa6bbc6d3bc1a60f51dd721db2c3be09d">data_units</a>, <span class="stringliteral">&quot;mL/(mL*min)&quot;</span>);
<a name="l00308"></a>00308       <span class="keywordflow">break</span>;
<a name="l00309"></a>00309     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a9ce649027328bcd83f1b741d0b1e1d2f">IMGUNIT_ML_PER_DL_PER_MIN</a>:
<a name="l00310"></a>00310       h-&gt;<a class="code" href="structecat7__mainheader.html#a56bb68347079aca9062f24fe0fb24a63">calibration_units</a>=2;
<a name="l00311"></a>00311       h-&gt;<a class="code" href="structecat7__mainheader.html#a9ee5c316fc447e305593efc25f51dc67">calibration_units_label</a>=1;
<a name="l00312"></a>00312       strcpy(h-&gt;<a class="code" href="structecat7__mainheader.html#aa6bbc6d3bc1a60f51dd721db2c3be09d">data_units</a>, <span class="stringliteral">&quot;mL/(dL*min)&quot;</span>);
<a name="l00313"></a>00313       <span class="keywordflow">break</span>;
<a name="l00314"></a>00314     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aa966d1fbff58a5f7114fc8767eaa7f7b">IMGUNIT_UNITLESS</a>:
<a name="l00315"></a>00315       h-&gt;<a class="code" href="structecat7__mainheader.html#a56bb68347079aca9062f24fe0fb24a63">calibration_units</a>=1;
<a name="l00316"></a>00316       h-&gt;<a class="code" href="structecat7__mainheader.html#a9ee5c316fc447e305593efc25f51dc67">calibration_units_label</a>=1;
<a name="l00317"></a>00317       strcpy(h-&gt;<a class="code" href="structecat7__mainheader.html#aa6bbc6d3bc1a60f51dd721db2c3be09d">data_units</a>, <span class="stringliteral">&quot;unitless&quot;</span>);
<a name="l00318"></a>00318       <span class="keywordflow">break</span>;
<a name="l00319"></a>00319     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ac1007d6483f6030ba2077c762c98a324">IMGUNIT_NCI_PER_ML</a>:
<a name="l00320"></a>00320       h-&gt;<a class="code" href="structecat7__mainheader.html#a56bb68347079aca9062f24fe0fb24a63">calibration_units</a>=1;
<a name="l00321"></a>00321       h-&gt;<a class="code" href="structecat7__mainheader.html#a9ee5c316fc447e305593efc25f51dc67">calibration_units_label</a>=1;
<a name="l00322"></a>00322       strcpy(h-&gt;<a class="code" href="structecat7__mainheader.html#aa6bbc6d3bc1a60f51dd721db2c3be09d">data_units</a>, <span class="stringliteral">&quot;nCi/cc&quot;</span>);
<a name="l00323"></a>00323       <span class="keywordflow">break</span>;
<a name="l00324"></a>00324     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7af8c170967c733a46dea5ef55353ffda1">IMGUNIT_MBQ_PER_ML</a>:
<a name="l00325"></a>00325       h-&gt;<a class="code" href="structecat7__mainheader.html#a56bb68347079aca9062f24fe0fb24a63">calibration_units</a>=1;
<a name="l00326"></a>00326       h-&gt;<a class="code" href="structecat7__mainheader.html#a9ee5c316fc447e305593efc25f51dc67">calibration_units_label</a>=1;
<a name="l00327"></a>00327       strcpy(h-&gt;<a class="code" href="structecat7__mainheader.html#aa6bbc6d3bc1a60f51dd721db2c3be09d">data_units</a>, <span class="stringliteral">&quot;MBq/cc&quot;</span>);
<a name="l00328"></a>00328       <span class="keywordflow">break</span>;
<a name="l00329"></a>00329     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7aa16dec8881777e60c9a21a3690a208e5">IMGUNIT_BQ_PER_ML</a>:
<a name="l00330"></a>00330       h-&gt;<a class="code" href="structecat7__mainheader.html#a56bb68347079aca9062f24fe0fb24a63">calibration_units</a>=1;
<a name="l00331"></a>00331       h-&gt;<a class="code" href="structecat7__mainheader.html#a9ee5c316fc447e305593efc25f51dc67">calibration_units_label</a>=1;
<a name="l00332"></a>00332       strcpy(h-&gt;<a class="code" href="structecat7__mainheader.html#aa6bbc6d3bc1a60f51dd721db2c3be09d">data_units</a>, <span class="stringliteral">&quot;Bq/cc&quot;</span>);
<a name="l00333"></a>00333       <span class="keywordflow">break</span>;
<a name="l00334"></a>00334     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7ad4386c6b7dc8c796a4dddd31754cbf56">IMGUNIT_UCI_PER_ML</a>:
<a name="l00335"></a>00335       h-&gt;<a class="code" href="structecat7__mainheader.html#a56bb68347079aca9062f24fe0fb24a63">calibration_units</a>=1;
<a name="l00336"></a>00336       h-&gt;<a class="code" href="structecat7__mainheader.html#a9ee5c316fc447e305593efc25f51dc67">calibration_units_label</a>=1;
<a name="l00337"></a>00337       strcpy(h-&gt;<a class="code" href="structecat7__mainheader.html#aa6bbc6d3bc1a60f51dd721db2c3be09d">data_units</a>, <span class="stringliteral">&quot;uCi/cc&quot;</span>);
<a name="l00338"></a>00338       <span class="keywordflow">break</span>;
<a name="l00339"></a>00339     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a93b533e892e5bcdb76d31beabd825aab">IMGUNIT_UMOL_PER_MIN_PER_100G</a>:
<a name="l00340"></a>00340       h-&gt;<a class="code" href="structecat7__mainheader.html#a56bb68347079aca9062f24fe0fb24a63">calibration_units</a>=1;
<a name="l00341"></a>00341       h-&gt;<a class="code" href="structecat7__mainheader.html#a9ee5c316fc447e305593efc25f51dc67">calibration_units_label</a>=1;
<a name="l00342"></a>00342       strcpy(h-&gt;<a class="code" href="structecat7__mainheader.html#aa6bbc6d3bc1a60f51dd721db2c3be09d">data_units</a>, <span class="stringliteral">&quot;umol/min/100g&quot;</span>);
<a name="l00343"></a>00343       <span class="keywordflow">break</span>;
<a name="l00344"></a>00344     <span class="keywordflow">case</span> <a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a14e0838f313f10547c94907543a0e1e7">IMGUNIT_MG_PER_MIN_PER_100G</a>:
<a name="l00345"></a>00345       h-&gt;<a class="code" href="structecat7__mainheader.html#a56bb68347079aca9062f24fe0fb24a63">calibration_units</a>=1;
<a name="l00346"></a>00346       h-&gt;<a class="code" href="structecat7__mainheader.html#a9ee5c316fc447e305593efc25f51dc67">calibration_units_label</a>=1;
<a name="l00347"></a>00347       strcpy(h-&gt;<a class="code" href="structecat7__mainheader.html#aa6bbc6d3bc1a60f51dd721db2c3be09d">data_units</a>, <span class="stringliteral">&quot;mg/min/100g&quot;</span>);
<a name="l00348"></a>00348       <span class="keywordflow">break</span>;
<a name="l00349"></a>00349     <span class="keywordflow">default</span>:
<a name="l00350"></a>00350       h-&gt;<a class="code" href="structecat7__mainheader.html#a56bb68347079aca9062f24fe0fb24a63">calibration_units</a>=2;
<a name="l00351"></a>00351       h-&gt;<a class="code" href="structecat7__mainheader.html#a9ee5c316fc447e305593efc25f51dc67">calibration_units_label</a>=0;
<a name="l00352"></a>00352       strcpy(h-&gt;<a class="code" href="structecat7__mainheader.html#aa6bbc6d3bc1a60f51dd721db2c3be09d">data_units</a>, <span class="stringliteral">&quot;&quot;</span>);
<a name="l00353"></a>00353       <span class="keywordflow">break</span>;
<a name="l00354"></a>00354   }
<a name="l00355"></a>00355 }
<a name="l00356"></a>00356 <span class="comment">/*****************************************************************************/</span>
<a name="l00357"></a>00357 
<a name="l00358"></a>00358 <span class="comment">/*****************************************************************************/</span>
<a name="l00365"></a><a class="code" href="imgunit_8h.html#afdd2838260ccde7ed239666ca05dcf99">00365</a> <span class="keywordtype">char</span> *<a class="code" href="imgunit_8c.html#afdd2838260ccde7ed239666ca05dcf99">imgUnit</a>(<span class="keywordtype">int</span> dunit) {
<a name="l00366"></a>00366   <span class="keywordtype">int</span> n=0;
<a name="l00367"></a>00367   <span class="keywordflow">while</span>(<a class="code" href="imgunit_8c.html#aadd4487a750a028338a419a3c8f65ebb">img_unit_string</a>[n]!=0) n++;
<a name="l00368"></a>00368   <span class="keywordflow">if</span>(dunit&lt;0 || dunit&gt;n-1) <span class="keywordflow">return</span>(<a class="code" href="imgunit_8c.html#aadd4487a750a028338a419a3c8f65ebb">img_unit_string</a>[<a class="code" href="imgunit_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a9f331f5d5ae9c32bb046f1203f19b186">IMGUNIT_UNKNOWN</a>]);
<a name="l00369"></a>00369   <span class="keywordflow">else</span> <span class="keywordflow">return</span>(<a class="code" href="imgunit_8c.html#aadd4487a750a028338a419a3c8f65ebb">img_unit_string</a>[dunit]);
<a name="l00370"></a>00370 }
<a name="l00371"></a>00371 <span class="comment">/*****************************************************************************/</span>
<a name="l00372"></a>00372 
<a name="l00373"></a>00373 <span class="comment">/*****************************************************************************/</span>
<a name="l00377"></a><a class="code" href="imgunit_8h.html#a34cc498e8938de81cdb8d22954faf647">00377</a> <span class="keywordtype">int</span> <a class="code" href="imgunit_8c.html#a34cc498e8938de81cdb8d22954faf647">imgSetUnit</a>(<a class="code" href="structIMG.html">IMG</a> *img, <span class="keywordtype">char</span> *unit)
<a name="l00378"></a>00378 {
<a name="l00379"></a>00379   <span class="keywordtype">int</span> new_unit;
<a name="l00380"></a>00380 
<a name="l00381"></a>00381   <span class="keywordflow">if</span>(img==NULL || unit==NULL) <span class="keywordflow">return</span>(1);
<a name="l00382"></a>00382   new_unit=<a class="code" href="imgunit_8c.html#a72fe74ec5a539bc93f4d9bce45f67905">imgUnitId</a>(unit); <span class="keywordflow">if</span>(new_unit&lt;0) <span class="keywordflow">return</span>(1-new_unit);
<a name="l00383"></a>00383   img-&gt;<a class="code" href="structIMG.html#a53ee896ca7a94425dcf45c51eaf0a1d3">unit</a>=new_unit;
<a name="l00384"></a>00384   <span class="keywordflow">return</span>(0);
<a name="l00385"></a>00385 }
<a name="l00386"></a>00386 <span class="comment">/*****************************************************************************/</span>
<a name="l00387"></a>00387 
<a name="l00388"></a>00388 <span class="comment">/*****************************************************************************/</span>
<a name="l00389"></a>00389 
</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>