<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>HippoDraw Class Library</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> <link rel="shortcut icon" href="hippoApp.ico"> </head><body> <!-- Generated by Doxygen 1.6.2 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="dir_e91d7d57230b93275afa36a649c1c346.html">colorreps</a> </div> </div> <div class="contents"> <h1>BinToColor.cxx</h1><a href="BinToColor_8cxx.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <a name="l00012"></a>00012 <span class="preprocessor">#include "<a class="code" href="BinToColor_8h.html" title="hippodraw::BinToColor class interface">BinToColor.h</a>"</span> <a name="l00013"></a>00013 <span class="keyword">using</span> std :: string; <a name="l00014"></a>00014 <a name="l00015"></a>00015 <span class="keyword">namespace </span>hippodraw { <a name="l00016"></a>00016 <a name="l00017"></a><a class="code" href="classhippodraw_1_1BinToColor.html#abc8a2250dbb0d643be64aa1f68dcc21b">00017</a> <a class="code" href="classhippodraw_1_1BinToColor.html#abc8a2250dbb0d643be64aa1f68dcc21b" title="The constructor.">BinToColor::BinToColor</a> ( <span class="keyword">const</span> <span class="keywordtype">char</span> * name ) <a name="l00018"></a>00018 : m_name ( name ) <a name="l00019"></a>00019 { <a name="l00020"></a>00020 } <a name="l00021"></a>00021 <a name="l00022"></a>00022 <span class="comment">// BinToColor::</span> <a name="l00023"></a>00023 <span class="comment">// BinToColor ( const std::string & name )</span> <a name="l00024"></a>00024 <span class="comment">// : m_name ( name )</span> <a name="l00025"></a>00025 <span class="comment">// {</span> <a name="l00026"></a>00026 <span class="comment">// }</span> <a name="l00027"></a>00027 <a name="l00028"></a><a class="code" href="classhippodraw_1_1BinToColor.html#ad1cdef5a7591d5fffa74b5c47148e896">00028</a> <a class="code" href="classhippodraw_1_1BinToColor.html#abc8a2250dbb0d643be64aa1f68dcc21b" title="The constructor.">BinToColor::BinToColor</a>( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1BinToColor.html" title="The base class for the value to the color transformation.">BinToColor</a> & bin_to_color ) <a name="l00029"></a>00029 : m_name ( bin_to_color.m_name ), <a name="l00030"></a>00030 m_dv ( bin_to_color.m_dv ), <a name="l00031"></a>00031 m_vmin ( bin_to_color.m_vmin ) <a name="l00032"></a>00032 { <a name="l00033"></a>00033 <a class="code" href="classhippodraw_1_1BinToColor.html#a81832d0db8b53d015516aadc7b13060b" title="A set of control points that might be used for the value to color transform.">m_control_points</a> = bin_to_color.<a class="code" href="classhippodraw_1_1BinToColor.html#a81832d0db8b53d015516aadc7b13060b" title="A set of control points that might be used for the value to color transform.">m_control_points</a>; <a name="l00034"></a>00034 } <a name="l00035"></a>00035 <a name="l00036"></a><a class="code" href="classhippodraw_1_1BinToColor.html#a3d3dcbd0ad5d00e1fb3613b45d8d89a3">00036</a> <a class="code" href="classhippodraw_1_1BinToColor.html#a3d3dcbd0ad5d00e1fb3613b45d8d89a3" title="The destructor.">BinToColor::~BinToColor</a>() <a name="l00037"></a>00037 { <a name="l00038"></a>00038 } <a name="l00039"></a>00039 <a name="l00040"></a>00040 <span class="keyword">const</span> std::string & <a name="l00041"></a>00041 <a class="code" href="classhippodraw_1_1BinToColor.html#af8370604529de0f829b8424e1288a104" title="Returns the name of the value to color transform.">BinToColor::</a> <a name="l00042"></a><a class="code" href="classhippodraw_1_1BinToColor.html#af8370604529de0f829b8424e1288a104">00042</a> <a class="code" href="classhippodraw_1_1BinToColor.html#af8370604529de0f829b8424e1288a104" title="Returns the name of the value to color transform.">name</a> ()<span class="keyword"> const</span> <a name="l00043"></a>00043 <span class="keyword"></span>{ <a name="l00044"></a>00044 <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1BinToColor.html#adb41893ba19e889e56c559f25fc1a68a" title="The name of this value transform.">m_name</a>; <a name="l00045"></a>00045 } <a name="l00046"></a>00046 <a name="l00047"></a><a class="code" href="classhippodraw_1_1BinToColor.html#aefa9ad4c052c74bda4ab2655e027c26f">00047</a> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1BinToColor.html#aefa9ad4c052c74bda4ab2655e027c26f" title="Sets the range of the values passed.">BinToColor::setRange</a>( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Range.html" title="Expresses a range of values.">Range</a> & r ) <a name="l00048"></a>00048 { <a name="l00049"></a>00049 <a class="code" href="classhippodraw_1_1BinToColor.html#ae9fd181c15aa94a45d97274d011e7b26" title="The distance of the expected values, i.e.">m_dv</a> = r.<a class="code" href="classhippodraw_1_1Range.html#ad207cb443e371f73f07e874c504f60c1" title="Returns the length of the range object.">length</a>(); <a name="l00050"></a>00050 <a class="code" href="classhippodraw_1_1BinToColor.html#a48e433b9625c7e774073dce89c270905" title="The minimum value expected.">m_vmin</a> = r.<a class="code" href="classhippodraw_1_1Range.html#a3865c37c86de4e4eafc43b6b40ef05b9" title="Returns the minimum of the range object.">low</a> (); <a name="l00051"></a>00051 } <a name="l00052"></a>00052 <a name="l00053"></a>00053 <a class="code" href="classhippodraw_1_1Range.html" title="Expresses a range of values.">Range</a> <a name="l00054"></a>00054 <a class="code" href="classhippodraw_1_1BinToColor.html#aa242fc96cb71313a51f25aefcf152e88" title="Get the Range of expected values.">BinToColor::</a> <a name="l00055"></a><a class="code" href="classhippodraw_1_1BinToColor.html#aa242fc96cb71313a51f25aefcf152e88">00055</a> <a class="code" href="classhippodraw_1_1BinToColor.html#aa242fc96cb71313a51f25aefcf152e88" title="Get the Range of expected values.">getRange</a> ()<span class="keyword"> const</span> <a name="l00056"></a>00056 <span class="keyword"></span>{ <a name="l00057"></a>00057 <a class="code" href="classhippodraw_1_1Range.html" title="Expresses a range of values.">Range</a> range ( <a class="code" href="classhippodraw_1_1BinToColor.html#a48e433b9625c7e774073dce89c270905" title="The minimum value expected.">m_vmin</a>, <a class="code" href="classhippodraw_1_1BinToColor.html#a48e433b9625c7e774073dce89c270905" title="The minimum value expected.">m_vmin</a> + <a class="code" href="classhippodraw_1_1BinToColor.html#ae9fd181c15aa94a45d97274d011e7b26" title="The distance of the expected values, i.e.">m_dv</a> ); <a name="l00058"></a>00058 <a name="l00059"></a>00059 <span class="keywordflow">return</span> range; <a name="l00060"></a>00060 } <a name="l00061"></a>00061 <a name="l00062"></a>00062 <span class="keywordtype">bool</span> <a name="l00063"></a>00063 <a class="code" href="classhippodraw_1_1BinToColor.html#af4a0148f4d3a3e07a421300b9521d135" title="Returns true if class has control points by which the value to color transform can...">BinToColor::</a> <a name="l00064"></a><a class="code" href="classhippodraw_1_1BinToColor.html#af4a0148f4d3a3e07a421300b9521d135">00064</a> <a class="code" href="classhippodraw_1_1BinToColor.html#af4a0148f4d3a3e07a421300b9521d135" title="Returns true if class has control points by which the value to color transform can...">hasControlPoints</a> ()<span class="keyword"> const</span> <a name="l00065"></a>00065 <span class="keyword"></span>{ <a name="l00066"></a>00066 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00067"></a>00067 } <a name="l00068"></a>00068 <a name="l00069"></a>00069 <span class="keyword">const</span> std::vector < double > & <a name="l00070"></a>00070 <a class="code" href="classhippodraw_1_1BinToColor.html#a3557580aa76c9bff88bb7767d2d1431b" title="Returns a list of control points.">BinToColor::</a> <a name="l00071"></a><a class="code" href="classhippodraw_1_1BinToColor.html#a3557580aa76c9bff88bb7767d2d1431b">00071</a> <a class="code" href="classhippodraw_1_1BinToColor.html#a3557580aa76c9bff88bb7767d2d1431b" title="Returns a list of control points.">getControlPoints</a> ()<span class="keyword"> const</span> <a name="l00072"></a>00072 <span class="keyword"></span>{ <a name="l00073"></a>00073 <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1BinToColor.html#a81832d0db8b53d015516aadc7b13060b" title="A set of control points that might be used for the value to color transform.">m_control_points</a>; <a name="l00074"></a>00074 } <a name="l00075"></a>00075 <a name="l00076"></a>00076 <span class="keywordtype">void</span> <a name="l00077"></a>00077 <a class="code" href="classhippodraw_1_1BinToColor.html#a6947116ba25f31da074809f0ca8b9cb2" title="Set the value of the control points.">BinToColor::</a> <a name="l00078"></a><a class="code" href="classhippodraw_1_1BinToColor.html#a6947116ba25f31da074809f0ca8b9cb2">00078</a> <a class="code" href="classhippodraw_1_1BinToColor.html#a6947116ba25f31da074809f0ca8b9cb2" title="Set the value of the control points.">setControlPoints</a> ( <span class="keyword">const</span> std::vector < double > & points ) <a name="l00079"></a>00079 { <a name="l00080"></a>00080 <a class="code" href="classhippodraw_1_1BinToColor.html#a81832d0db8b53d015516aadc7b13060b" title="A set of control points that might be used for the value to color transform.">m_control_points</a> = points; <a name="l00081"></a>00081 } <a name="l00082"></a>00082 <a name="l00083"></a>00083 <span class="keywordtype">bool</span> <a name="l00084"></a>00084 <a class="code" href="classhippodraw_1_1BinToColor.html#acd3fc1e3dfc1929003fd153689615756" title="Returns true if object can be user defined.">BinToColor::</a> <a name="l00085"></a><a class="code" href="classhippodraw_1_1BinToColor.html#acd3fc1e3dfc1929003fd153689615756">00085</a> <a class="code" href="classhippodraw_1_1BinToColor.html#acd3fc1e3dfc1929003fd153689615756" title="Returns true if object can be user defined.">isUserDefined</a> ()<span class="keyword"> const</span> <a name="l00086"></a>00086 <span class="keyword"></span>{ <a name="l00087"></a>00087 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00088"></a>00088 } <a name="l00089"></a>00089 <a name="l00090"></a>00090 <span class="comment">// added by Tao Aug 10,2006</span> <a name="l00091"></a>00091 <span class="comment">// return False in the base class BinToColor, reimplemented in BinToBlack and BinToGreyScale</span> <a name="l00092"></a>00092 <span class="keywordtype">bool</span> <a name="l00093"></a>00093 <a class="code" href="classhippodraw_1_1BinToColor.html#a7bac923c9e9891d5f395654c6b9d72f0" title="Returns true if object can accept changing color,i.e.">BinToColor::</a> <a name="l00094"></a><a class="code" href="classhippodraw_1_1BinToColor.html#a7bac923c9e9891d5f395654c6b9d72f0">00094</a> <a class="code" href="classhippodraw_1_1BinToColor.html#a7bac923c9e9891d5f395654c6b9d72f0" title="Returns true if object can accept changing color,i.e.">acceptChangeColor</a> ()<span class="keyword"> const</span> <a name="l00095"></a>00095 <span class="keyword"></span>{ <a name="l00096"></a>00096 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00097"></a>00097 } <a name="l00098"></a>00098 <a name="l00099"></a>00099 } <span class="comment">// namespace hippodraw</span> <a name="l00100"></a>00100 </pre></div></div> <hr size="1"><address style="align: right;"><small> Generated for HippoDraw Class Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0> </a> </small></address> </body> </html>