Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 60f1dc962abad0f3b492991a4fbef9be > files > 4110

vtk-doc-5.4.2-5mdv2010.0.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>VTK: dox/Filtering/vtkPiecewiseFunction.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="classes.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
<h1>dox/Filtering/vtkPiecewiseFunction.h</h1><a href="a02318.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">  Program:   Visualization Toolkit</span>
<a name="l00004"></a>00004 <span class="comment">  Module:    $RCSfile: vtkPiecewiseFunction.h,v $</span>
<a name="l00005"></a>00005 <span class="comment"></span>
<a name="l00006"></a>00006 <span class="comment">  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen</span>
<a name="l00007"></a>00007 <span class="comment">  All rights reserved.</span>
<a name="l00008"></a>00008 <span class="comment">  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.</span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment">     This software is distributed WITHOUT ANY WARRANTY; without even</span>
<a name="l00011"></a>00011 <span class="comment">     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR</span>
<a name="l00012"></a>00012 <span class="comment">     PURPOSE.  See the above copyright notice for more information.</span>
<a name="l00013"></a>00013 <span class="comment"></span>
<a name="l00014"></a>00014 <span class="comment">=========================================================================*/</span>
<a name="l00015"></a>00015 
<a name="l00039"></a>00039 <span class="preprocessor">#ifndef __vtkPiecewiseFunction_h</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#define __vtkPiecewiseFunction_h</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span>
<a name="l00042"></a>00042 <span class="preprocessor">#include "<a class="code" href="a02221.html">vtkDataObject.h</a>"</span>
<a name="l00043"></a>00043 
<a name="l00044"></a>00044 <span class="keyword">class </span>vtkPiecewiseFunctionInternals;
<a name="l00045"></a>00045 
<a name="l00046"></a><a class="code" href="a01215.html">00046</a> <span class="keyword">class </span><a class="code" href="a02170.html#95ced7977a6b6b1bf9f38bf04e3835b6">VTK_FILTERING_EXPORT</a> <a class="code" href="a01215.html" title="Defines a 1D piecewise function.">vtkPiecewiseFunction</a> : <span class="keyword">public</span> <a class="code" href="a00362.html" title="general representation of visualization data">vtkDataObject</a>
<a name="l00047"></a>00047 {
<a name="l00048"></a>00048 <span class="keyword">public</span>:
<a name="l00049"></a>00049   <span class="keyword">static</span> <a class="code" href="a01215.html" title="Defines a 1D piecewise function.">vtkPiecewiseFunction</a> *<a class="code" href="a00362.html#13d4f201619a19a9b39978e92239cd98">New</a>();
<a name="l00050"></a><a class="code" href="a01215.html#7ced0008e4fd0fa6898481526ccc1788">00050</a>   vtkTypeRevisionMacro(<a class="code" href="a01215.html" title="Defines a 1D piecewise function.">vtkPiecewiseFunction</a>,<a class="code" href="a00362.html" title="general representation of visualization data">vtkDataObject</a>);
<a name="l00051"></a>00051   <span class="keywordtype">void</span> <a class="code" href="a00362.html#41fc1279a91124320705e5fc98f623c7">PrintSelf</a>(ostream&amp; os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent);
<a name="l00052"></a>00052 
<a name="l00053"></a>00053   <span class="keywordtype">void</span> <a class="code" href="a00362.html#455b17df288af545f40c3a013714f114">DeepCopy</a>( <a class="code" href="a00362.html" title="general representation of visualization data">vtkDataObject</a> *f );
<a name="l00054"></a>00054   <span class="keywordtype">void</span> <a class="code" href="a00362.html#04a5fb60bdbc929ce84f0cd14d911dbe">ShallowCopy</a>( <a class="code" href="a00362.html" title="general representation of visualization data">vtkDataObject</a> *f );
<a name="l00055"></a>00055 
<a name="l00057"></a><a class="code" href="a01215.html#54b3889b41725cc63cf2965ecec6a018">00057</a>   <span class="keywordtype">int</span> <a class="code" href="a00362.html#a29b32b4beac6a90d31d4751f427add7">GetDataObjectType</a>() {<span class="keywordflow">return</span> <a class="code" href="a02149.html#c27044643b070d43eec5f6a7088d23d1">VTK_PIECEWISE_FUNCTION</a>;};
<a name="l00058"></a>00058   
<a name="l00060"></a>00060   <span class="keywordtype">int</span>  GetSize();
<a name="l00061"></a>00061 
<a name="l00063"></a>00063 
<a name="l00066"></a>00066   <span class="keywordtype">int</span> AddPoint( <span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y );
<a name="l00067"></a>00067   <span class="keywordtype">int</span> AddPoint( <span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <span class="keywordtype">double</span> midpoint, <span class="keywordtype">double</span> sharpness );
<a name="l00068"></a>00068   <span class="keywordtype">int</span> RemovePoint( <span class="keywordtype">double</span> x );
<a name="l00070"></a>00070 
<a name="l00072"></a>00072   <span class="keywordtype">void</span> RemoveAllPoints();
<a name="l00073"></a>00073 
<a name="l00078"></a>00078   <span class="keywordtype">void</span> AddSegment( <span class="keywordtype">double</span> x1, <span class="keywordtype">double</span> y1, <span class="keywordtype">double</span> x2, <span class="keywordtype">double</span> y2 );
<a name="l00079"></a>00079 
<a name="l00082"></a>00082   <span class="keywordtype">double</span> GetValue( <span class="keywordtype">double</span> x );
<a name="l00083"></a>00083 
<a name="l00085"></a>00085 
<a name="l00087"></a>00087   <span class="keywordtype">int</span> GetNodeValue( <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210e519c5019582479480124c44722a451f">index</a>, <span class="keywordtype">double</span> val[4] );
<a name="l00088"></a>00088   <span class="keywordtype">int</span> SetNodeValue( <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210e519c5019582479480124c44722a451f">index</a>, <span class="keywordtype">double</span> val[4] );
<a name="l00090"></a>00090   
<a name="l00092"></a>00092 
<a name="l00097"></a>00097   <span class="keywordtype">double</span> *GetDataPointer();
<a name="l00098"></a>00098   <span class="keywordtype">void</span> FillFromDataPointer(<span class="keywordtype">int</span>, <span class="keywordtype">double</span>*);
<a name="l00100"></a>00100 
<a name="l00102"></a>00102 
<a name="l00103"></a>00103   vtkGetVector2Macro( Range, <span class="keywordtype">double</span> );
<a name="l00105"></a>00105 
<a name="l00108"></a>00108   <span class="keywordtype">int</span> AdjustRange(<span class="keywordtype">double</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21076786d084c43d32f242990f932679539">range</a>[2]);
<a name="l00109"></a>00109 
<a name="l00111"></a>00111 
<a name="l00113"></a>00113   <span class="keywordtype">void</span> GetTable( <span class="keywordtype">double</span> x1, <span class="keywordtype">double</span> x2, <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210e3d5e7c015dff08d8daf72a0102e1444">size</a>, <span class="keywordtype">float</span> *table, <span class="keywordtype">int</span> stride=1 );
<a name="l00114"></a>00114   <span class="keywordtype">void</span> GetTable( <span class="keywordtype">double</span> x1, <span class="keywordtype">double</span> x2, <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210e3d5e7c015dff08d8daf72a0102e1444">size</a>, <span class="keywordtype">double</span> *table, <span class="keywordtype">int</span> stride=1 );
<a name="l00116"></a>00116 
<a name="l00118"></a>00118 
<a name="l00122"></a>00122   <span class="keywordtype">void</span> BuildFunctionFromTable( <span class="keywordtype">double</span> x1, <span class="keywordtype">double</span> x2, <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210e3d5e7c015dff08d8daf72a0102e1444">size</a>,
<a name="l00123"></a>00123                                <span class="keywordtype">double</span> *table, <span class="keywordtype">int</span> stride=1 );
<a name="l00125"></a>00125   
<a name="l00127"></a>00127 
<a name="l00133"></a>00133   vtkSetMacro( Clamping, <span class="keywordtype">int</span> );
<a name="l00134"></a>00134   vtkGetMacro( Clamping, <span class="keywordtype">int</span> );
<a name="l00135"></a>00135   vtkBooleanMacro( Clamping, <span class="keywordtype">int</span> );
<a name="l00137"></a>00137 
<a name="l00143"></a>00143   <span class="keyword">const</span> <span class="keywordtype">char</span>  *GetType();
<a name="l00144"></a>00144 
<a name="l00147"></a>00147   <span class="keywordtype">double</span> GetFirstNonZeroValue();
<a name="l00148"></a>00148 
<a name="l00152"></a>00152   <span class="keywordtype">void</span> <a class="code" href="a00362.html#125a61962658df7dd87d0c5755c06193">Initialize</a>();
<a name="l00153"></a>00153 
<a name="l00154"></a>00154   <span class="comment">//BTX</span>
<a name="l00156"></a>00156 <span class="comment"></span>
<a name="l00157"></a>00157   <span class="keyword">static</span> <a class="code" href="a01215.html" title="Defines a 1D piecewise function.">vtkPiecewiseFunction</a>* <a class="code" href="a00362.html#d7ebc4f6ec32a1db7e6cfc0ff6974559">GetData</a>(<a class="code" href="a00872.html" title="Store vtkAlgorithm input/output information.">vtkInformation</a>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21023da246d4a744e861548382bb79fad81">info</a>);
<a name="l00158"></a>00158   <span class="keyword">static</span> <a class="code" href="a01215.html" title="Defines a 1D piecewise function.">vtkPiecewiseFunction</a>* <a class="code" href="a00362.html#d7ebc4f6ec32a1db7e6cfc0ff6974559">GetData</a>(<a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a>* v, <span class="keywordtype">int</span> i=0);
<a name="l00159"></a>00159   <span class="comment">//ETX</span>
<a name="l00161"></a>00161 <span class="comment"></span>
<a name="l00163"></a>00163 
<a name="l00165"></a>00165   vtkSetMacro(AllowDuplicateScalars, <span class="keywordtype">int</span>);
<a name="l00166"></a>00166   vtkGetMacro(AllowDuplicateScalars, <span class="keywordtype">int</span>);
<a name="l00167"></a>00167   vtkBooleanMacro(AllowDuplicateScalars, <span class="keywordtype">int</span>);
<a name="l00169"></a>00169 
<a name="l00170"></a>00170 <span class="keyword">protected</span>:
<a name="l00171"></a>00171   <a class="code" href="a01215.html" title="Defines a 1D piecewise function.">vtkPiecewiseFunction</a>();
<a name="l00172"></a>00172   ~<a class="code" href="a01215.html" title="Defines a 1D piecewise function.">vtkPiecewiseFunction</a>();
<a name="l00173"></a>00173 
<a name="l00174"></a>00174   <span class="comment">// The internal STL structures</span>
<a name="l00175"></a><a class="code" href="a01215.html#76396ad7f1547c2288528e844e4aec9d">00175</a>   vtkPiecewiseFunctionInternals *Internal;
<a name="l00176"></a>00176   
<a name="l00177"></a>00177   <span class="comment">// Determines the function value outside of defined points</span>
<a name="l00178"></a>00178   <span class="comment">// Zero = always return 0.0 outside of defined points</span>
<a name="l00179"></a>00179   <span class="comment">// One  = clamp to the lowest value below defined points and</span>
<a name="l00180"></a>00180   <span class="comment">//        highest value above defined points</span>
<a name="l00181"></a><a class="code" href="a01215.html#846152d7439d88a330a1db80227f4ae3">00181</a>   <span class="keywordtype">int</span>   Clamping;
<a name="l00182"></a>00182 
<a name="l00183"></a>00183   <span class="comment">// Array of points ((X,Y) pairs)</span>
<a name="l00184"></a><a class="code" href="a01215.html#1e7bc6592483fe98a927fec348f405c5">00184</a>   <span class="keywordtype">double</span> *Function;
<a name="l00185"></a>00185 
<a name="l00186"></a>00186   <span class="comment">// Min and max range of function point locations</span>
<a name="l00187"></a><a class="code" href="a01215.html#81e6039780b0e3ac92492f7958c5b260">00187</a>   <span class="keywordtype">double</span> Range[2];
<a name="l00188"></a>00188 
<a name="l00189"></a>00189   <span class="comment">// Internal method to sort the vector and update the</span>
<a name="l00190"></a>00190   <span class="comment">// Range whenever a node is added or removed</span>
<a name="l00191"></a>00191   <span class="keywordtype">void</span> SortAndUpdateRange();
<a name="l00192"></a>00192   
<a name="l00193"></a><a class="code" href="a01215.html#ace8d742b2b3a29b5ab3d898908da57b">00193</a>   <span class="keywordtype">int</span> AllowDuplicateScalars;
<a name="l00194"></a>00194 
<a name="l00195"></a>00195 <span class="keyword">private</span>:
<a name="l00196"></a>00196   <a class="code" href="a01215.html" title="Defines a 1D piecewise function.">vtkPiecewiseFunction</a>(<span class="keyword">const</span> <a class="code" href="a01215.html" title="Defines a 1D piecewise function.">vtkPiecewiseFunction</a>&amp;);  <span class="comment">// Not implemented.</span>
<a name="l00197"></a>00197   <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a01215.html" title="Defines a 1D piecewise function.">vtkPiecewiseFunction</a>&amp;);  <span class="comment">// Not implemented.</span>
<a name="l00198"></a>00198 };
<a name="l00199"></a>00199 
<a name="l00200"></a>00200 <span class="preprocessor">#endif</span>
<a name="l00201"></a>00201 <span class="preprocessor"></span>
<a name="l00202"></a>00202 
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:16 2009 for VTK by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>