<!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/vtkBandedPolyDataContourFilter.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 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="classes.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <h1>dox/Graphics/vtkBandedPolyDataContourFilter.h</h1><a href="a02472.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: vtkBandedPolyDataContourFilter.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="l00043"></a>00043 <span class="preprocessor">#ifndef __vtkBandedPolyDataContourFilter_h</span> <a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor">#define __vtkBandedPolyDataContourFilter_h</span> <a name="l00045"></a>00045 <span class="preprocessor"></span> <a name="l00046"></a>00046 <span class="preprocessor">#include "<a class="code" href="a02331.html">vtkPolyDataAlgorithm.h</a>"</span> <a name="l00047"></a>00047 <a name="l00048"></a>00048 <span class="preprocessor">#include "<a class="code" href="a02002.html">vtkContourValues.h</a>"</span> <span class="comment">// Needed for inline methods</span> <a name="l00049"></a>00049 <a name="l00050"></a>00050 <span class="keyword">class </span><a class="code" href="a01250.html" title="represent and manipulate 3D points">vtkPoints</a>; <a name="l00051"></a>00051 <span class="keyword">class </span><a class="code" href="a00242.html" title="object to represent cell connectivity">vtkCellArray</a>; <a name="l00052"></a>00052 <span class="keyword">class </span><a class="code" href="a01242.html" title="represent and manipulate point attribute data">vtkPointData</a>; <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 <span class="keyword">class </span><a class="code" href="a00556.html" title="dynamic, self-adjusting array of float">vtkFloatArray</a>; <a name="l00055"></a>00055 <span class="keyword">class </span><a class="code" href="a00436.html" title="dynamic, self-adjusting array of double">vtkDoubleArray</a>; <a name="l00056"></a>00056 <a name="l00057"></a><a class="code" href="a02472.html#97611d1bafc15ac4ea5827febce45405">00057</a> <span class="preprocessor">#define VTK_SCALAR_MODE_INDEX 0</span> <a name="l00058"></a><a class="code" href="a02472.html#181724018362901b6648b05a128b8416">00058</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_SCALAR_MODE_VALUE 1</span> <a name="l00059"></a>00059 <span class="preprocessor"></span> <a name="l00060"></a><a class="code" href="a00158.html">00060</a> <span class="keyword">class </span><a class="code" href="a02170.html#c3c1ffe2fe47b9b70ba90182b7860cce">VTK_GRAPHICS_EXPORT</a> <a class="code" href="a00158.html" title="generate filled contours for vtkPolyData">vtkBandedPolyDataContourFilter</a> : <span class="keyword">public</span> <a class="code" href="a01261.html" title="Superclass for algorithms that produce only polydata as output.">vtkPolyDataAlgorithm</a> <a name="l00061"></a>00061 { <a name="l00062"></a>00062 <span class="keyword">public</span>: <a name="l00063"></a><a class="code" href="a00158.html#2b85cc4bc178c3db72c5e45cbf806896">00063</a> vtkTypeRevisionMacro(<a class="code" href="a00158.html" title="generate filled contours for vtkPolyData">vtkBandedPolyDataContourFilter</a>,<a class="code" href="a01261.html" title="Superclass for algorithms that produce only polydata as output.">vtkPolyDataAlgorithm</a>); <a name="l00064"></a>00064 <span class="keywordtype">void</span> <a class="code" href="a01261.html#e6d59a63261b0c56f8f473984ae0e1b6">PrintSelf</a>(ostream& os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent); <a name="l00065"></a>00065 <a name="l00067"></a>00067 <span class="keyword">static</span> <a class="code" href="a00158.html" title="generate filled contours for vtkPolyData">vtkBandedPolyDataContourFilter</a> *<a class="code" href="a01261.html#cf785ac526132296ff652c636f713b5e">New</a>(); <a name="l00068"></a>00068 <a name="l00070"></a>00070 <a name="l00074"></a>00074 <span class="keywordtype">void</span> SetValue(<span class="keywordtype">int</span> i, <span class="keywordtype">double</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>); <a name="l00075"></a>00075 <span class="keywordtype">double</span> GetValue(<span class="keywordtype">int</span> i); <a name="l00076"></a>00076 <span class="keywordtype">double</span> *GetValues(); <a name="l00077"></a>00077 <span class="keywordtype">void</span> GetValues(<span class="keywordtype">double</span> *contourValues); <a name="l00078"></a>00078 <span class="keywordtype">void</span> SetNumberOfContours(<span class="keywordtype">int</span> number); <a name="l00079"></a>00079 <span class="keywordtype">int</span> GetNumberOfContours(); <a name="l00080"></a>00080 <span class="keywordtype">void</span> GenerateValues(<span class="keywordtype">int</span> numContours, <span class="keywordtype">double</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21076786d084c43d32f242990f932679539">range</a>[2]); <a name="l00081"></a>00081 <span class="keywordtype">void</span> GenerateValues(<span class="keywordtype">int</span> numContours, <span class="keywordtype">double</span> rangeStart, <span class="keywordtype">double</span> rangeEnd); <a name="l00083"></a>00083 <a name="l00085"></a>00085 <a name="l00089"></a>00089 vtkSetMacro(Clipping,<span class="keywordtype">int</span>); <a name="l00090"></a>00090 vtkGetMacro(Clipping,<span class="keywordtype">int</span>); <a name="l00091"></a>00091 vtkBooleanMacro(Clipping,<span class="keywordtype">int</span>); <a name="l00093"></a>00093 <a name="l00095"></a>00095 <a name="l00099"></a>00099 vtkSetClampMacro(ScalarMode,<span class="keywordtype">int</span>,<a class="code" href="a02472.html#97611d1bafc15ac4ea5827febce45405">VTK_SCALAR_MODE_INDEX</a>,<a class="code" href="a02472.html#181724018362901b6648b05a128b8416">VTK_SCALAR_MODE_VALUE</a>); <a name="l00100"></a>00100 vtkGetMacro(ScalarMode,<span class="keywordtype">int</span>); <a name="l00101"></a><a class="code" href="a00158.html#5a419951fe227d4296bae39985fd2aaf">00101</a> <span class="keywordtype">void</span> SetScalarModeToIndex() <a name="l00102"></a>00102 {this->SetScalarMode(<a class="code" href="a02472.html#97611d1bafc15ac4ea5827febce45405">VTK_SCALAR_MODE_INDEX</a>);} <a name="l00103"></a><a class="code" href="a00158.html#a786f195c3d148e16552d71a4a6e07b2">00103</a> <span class="keywordtype">void</span> SetScalarModeToValue() <a name="l00104"></a>00104 {this->SetScalarMode(<a class="code" href="a02472.html#181724018362901b6648b05a128b8416">VTK_SCALAR_MODE_VALUE</a>);} <a name="l00106"></a>00106 <a name="l00108"></a>00108 <a name="l00112"></a>00112 vtkSetMacro(GenerateContourEdges,<span class="keywordtype">int</span>); <a name="l00113"></a>00113 vtkGetMacro(GenerateContourEdges,<span class="keywordtype">int</span>); <a name="l00114"></a>00114 vtkBooleanMacro(GenerateContourEdges,<span class="keywordtype">int</span>); <a name="l00116"></a>00116 <a name="l00119"></a>00119 <a class="code" href="a01260.html" title="concrete dataset represents vertices, lines, polygons, and triangle strips">vtkPolyData</a> *GetContourEdgesOutput(); <a name="l00120"></a>00120 <a name="l00123"></a>00123 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="a01084.html#8137c0551b29bb996f0dd2f886bcd2da">GetMTime</a>(); <a name="l00124"></a>00124 <a name="l00125"></a>00125 <span class="keyword">protected</span>: <a name="l00126"></a>00126 <a class="code" href="a00158.html" title="generate filled contours for vtkPolyData">vtkBandedPolyDataContourFilter</a>(); <a name="l00127"></a>00127 ~<a class="code" href="a00158.html" title="generate filled contours for vtkPolyData">vtkBandedPolyDataContourFilter</a>(); <a name="l00128"></a>00128 <a name="l00129"></a>00129 <span class="keywordtype">int</span> <a class="code" href="a01261.html#6b5a43ab1f9bbcb368c7dc83e4afe068">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="l00130"></a>00130 <a name="l00131"></a>00131 <span class="keywordtype">int</span> ComputeScalarIndex(<span class="keywordtype">double</span>); <a name="l00132"></a>00132 <span class="keywordtype">int</span> IsContourValue(<span class="keywordtype">double</span> val); <a name="l00133"></a>00133 <span class="keywordtype">int</span> ClipEdge(<span class="keywordtype">int</span> v1, <span class="keywordtype">int</span> v2, <a class="code" href="a01250.html" title="represent and manipulate 3D points">vtkPoints</a> *pts, <a class="code" href="a00356.html" title="abstract superclass for arrays of numeric data">vtkDataArray</a> *inScalars, <a name="l00134"></a>00134 <a class="code" href="a00436.html" title="dynamic, self-adjusting array of double">vtkDoubleArray</a> *outScalars, <a name="l00135"></a>00135 <a class="code" href="a01242.html" title="represent and manipulate point attribute data">vtkPointData</a> *inPD, <a class="code" href="a01242.html" title="represent and manipulate point attribute data">vtkPointData</a> *outPD); <a name="l00136"></a>00136 <span class="keywordtype">int</span> InsertCell(<a class="code" href="a00242.html" title="object to represent cell connectivity">vtkCellArray</a> *cells, <span class="keywordtype">int</span> npts, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> *pts, <a name="l00137"></a>00137 <span class="keywordtype">int</span> cellId, <span class="keywordtype">double</span> s, <a class="code" href="a00556.html" title="dynamic, self-adjusting array of float">vtkFloatArray</a> *newS); <a name="l00138"></a>00138 <a name="l00139"></a>00139 <span class="comment">// data members</span> <a name="l00140"></a><a class="code" href="a00158.html#9d928beee6292b0d4b43f7baa24c8f98">00140</a> <a class="code" href="a00330.html" title="helper object to manage setting and generating contour values">vtkContourValues</a> *ContourValues; <a name="l00141"></a>00141 <a name="l00142"></a><a class="code" href="a00158.html#cabdd4bd191b1fcbdb1b4e814af242c2">00142</a> <span class="keywordtype">int</span> Clipping; <a name="l00143"></a><a class="code" href="a00158.html#5f924fbd818a295a7e73e2a91ac938ea">00143</a> <span class="keywordtype">int</span> ScalarMode; <a name="l00144"></a>00144 <a name="l00145"></a>00145 <span class="comment">// sorted and cleaned contour values</span> <a name="l00146"></a><a class="code" href="a00158.html#1eff34a080ab74eaf70b098f118a4420">00146</a> <span class="keywordtype">double</span> *ClipValues; <a name="l00147"></a><a class="code" href="a00158.html#8baa28f8ac27fa132a635611a9938f16">00147</a> <span class="keywordtype">int</span> NumberOfClipValues; <a name="l00148"></a><a class="code" href="a00158.html#11d3f04bc265fef6b7af8ebdb521a80d">00148</a> <span class="keywordtype">int</span> ClipIndex[2]; <span class="comment">//indices outside of this range (inclusive) are clipped</span> <a name="l00149"></a><a class="code" href="a00158.html#663be0822bd9ca9681a1569c750057a7">00149</a> <span class="keywordtype">double</span> ClipTolerance; <span class="comment">//used to clean up numerical problems</span> <a name="l00150"></a>00150 <a name="l00151"></a>00151 <span class="comment">//the second output</span> <a name="l00152"></a><a class="code" href="a00158.html#8e7ed8d111cf573b641e466c7fd6c495">00152</a> <span class="keywordtype">int</span> GenerateContourEdges; <a name="l00153"></a>00153 <a name="l00154"></a>00154 <span class="keyword">private</span>: <a name="l00155"></a>00155 <a class="code" href="a00158.html" title="generate filled contours for vtkPolyData">vtkBandedPolyDataContourFilter</a>(<span class="keyword">const</span> <a class="code" href="a00158.html" title="generate filled contours for vtkPolyData">vtkBandedPolyDataContourFilter</a>&); <span class="comment">// Not implemented.</span> <a name="l00156"></a>00156 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a00158.html" title="generate filled contours for vtkPolyData">vtkBandedPolyDataContourFilter</a>&); <span class="comment">// Not implemented.</span> <a name="l00157"></a>00157 }; <a name="l00158"></a>00158 <a name="l00160"></a>00160 <a name="l00162"></a><a class="code" href="a00158.html#c23ff9f2dc1b207e4a094694f14a39ea">00162</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00158.html#c23ff9f2dc1b207e4a094694f14a39ea">vtkBandedPolyDataContourFilter::SetValue</a>(<span class="keywordtype">int</span> i, <span class="keywordtype">double</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d2106bf5e5151797630e91167caab3f22b9a">value</a>) <a name="l00163"></a>00163 {this-><a class="code" href="a00158.html#9d928beee6292b0d4b43f7baa24c8f98">ContourValues</a>-><a class="code" href="a00330.html#c9adf286086d681d6b80da610fd2bc5b">SetValue</a>(i,value);} <a name="l00165"></a>00165 <a name="l00167"></a>00167 <a name="l00168"></a><a class="code" href="a00158.html#28454d3b16d584a3fdf74f47420d5dd9">00168</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="a00158.html#28454d3b16d584a3fdf74f47420d5dd9">vtkBandedPolyDataContourFilter::GetValue</a>(<span class="keywordtype">int</span> i) <a name="l00169"></a>00169 {<span class="keywordflow">return</span> this-><a class="code" href="a00158.html#9d928beee6292b0d4b43f7baa24c8f98">ContourValues</a>-><a class="code" href="a00330.html#e1beb054c144c1eb5c65ef65ce9010dc">GetValue</a>(i);} <a name="l00171"></a>00171 <a name="l00173"></a>00173 <a name="l00175"></a><a class="code" href="a00158.html#2008e6ea0d5bbdde8fe7350e29a34c96">00175</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> *<a class="code" href="a00158.html#2008e6ea0d5bbdde8fe7350e29a34c96">vtkBandedPolyDataContourFilter::GetValues</a>() <a name="l00176"></a>00176 {<span class="keywordflow">return</span> this-><a class="code" href="a00158.html#9d928beee6292b0d4b43f7baa24c8f98">ContourValues</a>-><a class="code" href="a00330.html#f5488942a61e6465a4e155f956b1b110">GetValues</a>();} <a name="l00178"></a>00178 <a name="l00180"></a>00180 <a name="l00183"></a><a class="code" href="a00158.html#3e360e2363fab9beb449e92a432915f3">00183</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00158.html#2008e6ea0d5bbdde8fe7350e29a34c96">vtkBandedPolyDataContourFilter::GetValues</a>(<span class="keywordtype">double</span> *contourValues) <a name="l00184"></a>00184 {this-><a class="code" href="a00158.html#9d928beee6292b0d4b43f7baa24c8f98">ContourValues</a>-><a class="code" href="a00330.html#f5488942a61e6465a4e155f956b1b110">GetValues</a>(contourValues);} <a name="l00186"></a>00186 <a name="l00188"></a>00188 <a name="l00191"></a><a class="code" href="a00158.html#cf7c809236b8b0dcb87fa815b763768f">00191</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00158.html#cf7c809236b8b0dcb87fa815b763768f">vtkBandedPolyDataContourFilter::SetNumberOfContours</a>(<span class="keywordtype">int</span> number) <a name="l00192"></a>00192 {this-><a class="code" href="a00158.html#9d928beee6292b0d4b43f7baa24c8f98">ContourValues</a>-><a class="code" href="a00330.html#b6ed9a0ad4920ab0202a8f658a1da320">SetNumberOfContours</a>(number);} <a name="l00194"></a>00194 <a name="l00196"></a>00196 <a name="l00197"></a><a class="code" href="a00158.html#9c35a2900a447c21ea836aab5538591c">00197</a> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="a00158.html#9c35a2900a447c21ea836aab5538591c">vtkBandedPolyDataContourFilter::GetNumberOfContours</a>() <a name="l00198"></a>00198 {<span class="keywordflow">return</span> this-><a class="code" href="a00158.html#9d928beee6292b0d4b43f7baa24c8f98">ContourValues</a>-><a class="code" href="a00330.html#3da80320f6255bb9d32bfb35d2012507">GetNumberOfContours</a>();} <a name="l00200"></a>00200 <a name="l00202"></a>00202 <a name="l00204"></a><a class="code" href="a00158.html#97a4a32b9897903344f97eb987557f2d">00204</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00158.html#97a4a32b9897903344f97eb987557f2d">vtkBandedPolyDataContourFilter::GenerateValues</a>(<span class="keywordtype">int</span> numContours, <a name="l00205"></a>00205 <span class="keywordtype">double</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21076786d084c43d32f242990f932679539">range</a>[2]) <a name="l00206"></a>00206 {this-><a class="code" href="a00158.html#9d928beee6292b0d4b43f7baa24c8f98">ContourValues</a>-><a class="code" href="a00330.html#a8d5613ee584e38211b8bbced32225e5">GenerateValues</a>(numContours, range);} <a name="l00208"></a>00208 <a name="l00210"></a>00210 <a name="l00212"></a><a class="code" href="a00158.html#e49d96f7c0bd94a637d5a50413381fa5">00212</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="a00158.html#97a4a32b9897903344f97eb987557f2d">vtkBandedPolyDataContourFilter::GenerateValues</a>(<span class="keywordtype">int</span> numContours, <a name="l00213"></a>00213 <span class="keywordtype">double</span> rangeStart, <a name="l00214"></a>00214 <span class="keywordtype">double</span> rangeEnd) <a name="l00215"></a>00215 {this-><a class="code" href="a00158.html#9d928beee6292b0d4b43f7baa24c8f98">ContourValues</a>-><a class="code" href="a00330.html#a8d5613ee584e38211b8bbced32225e5">GenerateValues</a>(numContours, rangeStart, rangeEnd);} <a name="l00217"></a>00217 <a name="l00218"></a>00218 <a name="l00219"></a>00219 <span class="preprocessor">#endif</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:25 2009 for VTK by <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>