Sophie

Sophie

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

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/Graphics/vtkThreshold.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/Graphics/vtkThreshold.h</h1><a href="a02693.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: vtkThreshold.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="l00039"></a>00039 <span class="preprocessor">#ifndef __vtkThreshold_h</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#define __vtkThreshold_h</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span>
<a name="l00042"></a>00042 <span class="preprocessor">#include "<a class="code" href="a02396.html">vtkUnstructuredGridAlgorithm.h</a>"</span>
<a name="l00043"></a>00043 
<a name="l00044"></a><a class="code" href="a02693.html#8610b802a20283e5788696f228e409df">00044</a> <span class="preprocessor">#define VTK_ATTRIBUTE_MODE_DEFAULT         0</span>
<a name="l00045"></a><a class="code" href="a02693.html#54a90459ac57d2ad28ff4c00fca9095e">00045</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_ATTRIBUTE_MODE_USE_POINT_DATA  1</span>
<a name="l00046"></a><a class="code" href="a02693.html#d2b01aeebce45826a75363cda1d67dbf">00046</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_ATTRIBUTE_MODE_USE_CELL_DATA   2</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span>
<a name="l00048"></a>00048 <span class="comment">// order / values are important because of the SetClampMacro</span>
<a name="l00049"></a><a class="code" href="a02693.html#2c26060f6512386a0a3ebb0b8ec1d393">00049</a> <span class="preprocessor">#define VTK_COMPONENT_MODE_USE_SELECTED    0</span>
<a name="l00050"></a><a class="code" href="a02693.html#94bc64fa0d12df80c36e413a6ac5e0c0">00050</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_COMPONENT_MODE_USE_ALL         1</span>
<a name="l00051"></a><a class="code" href="a02693.html#cff076f852eee53a5e82f528d2e85ba4">00051</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_COMPONENT_MODE_USE_ANY         2</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span>
<a name="l00053"></a>00053 <span class="keyword">class </span><a class="code" href="a00356.html" title="abstract superclass for arrays of numeric data">vtkDataArray</a>;
<a name="l00054"></a>00054 
<a name="l00055"></a><a class="code" href="a01707.html">00055</a> <span class="keyword">class </span><a class="code" href="a02170.html#c3c1ffe2fe47b9b70ba90182b7860cce">VTK_GRAPHICS_EXPORT</a> <a class="code" href="a01707.html" title="extracts cells where scalar value in cell satisfies threshold criterion">vtkThreshold</a> : <span class="keyword">public</span> <a class="code" href="a01790.html" title="Superclass for algorithms that produce only unstructured grid as output.">vtkUnstructuredGridAlgorithm</a>
<a name="l00056"></a>00056 {
<a name="l00057"></a>00057 <span class="keyword">public</span>:
<a name="l00058"></a>00058   <span class="keyword">static</span> <a class="code" href="a01707.html" title="extracts cells where scalar value in cell satisfies threshold criterion">vtkThreshold</a> *<a class="code" href="a01790.html#2646137e0d32c31ea2f5d6c36a839c5e">New</a>();
<a name="l00059"></a><a class="code" href="a01707.html#6aebc42cf4e73da5b626268e31de36fd">00059</a>   vtkTypeRevisionMacro(<a class="code" href="a01707.html" title="extracts cells where scalar value in cell satisfies threshold criterion">vtkThreshold</a>,<a class="code" href="a01790.html" title="Superclass for algorithms that produce only unstructured grid as output.">vtkUnstructuredGridAlgorithm</a>);
<a name="l00060"></a>00060   <span class="keywordtype">void</span> <a class="code" href="a01790.html#13d193ef6fd94356f3306d3e799bc9cc">PrintSelf</a>(ostream&amp; os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent);
<a name="l00061"></a>00061 
<a name="l00064"></a>00064   <span class="keywordtype">void</span> ThresholdByLower(<span class="keywordtype">double</span> lower);
<a name="l00065"></a>00065 
<a name="l00068"></a>00068   <span class="keywordtype">void</span> ThresholdByUpper(<span class="keywordtype">double</span> upper);
<a name="l00069"></a>00069 
<a name="l00072"></a>00072   <span class="keywordtype">void</span> ThresholdBetween(<span class="keywordtype">double</span> lower, <span class="keywordtype">double</span> upper);
<a name="l00073"></a>00073 
<a name="l00075"></a>00075 
<a name="l00076"></a>00076   vtkGetMacro(UpperThreshold,<span class="keywordtype">double</span>);
<a name="l00077"></a>00077   vtkGetMacro(LowerThreshold,<span class="keywordtype">double</span>);
<a name="l00079"></a>00079 
<a name="l00081"></a>00081 
<a name="l00087"></a>00087   vtkSetMacro(AttributeMode,<span class="keywordtype">int</span>);
<a name="l00088"></a>00088   vtkGetMacro(AttributeMode,<span class="keywordtype">int</span>);
<a name="l00089"></a><a class="code" href="a01707.html#97bd386a4c03b0f74972dca366f6b4b6">00089</a>   <span class="keywordtype">void</span> SetAttributeModeToDefault() 
<a name="l00090"></a>00090     {this-&gt;SetAttributeMode(<a class="code" href="a02467.html#8610b802a20283e5788696f228e409df">VTK_ATTRIBUTE_MODE_DEFAULT</a>);};
<a name="l00091"></a><a class="code" href="a01707.html#34c0b0e47bd208877416b087eeb60a0d">00091</a>   <span class="keywordtype">void</span> SetAttributeModeToUsePointData() 
<a name="l00092"></a>00092     {this-&gt;SetAttributeMode(<a class="code" href="a02467.html#54a90459ac57d2ad28ff4c00fca9095e">VTK_ATTRIBUTE_MODE_USE_POINT_DATA</a>);};
<a name="l00093"></a><a class="code" href="a01707.html#6201ef5faae64283b576362b7d5cb25d">00093</a>   <span class="keywordtype">void</span> SetAttributeModeToUseCellData() 
<a name="l00094"></a>00094     {this-&gt;SetAttributeMode(<a class="code" href="a02467.html#d2b01aeebce45826a75363cda1d67dbf">VTK_ATTRIBUTE_MODE_USE_CELL_DATA</a>);};
<a name="l00095"></a>00095   <span class="keyword">const</span> <span class="keywordtype">char</span> *GetAttributeModeAsString();
<a name="l00097"></a>00097 
<a name="l00099"></a>00099 
<a name="l00105"></a>00105   vtkSetClampMacro(ComponentMode,<span class="keywordtype">int</span>,
<a name="l00106"></a>00106                    <a class="code" href="a02693.html#2c26060f6512386a0a3ebb0b8ec1d393">VTK_COMPONENT_MODE_USE_SELECTED</a>,
<a name="l00107"></a>00107                    <a class="code" href="a02693.html#cff076f852eee53a5e82f528d2e85ba4">VTK_COMPONENT_MODE_USE_ANY</a>);
<a name="l00108"></a>00108   vtkGetMacro(ComponentMode,<span class="keywordtype">int</span>);
<a name="l00109"></a><a class="code" href="a01707.html#43972a91f080d0359ac02fb51b4d12a4">00109</a>   <span class="keywordtype">void</span> SetComponentModeToUseSelected() 
<a name="l00110"></a>00110     {this-&gt;SetComponentMode(<a class="code" href="a02693.html#2c26060f6512386a0a3ebb0b8ec1d393">VTK_COMPONENT_MODE_USE_SELECTED</a>);};
<a name="l00111"></a><a class="code" href="a01707.html#4e20d6f4f0032cb5871637e8381c0a99">00111</a>   <span class="keywordtype">void</span> SetComponentModeToUseAll() 
<a name="l00112"></a>00112     {this-&gt;SetComponentMode(<a class="code" href="a02693.html#94bc64fa0d12df80c36e413a6ac5e0c0">VTK_COMPONENT_MODE_USE_ALL</a>);};
<a name="l00113"></a><a class="code" href="a01707.html#46f5c7cbb0ee77202fd6f041306af3df">00113</a>   <span class="keywordtype">void</span> SetComponentModeToUseAny() 
<a name="l00114"></a>00114     {this-&gt;SetComponentMode(<a class="code" href="a02693.html#cff076f852eee53a5e82f528d2e85ba4">VTK_COMPONENT_MODE_USE_ANY</a>);};
<a name="l00115"></a>00115   <span class="keyword">const</span> <span class="keywordtype">char</span> *GetComponentModeAsString();
<a name="l00117"></a>00117   
<a name="l00119"></a>00119 
<a name="l00121"></a>00121   vtkSetClampMacro(SelectedComponent,<span class="keywordtype">int</span>,0,<a class="code" href="a02149.html#f0ba85e5e5ccbbc44fbe1d494dc47399">VTK_INT_MAX</a>);
<a name="l00122"></a>00122   vtkGetMacro(SelectedComponent,<span class="keywordtype">int</span>);
<a name="l00124"></a>00124   
<a name="l00126"></a>00126 
<a name="l00130"></a>00130   vtkSetMacro(AllScalars,<span class="keywordtype">int</span>);
<a name="l00131"></a>00131   vtkGetMacro(AllScalars,<span class="keywordtype">int</span>);
<a name="l00132"></a>00132   vtkBooleanMacro(AllScalars,<span class="keywordtype">int</span>);
<a name="l00134"></a>00134 
<a name="l00136"></a>00136 
<a name="l00138"></a><a class="code" href="a01707.html#5bc0990fbf2fe38081992133a7c83392">00138</a>   <span class="keywordtype">void</span> SetPointsDataTypeToDouble() { this-&gt;SetPointsDataType( <a class="code" href="a02149.html#65081589ba940a5cf4aeb95b6be1f613">VTK_DOUBLE</a> ); }
<a name="l00139"></a><a class="code" href="a01707.html#79389159d9de2671d41e9892fbfef4e7">00139</a>   <span class="keywordtype">void</span> SetPointsDataTypeToFloat()  { this-&gt;SetPointsDataType( <a class="code" href="a02149.html#aa048913d336249efc600e3c5a144c42">VTK_FLOAT</a>  ); }
<a name="l00140"></a>00140   vtkSetMacro( PointsDataType, <span class="keywordtype">int</span> );
<a name="l00141"></a>00141   vtkGetMacro( PointsDataType, <span class="keywordtype">int</span> );
<a name="l00143"></a>00143   
<a name="l00144"></a>00144 <span class="keyword">protected</span>:
<a name="l00145"></a>00145   <a class="code" href="a01707.html" title="extracts cells where scalar value in cell satisfies threshold criterion">vtkThreshold</a>();
<a name="l00146"></a>00146   ~<a class="code" href="a01707.html" title="extracts cells where scalar value in cell satisfies threshold criterion">vtkThreshold</a>();
<a name="l00147"></a>00147 
<a name="l00148"></a>00148   <span class="comment">// Usual data generation method</span>
<a name="l00149"></a>00149   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a01790.html#c245179e9e4f4d4f83bf29fd4933b985">RequestData</a>(<a class="code" href="a00872.html" title="Store vtkAlgorithm input/output information.">vtkInformation</a> *, <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a> **, <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a> *);
<a name="l00150"></a>00150 
<a name="l00151"></a>00151   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a01790.html#1eb860b284f61b78bd00d5776545bd87">FillInputPortInformation</a>(<span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210710cb6d12e418b21e8fb3d79ac32f51c">port</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="l00152"></a>00152 
<a name="l00153"></a><a class="code" href="a01707.html#c23c5ad919226668f32550d618a5818f">00153</a>   <span class="keywordtype">int</span>    AllScalars;
<a name="l00154"></a><a class="code" href="a01707.html#5b33c1b6262967346e43710cc1be82b2">00154</a>   <span class="keywordtype">double</span> LowerThreshold;
<a name="l00155"></a><a class="code" href="a01707.html#9140e12c74393a598441952e139cf87b">00155</a>   <span class="keywordtype">double</span> UpperThreshold;
<a name="l00156"></a><a class="code" href="a01707.html#9c61e24467ead93fca8c93b195594895">00156</a>   <span class="keywordtype">int</span>    AttributeMode;
<a name="l00157"></a><a class="code" href="a01707.html#cbee85e1814ab029ab0fd044f21d1588">00157</a>   <span class="keywordtype">int</span>    ComponentMode;
<a name="l00158"></a><a class="code" href="a01707.html#f81ec9a9ffd6c20200186658a0feea3b">00158</a>   <span class="keywordtype">int</span>    SelectedComponent;
<a name="l00159"></a><a class="code" href="a01707.html#8757d70d00ea57b38e0369f03a494b2d">00159</a>   <span class="keywordtype">int</span>    PointsDataType;
<a name="l00160"></a>00160   
<a name="l00161"></a>00161   <span class="comment">//BTX</span>
<a name="l00162"></a>00162   int (<a class="code" href="a01707.html" title="extracts cells where scalar value in cell satisfies threshold criterion">vtkThreshold</a>::*ThresholdFunction)(<span class="keywordtype">double</span> s);
<a name="l00163"></a>00163   <span class="comment">//ETX</span>
<a name="l00164"></a>00164 
<a name="l00165"></a><a class="code" href="a01707.html#d65d67100b74179bd7a80478271dfb13">00165</a>   <span class="keywordtype">int</span> Lower(<span class="keywordtype">double</span> s) {<span class="keywordflow">return</span> ( s &lt;= this-&gt;LowerThreshold ? 1 : 0 );};
<a name="l00166"></a><a class="code" href="a01707.html#184d2060c71e14fb0bdd1692dfeedd7c">00166</a>   <span class="keywordtype">int</span> Upper(<span class="keywordtype">double</span> s) {<span class="keywordflow">return</span> ( s &gt;= this-&gt;UpperThreshold ? 1 : 0 );};
<a name="l00167"></a><a class="code" href="a01707.html#b593d4d1376131b9e0d3c3dbfc81c97a">00167</a>   <span class="keywordtype">int</span> Between(<span class="keywordtype">double</span> s) {<span class="keywordflow">return</span> ( s &gt;= this-&gt;LowerThreshold ? 
<a name="l00168"></a>00168                                ( s &lt;= this-&gt;UpperThreshold ? 1 : 0 ) : 0 );};
<a name="l00169"></a>00169 
<a name="l00170"></a>00170   <span class="keywordtype">int</span> EvaluateComponents( <a class="code" href="a00356.html" title="abstract superclass for arrays of numeric data">vtkDataArray</a> *scalars, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> <span class="keywordtype">id</span> );
<a name="l00171"></a>00171   
<a name="l00172"></a>00172 <span class="keyword">private</span>:
<a name="l00173"></a>00173   <a class="code" href="a01707.html" title="extracts cells where scalar value in cell satisfies threshold criterion">vtkThreshold</a>(<span class="keyword">const</span> <a class="code" href="a01707.html" title="extracts cells where scalar value in cell satisfies threshold criterion">vtkThreshold</a>&amp;);  <span class="comment">// Not implemented.</span>
<a name="l00174"></a>00174   <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a01707.html" title="extracts cells where scalar value in cell satisfies threshold criterion">vtkThreshold</a>&amp;);  <span class="comment">// Not implemented.</span>
<a name="l00175"></a>00175 };
<a name="l00176"></a>00176 
<a name="l00177"></a>00177 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:30 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>