<!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/vtkHyperOctreeDualGridContourFilter.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/vtkHyperOctreeDualGridContourFilter.h</h1><a href="a02568.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: vtkHyperOctreeDualGridContourFilter.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 __vtkHyperOctreeDualGridContourFilter_h</span> <a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#define __vtkHyperOctreeDualGridContourFilter_h</span> <a name="l00041"></a>00041 <span class="preprocessor"></span> <a name="l00042"></a>00042 <span class="preprocessor">#include "<a class="code" href="a02331.html">vtkPolyDataAlgorithm.h</a>"</span> <a name="l00043"></a>00043 <a name="l00044"></a>00044 <span class="preprocessor">#include "<a class="code" href="a02002.html">vtkContourValues.h</a>"</span> <span class="comment">// Needed for inline methods</span> <a name="l00045"></a>00045 <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="l00046"></a>00046 <a name="l00047"></a>00047 <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="l00048"></a>00048 <span class="keyword">class </span><a class="code" href="a01688.html" title="a 3D cell that represents a tetrahedron">vtkTetra</a>; <a name="l00049"></a>00049 <span class="keyword">class </span><a class="code" href="a00703.html" title="Objects that can traverse hyperoctree nodes.">vtkHyperOctreeCursor</a>; <a name="l00050"></a>00050 <span class="keyword">class </span><a class="code" href="a00708.html">vtkHyperOctreeLightWeightCursor</a>; <a name="l00051"></a>00051 <a name="l00052"></a>00052 <span class="keyword">class </span><a class="code" href="a00376.html" title="represent and manipulate attribute data in a dataset">vtkDataSetAttributes</a>; <a name="l00053"></a>00053 <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="l00054"></a>00054 <span class="keyword">class </span><a class="code" href="a01784.html" title="dynamic, self-adjusting array of unsigned char">vtkUnsignedCharArray</a>; <a name="l00055"></a>00055 <span class="keyword">class </span><a class="code" href="a00722.html" title="dynamic, self-adjusting array of vtkIdType">vtkIdTypeArray</a>; <a name="l00056"></a>00056 <span class="keyword">class </span><a class="code" href="a00169.html" title="dynamic, self-adjusting array of bits">vtkBitArray</a>; <a name="l00057"></a>00057 <span class="keyword">class </span><a class="code" href="a01247.html" title="quickly locate points in 3-space">vtkPointLocator</a>; <a name="l00058"></a>00058 <a name="l00059"></a><a class="code" href="a00706.html">00059</a> <span class="keyword">class </span><a class="code" href="a02170.html#c3c1ffe2fe47b9b70ba90182b7860cce">VTK_GRAPHICS_EXPORT</a> <a class="code" href="a00706.html" title="generate isosurfaces/isolines from scalar values">vtkHyperOctreeDualGridContourFilter</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="l00060"></a>00060 { <a name="l00061"></a>00061 <span class="keyword">public</span>: <a name="l00062"></a><a class="code" href="a00706.html#1416f4711b74cb56e38ace3962556917">00062</a> vtkTypeRevisionMacro(<a class="code" href="a00706.html" title="generate isosurfaces/isolines from scalar values">vtkHyperOctreeDualGridContourFilter</a>,<a class="code" href="a01261.html" title="Superclass for algorithms that produce only polydata as output.">vtkPolyDataAlgorithm</a>); <a name="l00063"></a>00063 <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="l00064"></a>00064 <a name="l00067"></a>00067 <span class="keyword">static</span> <a class="code" href="a00706.html" title="generate isosurfaces/isolines from scalar values">vtkHyperOctreeDualGridContourFilter</a> *<a class="code" href="a01261.html#cf785ac526132296ff652c636f713b5e">New</a>(); <a name="l00068"></a>00068 <a name="l00074"></a><a class="code" href="a00706.html#cdd4c1ca70bc9e860e95b4553e7c03a0">00074</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="l00075"></a>00075 { <a name="l00076"></a>00076 this->ContourValues->SetValue(i,value); <a name="l00077"></a>00077 } <a name="l00079"></a>00079 <a name="l00081"></a>00081 <a name="l00082"></a><a class="code" href="a00706.html#414758e907d2720230c2a9a2dc0f0d17">00082</a> <span class="keywordtype">double</span> GetValue(<span class="keywordtype">int</span> i) <a name="l00083"></a>00083 { <a name="l00084"></a>00084 <span class="keywordflow">return</span> this->ContourValues->GetValue(i); <a name="l00085"></a>00085 } <a name="l00087"></a>00087 <a name="l00089"></a>00089 <a name="l00091"></a><a class="code" href="a00706.html#455eba7b0bc46f17f1e9fd006e1598aa">00091</a> <span class="keywordtype">double</span> *GetValues() <a name="l00092"></a>00092 { <a name="l00093"></a>00093 <span class="keywordflow">return</span> this->ContourValues->GetValues(); <a name="l00094"></a>00094 } <a name="l00096"></a>00096 <a name="l00098"></a>00098 <a name="l00101"></a><a class="code" href="a00706.html#a3fddaab047e7576200f336e5ba6dad9">00101</a> <span class="keywordtype">void</span> GetValues(<span class="keywordtype">double</span> *contourValues) <a name="l00102"></a>00102 { <a name="l00103"></a>00103 this->ContourValues->GetValues(contourValues); <a name="l00104"></a>00104 } <a name="l00106"></a>00106 <a name="l00108"></a>00108 <a name="l00111"></a><a class="code" href="a00706.html#748583e92d88c4ccdbd0ea82e9da650c">00111</a> <span class="keywordtype">void</span> SetNumberOfContours(<span class="keywordtype">int</span> number) <a name="l00112"></a>00112 { <a name="l00113"></a>00113 this->ContourValues->SetNumberOfContours(number); <a name="l00114"></a>00114 } <a name="l00116"></a>00116 <a name="l00118"></a>00118 <a name="l00119"></a><a class="code" href="a00706.html#dca9f8117119bcd4e06c4f71531cf2f5">00119</a> <span class="keywordtype">int</span> GetNumberOfContours() <a name="l00120"></a>00120 { <a name="l00121"></a>00121 <span class="keywordflow">return</span> this->ContourValues->GetNumberOfContours(); <a name="l00122"></a>00122 } <a name="l00124"></a>00124 <a name="l00126"></a>00126 <a name="l00128"></a><a class="code" href="a00706.html#999cc293d77abf2a3e9a68f9d9055b73">00128</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="l00129"></a>00129 { <a name="l00130"></a>00130 this->ContourValues->GenerateValues(numContours, range); <a name="l00131"></a>00131 } <a name="l00133"></a>00133 <a name="l00135"></a>00135 <a name="l00137"></a><a class="code" href="a00706.html#dc92f9ff9f2855afb99cc71012e1379c">00137</a> <span class="keywordtype">void</span> GenerateValues(<span class="keywordtype">int</span> numContours, <span class="keywordtype">double</span> <a name="l00138"></a>00138 rangeStart, <span class="keywordtype">double</span> rangeEnd) <a name="l00139"></a>00139 { <a name="l00140"></a>00140 this->ContourValues->GenerateValues(numContours, rangeStart, rangeEnd); <a name="l00141"></a>00141 } <a name="l00143"></a>00143 <a name="l00145"></a>00145 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="a01084.html#8137c0551b29bb996f0dd2f886bcd2da">GetMTime</a>(); <a name="l00146"></a>00146 <a name="l00148"></a>00148 <a name="l00150"></a>00150 <span class="keywordtype">void</span> SetLocator(<a class="code" href="a01247.html" title="quickly locate points in 3-space">vtkPointLocator</a> *locator); <a name="l00151"></a>00151 vtkGetObjectMacro(Locator,<a class="code" href="a01247.html" title="quickly locate points in 3-space">vtkPointLocator</a>); <a name="l00153"></a>00153 <a name="l00156"></a>00156 <span class="keywordtype">void</span> CreateDefaultLocator(); <a name="l00157"></a>00157 <a name="l00158"></a>00158 <span class="keyword">protected</span>: <a name="l00159"></a>00159 <a class="code" href="a00706.html" title="generate isosurfaces/isolines from scalar values">vtkHyperOctreeDualGridContourFilter</a>(); <a name="l00160"></a>00160 ~<a class="code" href="a00706.html" title="generate isosurfaces/isolines from scalar values">vtkHyperOctreeDualGridContourFilter</a>(); <a name="l00161"></a>00161 <a name="l00162"></a>00162 <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="l00163"></a>00163 <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a>** inputVector, <a name="l00164"></a>00164 <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a>* outputVector); <a name="l00165"></a>00165 <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="l00166"></a>00166 <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a>**, <a name="l00167"></a>00167 <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a>*); <a name="l00168"></a>00168 <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="l00169"></a>00169 <a name="l00171"></a>00171 <span class="keywordtype">void</span> ContourNode(); <a name="l00172"></a>00172 <a name="l00173"></a>00173 <span class="keywordtype">void</span> TraverseNeighborhoodRecursively( <a name="l00174"></a>00174 <a class="code" href="a00708.html">vtkHyperOctreeLightWeightCursor</a>* neighborhood, <a name="l00175"></a>00175 <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span>* xyzIds); <a name="l00176"></a>00176 <span class="keywordtype">void</span> EvaluatePoint(<a class="code" href="a00708.html">vtkHyperOctreeLightWeightCursor</a>* neighborhood, <a name="l00177"></a>00177 <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span>* xyzIds); <a name="l00178"></a>00178 <a name="l00179"></a>00179 <span class="keywordtype">void</span> ContourNode1D(); <a name="l00180"></a>00180 <a name="l00181"></a><a class="code" href="a00706.html#196ea83e79442b4359c370963b849c13">00181</a> <a class="code" href="a00330.html" title="helper object to manage setting and generating contour values">vtkContourValues</a> *ContourValues; <a name="l00182"></a><a class="code" href="a00706.html#dca65b9e9c7fdc01e1af917663889d6b">00182</a> <a class="code" href="a01247.html" title="quickly locate points in 3-space">vtkPointLocator</a> *Locator; <a name="l00183"></a>00183 <a name="l00184"></a><a class="code" href="a00706.html#9b82193dd4c61256cf7b101b66790293">00184</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="l00185"></a><a class="code" href="a00706.html#360385526db2e315652713d9ac5f81f8">00185</a> <a class="code" href="a01260.html" title="concrete dataset represents vertices, lines, polygons, and triangle strips">vtkPolyData</a> *Output; <a name="l00186"></a>00186 <a name="l00187"></a><a class="code" href="a00706.html#cf265c909163de824061a351ba9190df">00187</a> <a class="code" href="a00242.html" title="object to represent cell connectivity">vtkCellArray</a> *NewPolys; <a name="l00188"></a>00188 <a name="l00189"></a><a class="code" href="a00706.html#3c82ecf4cace0d6fed4f7dce1d3d7960">00189</a> <a class="code" href="a00376.html" title="represent and manipulate attribute data in a dataset">vtkDataSetAttributes</a> *InPD; <a name="l00190"></a><a class="code" href="a00706.html#118e7f8f9994ab62ac4a4ce6fac3ac1b">00190</a> <a class="code" href="a00376.html" title="represent and manipulate attribute data in a dataset">vtkDataSetAttributes</a> *OutPD; <a name="l00191"></a><a class="code" href="a00706.html#c4eb123cad5c91494760189af89cfc85">00191</a> <a class="code" href="a00356.html" title="abstract superclass for arrays of numeric data">vtkDataArray</a> *InScalars; <a name="l00192"></a>00192 <span class="comment">// To compute points on the fly.</span> <a name="l00193"></a>00193 <span class="comment">// These are set to the input origin and size.</span> <a name="l00194"></a><a class="code" href="a00706.html#fae71802a248749b2aa86d9578cddcd7">00194</a> <span class="keywordtype">double</span> Origin[3]; <a name="l00195"></a><a class="code" href="a00706.html#c3b679fe35eca8b925bef846e6148c92">00195</a> <span class="keywordtype">double</span> Size[3]; <a name="l00196"></a>00196 <a name="l00197"></a>00197 <span class="comment">// This is a table for traversing a neighborhood down an octree.</span> <a name="l00198"></a>00198 <span class="comment">// 8 children x 8 cursors</span> <a name="l00199"></a>00199 <span class="comment">// First three bits encode the child, rest encode the cursor id.</span> <a name="l00200"></a>00200 <span class="comment">// 8xCursorId + childId.</span> <a name="l00201"></a><a class="code" href="a00706.html#bcb9b17d76cf305597e24e0803fd1906">00201</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> NeighborhoodTraversalTable[64]; <a name="l00202"></a>00202 <span class="keywordtype">void</span> GenerateTraversalTable(); <a name="l00203"></a>00203 <a name="l00204"></a>00204 <span class="keyword">private</span>: <a name="l00205"></a>00205 <a class="code" href="a00706.html" title="generate isosurfaces/isolines from scalar values">vtkHyperOctreeDualGridContourFilter</a>(<span class="keyword">const</span> <a class="code" href="a00706.html" title="generate isosurfaces/isolines from scalar values">vtkHyperOctreeDualGridContourFilter</a>&); <span class="comment">// Not implemented.</span> <a name="l00206"></a>00206 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a00706.html" title="generate isosurfaces/isolines from scalar values">vtkHyperOctreeDualGridContourFilter</a>&); <span class="comment">// Not implemented.</span> <a name="l00207"></a>00207 }; <a name="l00208"></a>00208 <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>