<div dir="ltr">Hello everyone!<br><br>I have a point cloud in the form of a polydata, where I build vertices with vtkVertexGlyphFilter.<div><br></div><div>That polydata has pointdata with scalars ranging from 0 to 255, and I'm trying to use vtkContourFilter to extract 5 planes, that ideally should cut through the data at the values corresponding to each plane. </div><div><br></div><div>Just to make it clearer: The expected output should be 5 parallel planes, equidistant to each other, where each is an isosurface of a certain value, with respect to the scalars of the pointcloud.</div><div><br></div><div>The problem is: I get absolutely no output. No points, no cell, nada. I've looked at every example I could find and the mailing list archive, but couldn't pinpoint the problem.</div><div><br></div><div>Here is a short compilable example that shows this problem. You can also see outputs from print statements as comments:</div><div>OBS: I use VTK 5.8 for some reasons, this is non-negotiable</div><div><br></div><div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><vtkSmartPointer.h></span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><vtkContourFilter.h></span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><vtkTypeUInt8Array.h></span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><vtkVertexGlyphFilter.h></span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><vtkPolyDataMapper.h></span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><vtkActor.h></span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><vtkRenderer.h></span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><vtkRenderWindow.h></span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><vtkRenderWindowInteractor.h></span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#define</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">VTK_NEW</span><span style="color:rgb(0,0,0)">(</span>type<span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span>instance<span style="color:rgb(0,0,0)">)</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(192,192,192)">\</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">;</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(192,192,192)">\</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>vtkSmartPointer<span style="color:rgb(0,0,0)"><</span>type<span style="color:rgb(0,0,0)">></span><span style="color:rgb(192,192,192)"> </span>instance<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span><span style="color:rgb(192,192,192)"> </span>vtkSmartPointer<span style="color:rgb(0,0,0)"><</span>type<span style="color:rgb(0,0,0)">>::</span>New<span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">main</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">argc</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">char</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">*</span><span style="color:rgb(0,0,0)">argv</span><span style="color:rgb(0,0,0)">[])</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">VTK_NEW</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,0,128)">vtkPoints</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span>points<span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>points<span style="color:rgb(0,0,0)">-></span>Allocate<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,128)">100</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">*</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">100</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">*</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">100</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">VTK_NEW</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,0,128)">vtkTypeUInt8Array</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span>data_array<span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>data_array<span style="color:rgb(0,0,0)">-></span>Allocate<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,128)">100</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">*</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">100</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">*</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">100</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">for</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">x</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0</span><span style="color:rgb(0,0,0)">;</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">x</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)"><</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">100</span><span style="color:rgb(0,0,0)">;</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">x</span><span style="color:rgb(0,0,0)">++)</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">for</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">y</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0</span><span style="color:rgb(0,0,0)">;</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">y</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)"><</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">100</span><span style="color:rgb(0,0,0)">;</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">++</span><span style="color:rgb(0,0,0)">y</span><span style="color:rgb(0,0,0)">)</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">for</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">z</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0</span><span style="color:rgb(0,0,0)">;</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">z</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)"><</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">100</span><span style="color:rgb(0,0,0)">;</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">++</span><span style="color:rgb(0,0,0)">z</span><span style="color:rgb(0,0,0)">)</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>points<span style="color:rgb(0,0,0)">-></span>InsertNextPoint<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,0)">x</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">y</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">z</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>data_array<span style="color:rgb(0,0,0)">-></span>InsertNextValue<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,0)">z</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">%</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">256</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">VTK_NEW</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,0,128)">vtkPolyData</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span>polydata<span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>polydata<span style="color:rgb(0,0,0)">-></span>SetPoints<span style="color:rgb(0,0,0)">(</span>points<span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>polydata<span style="color:rgb(0,0,0)">-></span>GetPointData<span style="color:rgb(0,0,0)">()-></span>SetScalars<span style="color:rgb(0,0,0)">(</span>data_array<span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">VTK_NEW</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,0,128)">vtkVertexGlyphFilter</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span>glyph_filter<span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>glyph_filter<span style="color:rgb(0,0,0)">-></span>SetInput<span style="color:rgb(0,0,0)">(</span>polydata<span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>glyph_filter<span style="color:rgb(0,0,0)">-></span>Update<span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>glyph_filter<span style="color:rgb(0,0,0)">-></span>GetOutput<span style="color:rgb(0,0,0)">()-></span>Print<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,0,128)">std</span><span style="color:rgb(0,0,0)">::</span>cout<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)"><<</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"Glyph</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">filter:</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">\n"</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">//Output</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">here:</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">//Number</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Of</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Points:</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">1000000</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">//Number</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Of</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Cells:</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">1000000</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">//Bounds</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">look</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">good,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">all</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">good</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">VTK_NEW</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,0,128)">vtkContourFilter</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span>cont_filt<span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>cont_filt<span style="color:rgb(0,0,0)">-></span>SetInputConnection<span style="color:rgb(0,0,0)">(</span>glyph_filter<span style="color:rgb(0,0,0)">-></span>GetOutputPort<span style="color:rgb(0,0,0)">());</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">double</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">scalarRange</span><span style="color:rgb(0,0,0)">[</span><span style="color:rgb(0,0,128)">2</span><span style="color:rgb(0,0,0)">];</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>polydata<span style="color:rgb(0,0,0)">-></span>GetPointData<span style="color:rgb(0,0,0)">()-></span>GetScalars<span style="color:rgb(0,0,0)">()-></span>GetRange<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,0)">scalarRange</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>cont_filt<span style="color:rgb(0,0,0)">-></span>GenerateValues<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,128)">5</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">scalarRange</span><span style="color:rgb(0,0,0)">[</span><span style="color:rgb(0,0,128)">0</span><span style="color:rgb(0,0,0)">],</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">scalarRange</span><span style="color:rgb(0,0,0)">[</span><span style="color:rgb(0,0,128)">1</span><span style="color:rgb(0,0,0)">]);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>cont_filt<span style="color:rgb(0,0,0)">-></span>Update<span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Print</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">the</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">contours</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">num_contours</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span><span style="color:rgb(192,192,192)"> </span>cont_filt<span style="color:rgb(0,0,0)">-></span>GetNumberOfContours<span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">double</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">cont_values</span><span style="color:rgb(0,0,0)">[</span><span style="color:rgb(0,0,0)">num_contours</span><span style="color:rgb(0,0,0)">];</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>cont_filt<span style="color:rgb(0,0,0)">-></span>GetValues<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,0)">cont_values</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">std</span><span style="color:rgb(0,0,0)">::</span>cout<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)"><<</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"Contours:</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"</span><span style="color:rgb(0,0,0)">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">for</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">var</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0</span><span style="color:rgb(0,0,0)">;</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">var</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)"><</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">num_contours</span><span style="color:rgb(0,0,0)">;</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">++</span><span style="color:rgb(0,0,0)">var</span><span style="color:rgb(0,0,0)">)</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">{</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">std</span><span style="color:rgb(0,0,0)">::</span>cout<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)"><<</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">cont_values</span><span style="color:rgb(0,0,0)">[</span><span style="color:rgb(0,0,0)">var</span><span style="color:rgb(0,0,0)">]</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)"><<</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"</span><span style="color:rgb(0,0,0)">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">std</span><span style="color:rgb(0,0,0)">::</span>cout<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)"><<</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">std</span><span style="color:rgb(0,0,0)">::</span>endl<span style="color:rgb(0,0,0)">;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">//Output</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">here:</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">//Contours:</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">0</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">24.75</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">49.5</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">74.25</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">99</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>cont_filt<span style="color:rgb(0,0,0)">-></span>GetOutput<span style="color:rgb(0,0,0)">()-></span>Print<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,0,128)">std</span><span style="color:rgb(0,0,0)">::</span>cout<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)"><<</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"Contour</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">filter:</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">\n"</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">//Output</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">here:</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">//No</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">points,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">no</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">cells,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">default</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">bounds,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">no</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">nothing</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">VTK_NEW</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,0,128)">vtkPolyDataMapper</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span>mapper<span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>mapper<span style="color:rgb(0,0,0)">-></span>SetInputConnection<span style="color:rgb(0,0,0)">(</span>cont_filt<span style="color:rgb(0,0,0)">-></span>GetOutputPort<span style="color:rgb(0,0,0)">());</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>mapper<span style="color:rgb(0,0,0)">-></span>SetScalarVisibility<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,128)">1</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">VTK_NEW</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,0,128)">vtkActor</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span>actor<span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>actor<span style="color:rgb(0,0,0)">-></span>SetMapper<span style="color:rgb(0,0,0)">(</span>mapper<span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">VTK_NEW</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,0,128)">vtkRenderer</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span>renderer<span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>renderer<span style="color:rgb(0,0,0)">-></span>AddActor<span style="color:rgb(0,0,0)">(</span>actor<span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">VTK_NEW</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,0,128)">vtkRenderWindow</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span>render_window<span style="color:rgb(0,0,0)">)</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>render_window<span style="color:rgb(0,0,0)">-></span>AddRenderer<span style="color:rgb(0,0,0)">(</span>renderer<span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>render_window<span style="color:rgb(0,0,0)">-></span>SetSize<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,128)">600</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">600</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">VTK_NEW</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,0,128)">vtkRenderWindowInteractor</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span>interactor<span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>interactor<span style="color:rgb(0,0,0)">-></span>SetRenderWindow<span style="color:rgb(0,0,0)">(</span>render_window<span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>renderer<span style="color:rgb(0,0,0)">-></span>ResetCamera<span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>render_window<span style="color:rgb(0,0,0)">-></span>Render<span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>interactor<span style="color:rgb(0,0,0)">-></span>Start<span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">}</span></pre></div></div>