<!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/vtkHyperOctreeContourFilter.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/vtkHyperOctreeContourFilter.h</h1><a href="a02565.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: vtkHyperOctreeContourFilter.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="l00050"></a>00050 <span class="preprocessor">#ifndef __vtkHyperOctreeContourFilter_h</span> <a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor">#define __vtkHyperOctreeContourFilter_h</span> <a name="l00052"></a>00052 <span class="preprocessor"></span> <a name="l00053"></a>00053 <span class="preprocessor">#include "<a class="code" href="a02331.html">vtkPolyDataAlgorithm.h</a>"</span> <a name="l00054"></a>00054 <a name="l00055"></a>00055 <span class="preprocessor">#include "<a class="code" href="a02002.html">vtkContourValues.h</a>"</span> <span class="comment">// Needed for inline methods</span> <a name="l00056"></a>00056 <span class="preprocessor">#include "<a class="code" href="a02499.html">vtkCutter.h</a>"</span> <span class="comment">// for VTK_SORT_BY_VALUE</span> <a name="l00057"></a>00057 <a name="l00058"></a>00058 <span class="keyword">class </span><a class="code" href="a01247.html" title="quickly locate points in 3-space">vtkPointLocator</a>; <a name="l00059"></a>00059 <span class="keyword">class </span><a class="code" href="a00699.html" title="A dataset structured as a tree where each node has exactly 2^n children.">vtkHyperOctree</a>; <a name="l00060"></a>00060 <span class="keyword">class </span><a class="code" href="a01128.html" title="helper class to generate triangulations">vtkOrderedTriangulator</a>; <a name="l00061"></a>00061 <span class="keyword">class </span><a class="code" href="a01688.html" title="a 3D cell that represents a tetrahedron">vtkTetra</a>; <a name="l00062"></a>00062 <span class="keyword">class </span><a class="code" href="a00703.html" title="Objects that can traverse hyperoctree nodes.">vtkHyperOctreeCursor</a>; <a name="l00063"></a>00063 <a name="l00064"></a>00064 <span class="keyword">class </span><a class="code" href="a01789.html" title="dataset represents arbitrary combinations of all possible cell types">vtkUnstructuredGrid</a>; <a name="l00065"></a>00065 <span class="keyword">class </span><a class="code" href="a01784.html" title="dynamic, self-adjusting array of unsigned char">vtkUnsignedCharArray</a>; <a name="l00066"></a>00066 <span class="keyword">class </span><a class="code" href="a00722.html" title="dynamic, self-adjusting array of vtkIdType">vtkIdTypeArray</a>; <a name="l00067"></a>00067 <span class="keyword">class </span>vtkHyperOctreeContourPointsGrabber; <a name="l00068"></a>00068 <span class="keyword">class </span><a class="code" href="a00169.html" title="dynamic, self-adjusting array of bits">vtkBitArray</a>; <a name="l00069"></a>00069 <a name="l00070"></a><a class="code" href="a00702.html">00070</a> <span class="keyword">class </span><a class="code" href="a02170.html#c3c1ffe2fe47b9b70ba90182b7860cce">VTK_GRAPHICS_EXPORT</a> <a class="code" href="a00702.html" title="generate isosurfaces/isolines from scalar values">vtkHyperOctreeContourFilter</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="l00071"></a>00071 { <a name="l00072"></a>00072 <span class="keyword">public</span>: <a name="l00073"></a><a class="code" href="a00702.html#1a22f56c6b358bc7d86da8a90630b150">00073</a> vtkTypeRevisionMacro(<a class="code" href="a00702.html" title="generate isosurfaces/isolines from scalar values">vtkHyperOctreeContourFilter</a>,<a class="code" href="a01261.html" title="Superclass for algorithms that produce only polydata as output.">vtkPolyDataAlgorithm</a>); <a name="l00074"></a>00074 <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="l00075"></a>00075 <a name="l00078"></a>00078 <span class="keyword">static</span> <a class="code" href="a00702.html" title="generate isosurfaces/isolines from scalar values">vtkHyperOctreeContourFilter</a> *<a class="code" href="a01261.html#cf785ac526132296ff652c636f713b5e">New</a>(); <a name="l00079"></a>00079 <a name="l00085"></a><a class="code" href="a00702.html#d995414a7e7bccb3675e2ea51fee7a94">00085</a> <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="l00086"></a>00086 { <a name="l00087"></a>00087 this->ContourValues->SetValue(i,value); <a name="l00088"></a>00088 } <a name="l00090"></a>00090 <a name="l00092"></a>00092 <a name="l00093"></a><a class="code" href="a00702.html#4fa189761a5fbd1ce591d2f28360d749">00093</a> <span class="keywordtype">double</span> GetValue(<span class="keywordtype">int</span> i) <a name="l00094"></a>00094 { <a name="l00095"></a>00095 <span class="keywordflow">return</span> this->ContourValues->GetValue(i); <a name="l00096"></a>00096 } <a name="l00098"></a>00098 <a name="l00100"></a>00100 <a name="l00102"></a><a class="code" href="a00702.html#60b763a0528b348dda6873c51b76aadc">00102</a> <span class="keywordtype">double</span> *GetValues() <a name="l00103"></a>00103 { <a name="l00104"></a>00104 <span class="keywordflow">return</span> this->ContourValues->GetValues(); <a name="l00105"></a>00105 } <a name="l00107"></a>00107 <a name="l00109"></a>00109 <a name="l00112"></a><a class="code" href="a00702.html#0fc031e2748caa8d90aca2c46e06896b">00112</a> <span class="keywordtype">void</span> GetValues(<span class="keywordtype">double</span> *contourValues) <a name="l00113"></a>00113 { <a name="l00114"></a>00114 this->ContourValues->GetValues(contourValues); <a name="l00115"></a>00115 } <a name="l00117"></a>00117 <a name="l00119"></a>00119 <a name="l00122"></a><a class="code" href="a00702.html#625dfaef243e69fa59b9a3837e14f8d1">00122</a> <span class="keywordtype">void</span> SetNumberOfContours(<span class="keywordtype">int</span> number) <a name="l00123"></a>00123 { <a name="l00124"></a>00124 this->ContourValues->SetNumberOfContours(number); <a name="l00125"></a>00125 } <a name="l00127"></a>00127 <a name="l00129"></a>00129 <a name="l00130"></a><a class="code" href="a00702.html#d4bfb98f27a20de3d1bd4da66dbdbef1">00130</a> <span class="keywordtype">int</span> GetNumberOfContours() <a name="l00131"></a>00131 { <a name="l00132"></a>00132 <span class="keywordflow">return</span> this->ContourValues->GetNumberOfContours(); <a name="l00133"></a>00133 } <a name="l00135"></a>00135 <a name="l00137"></a>00137 <a name="l00139"></a><a class="code" href="a00702.html#0945348bf11cef1a58e77b33e63def84">00139</a> <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="l00140"></a>00140 { <a name="l00141"></a>00141 this->ContourValues->GenerateValues(numContours, range); <a name="l00142"></a>00142 } <a name="l00144"></a>00144 <a name="l00146"></a>00146 <a name="l00148"></a><a class="code" href="a00702.html#dac34af85fca448e382c6c7631d05b1c">00148</a> <span class="keywordtype">void</span> GenerateValues(<span class="keywordtype">int</span> numContours, <span class="keywordtype">double</span> <a name="l00149"></a>00149 rangeStart, <span class="keywordtype">double</span> rangeEnd) <a name="l00150"></a>00150 { <a name="l00151"></a>00151 this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd); <a name="l00152"></a>00152 } <a name="l00154"></a>00154 <a name="l00156"></a>00156 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="a01084.html#8137c0551b29bb996f0dd2f886bcd2da">GetMTime</a>(); <a name="l00157"></a>00157 <a name="l00159"></a>00159 <a name="l00161"></a>00161 <span class="keywordtype">void</span> SetLocator(<a class="code" href="a01247.html" title="quickly locate points in 3-space">vtkPointLocator</a> *locator); <a name="l00162"></a>00162 vtkGetObjectMacro(Locator,<a class="code" href="a01247.html" title="quickly locate points in 3-space">vtkPointLocator</a>); <a name="l00164"></a>00164 <a name="l00167"></a>00167 <span class="keywordtype">void</span> CreateDefaultLocator(); <a name="l00168"></a>00168 <a name="l00169"></a>00169 <span class="keyword">protected</span>: <a name="l00170"></a>00170 <a class="code" href="a00702.html" title="generate isosurfaces/isolines from scalar values">vtkHyperOctreeContourFilter</a>(); <a name="l00171"></a>00171 ~<a class="code" href="a00702.html" title="generate isosurfaces/isolines from scalar values">vtkHyperOctreeContourFilter</a>(); <a name="l00172"></a>00172 <a name="l00173"></a>00173 <span class="keyword">virtual</span> <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>* request, <a name="l00174"></a>00174 <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a>** inputVector, <a name="l00175"></a>00175 <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a>* outputVector); <a name="l00176"></a>00176 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a01261.html#8ea20f6cc2dd5be4934c9e9b3f1d8eac">RequestUpdateExtent</a>(<a class="code" href="a00872.html" title="Store vtkAlgorithm input/output information.">vtkInformation</a>*, <a name="l00177"></a>00177 <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a>**, <a name="l00178"></a>00178 <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a>*); <a name="l00179"></a>00179 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a01261.html#a9084b97ab9c0c8c76e490fa9776a832">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="l00180"></a>00180 <a name="l00182"></a>00182 <span class="keywordtype">void</span> ContourNode(); <a name="l00183"></a>00183 <a name="l00185"></a>00185 <span class="keywordtype">double</span> ComputePointValue(<span class="keywordtype">int</span> ptIndices[3]); <a name="l00186"></a>00186 <a name="l00187"></a>00187 <span class="keywordtype">void</span> ContourNode1D(); <a name="l00188"></a>00188 <a name="l00189"></a><a class="code" href="a00702.html#e2813962d68a949da95c8ce739db95bd">00189</a> <a class="code" href="a00330.html" title="helper object to manage setting and generating contour values">vtkContourValues</a> *ContourValues; <a name="l00190"></a><a class="code" href="a00702.html#ef3154b9639b91d12e80b4c16df18866">00190</a> <a class="code" href="a01247.html" title="quickly locate points in 3-space">vtkPointLocator</a> *Locator; <a name="l00191"></a>00191 <a name="l00192"></a><a class="code" href="a00702.html#25e283c08b178870868834795b90c3d8">00192</a> <a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a> *CellPts; <span class="comment">// for 2D case</span> <a name="l00193"></a>00193 <a name="l00194"></a><a class="code" href="a00702.html#58a68c29a532ac8d41fffb58872f1868">00194</a> <a class="code" href="a00699.html" title="A dataset structured as a tree where each node has exactly 2^n children.">vtkHyperOctree</a> *Input; <a name="l00195"></a><a class="code" href="a00702.html#80c189dc22bae0645311746953eb4c81">00195</a> <a class="code" href="a01260.html" title="concrete dataset represents vertices, lines, polygons, and triangle strips">vtkPolyData</a> *Output; <a name="l00196"></a>00196 <a name="l00197"></a><a class="code" href="a00702.html#fec08545514700c476034fbf5bf820f6">00197</a> <a class="code" href="a00242.html" title="object to represent cell connectivity">vtkCellArray</a> *NewVerts; <a name="l00198"></a><a class="code" href="a00702.html#5482328b92a70109d45fda1e5bc39177">00198</a> <a class="code" href="a00242.html" title="object to represent cell connectivity">vtkCellArray</a> *NewLines; <a name="l00199"></a><a class="code" href="a00702.html#955f2a7814e7d91029fcd67959736f1a">00199</a> <a class="code" href="a00242.html" title="object to represent cell connectivity">vtkCellArray</a> *NewPolys; <a name="l00200"></a>00200 <a name="l00201"></a><a class="code" href="a00702.html#7a021ac6c6da37422e4d6b720e0736ef">00201</a> <a class="code" href="a00245.html" title="represent and manipulate cell attribute data">vtkCellData</a> *InCD; <a name="l00202"></a><a class="code" href="a00702.html#1516c56eb905ceef64f26efef8ed57b6">00202</a> <a class="code" href="a01242.html" title="represent and manipulate point attribute data">vtkPointData</a> *InPD; <a name="l00203"></a><a class="code" href="a00702.html#9ae26cd9a22cfe035b31fb641eee39be">00203</a> <a class="code" href="a00245.html" title="represent and manipulate cell attribute data">vtkCellData</a> *OutCD; <a name="l00204"></a><a class="code" href="a00702.html#96236edadfb4a317161c34f7bb1a5dfb">00204</a> <a class="code" href="a01242.html" title="represent and manipulate point attribute data">vtkPointData</a> *OutPD; <a name="l00205"></a><a class="code" href="a00702.html#fae6df86b12816254c471bce96f5d691">00205</a> <a class="code" href="a01128.html" title="helper class to generate triangulations">vtkOrderedTriangulator</a> *Triangulator; <a name="l00206"></a>00206 <a name="l00207"></a><a class="code" href="a00702.html#61ea2c404af828758fa30e90c9c00934">00207</a> <a class="code" href="a00703.html" title="Objects that can traverse hyperoctree nodes.">vtkHyperOctreeCursor</a> *Sibling; <span class="comment">// to avoid allocation in the loop</span> <a name="l00208"></a>00208 <a name="l00209"></a>00209 <a name="l00210"></a><a class="code" href="a00702.html#70611237dd7c0e3539390ac9a3a2a267">00210</a> <a class="code" href="a00436.html" title="dynamic, self-adjusting array of double">vtkDoubleArray</a> *CellScalars; <a name="l00211"></a><a class="code" href="a00702.html#96d13faff3815a4f566f81017cff13cf">00211</a> <a class="code" href="a01688.html" title="a 3D cell that represents a tetrahedron">vtkTetra</a> *Tetra; <a name="l00212"></a><a class="code" href="a00702.html#50f312e3e66301dc569873b754765904">00212</a> <a class="code" href="a00436.html" title="dynamic, self-adjusting array of double">vtkDoubleArray</a> *TetScalars; <a name="l00213"></a>00213 <a name="l00214"></a><a class="code" href="a00702.html#dda6e762f3e40eb0dbae8450dc28578a">00214</a> <a class="code" href="a01278.html" title="a cell that represents an n-sided polygon">vtkPolygon</a> *Polygon; <a name="l00215"></a>00215 <a name="l00216"></a><a class="code" href="a00702.html#0a8ff2d4b4bdd4c25ea12d1b1a857b34">00216</a> <a class="code" href="a00703.html" title="Objects that can traverse hyperoctree nodes.">vtkHyperOctreeCursor</a> *Cursor; <a name="l00217"></a><a class="code" href="a00702.html#aef1c4a123892715228ab8e9c1315ad1">00217</a> <a class="code" href="a00703.html" title="Objects that can traverse hyperoctree nodes.">vtkHyperOctreeCursor</a> *NeighborCursor; <a name="l00218"></a>00218 <a name="l00219"></a><a class="code" href="a00702.html#3d8302b3c42d646e3172641e3bab0ea4">00219</a> <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> CellTypeCounter[65536]; <span class="comment">// up-to-65536 points per octant</span> <a name="l00220"></a><a class="code" href="a00702.html#1f8d736742357245e63c350743f0ea0e">00220</a> <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> TotalCounter; <a name="l00221"></a><a class="code" href="a00702.html#eda99714acb00c7ca2aa11fe9a52e0d6">00221</a> <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> TemplateCounter; <span class="comment">// record the number of octants that succceed</span> <a name="l00222"></a>00222 <span class="comment">// to use the template triangulator</span> <a name="l00223"></a>00223 <a name="l00224"></a><a class="code" href="a00702.html#57891284892a3c369a2bc40e182d5ecd">00224</a> <a class="code" href="a00356.html" title="abstract superclass for arrays of numeric data">vtkDataArray</a> *InScalars; <a name="l00225"></a><a class="code" href="a00702.html#b09160fe4a3839288e6a174006152e1d">00225</a> vtkHyperOctreeContourPointsGrabber *Grabber; <a name="l00226"></a>00226 <a name="l00227"></a><a class="code" href="a00702.html#1860189d57a60ef859f46711153263e0">00227</a> <a class="code" href="a00436.html" title="dynamic, self-adjusting array of double">vtkDoubleArray</a> *PointScalars; <a name="l00228"></a><a class="code" href="a00702.html#60e73375cd243c453a4ca01e27304fb4">00228</a> <span class="keywordtype">int</span> SortBy; <a name="l00229"></a><a class="code" href="a00702.html#e5491ca098cb16fb1b8832c309f57103">00229</a> <span class="keywordtype">int</span> Iter; <span class="comment">// iterate over contour values in case of VTK_SORT_BY_CELL</span> <a name="l00230"></a>00230 <a name="l00231"></a><a class="code" href="a00702.html#d6cc2e5579ca4a5c6b7e36b585608244">00231</a> <a class="code" href="a00960.html" title="cell represents a 1D line">vtkLine</a> *Line; <a name="l00232"></a><a class="code" href="a00702.html#7ec24b3684f6f5fd8f680f89c8154665">00232</a> <span class="keywordtype">double</span> LeftValue; <a name="l00233"></a><a class="code" href="a00702.html#6b641b31b1be3233b5627d43fd42efd8">00233</a> <span class="keywordtype">double</span> LeftCoord; <a name="l00234"></a>00234 <a name="l00235"></a>00235 <span class="comment">//BTX</span> <a name="l00236"></a><a class="code" href="a00702.html#2ee8156a89b23cd786e632c0119d804a">00236</a> <span class="keyword">friend</span> <span class="keyword">class </span>vtkHyperOctreeContourPointsGrabber; <a name="l00237"></a>00237 <span class="comment">//ETX</span> <a name="l00238"></a>00238 <span class="keyword">private</span>: <a name="l00239"></a>00239 <a class="code" href="a00702.html" title="generate isosurfaces/isolines from scalar values">vtkHyperOctreeContourFilter</a>(<span class="keyword">const</span> <a class="code" href="a00702.html" title="generate isosurfaces/isolines from scalar values">vtkHyperOctreeContourFilter</a>&); <span class="comment">// Not implemented.</span> <a name="l00240"></a>00240 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a00702.html" title="generate isosurfaces/isolines from scalar values">vtkHyperOctreeContourFilter</a>&); <span class="comment">// Not implemented.</span> <a name="l00241"></a>00241 }; <a name="l00242"></a>00242 <span class="preprocessor">#endif</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:27 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>