<div dir="ltr"><div dir="ltr"><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">Hello Everyone,</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">I have modified the </span><font color="#000080">TubesFromSplines to set the specific color (blue(0,0,255) to a tube.</font></pre><pre style="margin-top:0px;margin-bottom:0px"><font color="#000080">I have tried setting the color directly to the actore and many other ways but no luck.</font></pre><pre style="margin-top:0px;margin-bottom:0px"><font color="#000080">Can some one please help me out with this? what I am missing here?</font></pre><pre style="margin-top:0px;margin-bottom:0px"><font color="#000080"><br></font></pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><font color="#000080"><br></font></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)"><QVector></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)"><QColor></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)"><QList></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)"><QApplication></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)"><QVBoxLayout></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)">"QVTKOpenGLWidget.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)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"vtkPolyLine.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)">"vtkPoints.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)">"vtkCellArray.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)">"vtkPolyData.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)">"vtkAppendPolyData.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)">"vtkAlgorithmOutput.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)">"vtkUnsignedCharArray.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)">"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)">"vtkParametricSpline.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)">"vtkParametricFunctionSource.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)">"vtkTupleInterpolator.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)">"vtkTubeFilter.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)">"vtkDoubleArray.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)">"vtkInteractorStyleTrackballCamera.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)">"vtkPointData.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)">"vtkGenericOpenGLRenderWindow.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)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"vtkAutoInit.h"</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">VTK_MODULE_INIT</span>(vtkRenderingOpenGL2);<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)">VTK</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">was</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">built</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">with</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">vtkRenderingOpenGL2</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">VTK_MODULE_INIT</span>(vtkInteractionStyle);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">VTK_MODULE_INIT</span>(vtkRenderingFreeType);</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)">double</span><span style="color:rgb(192,192,192)"> </span><span style="font-weight:600;color:rgb(0,103,124)">convertToz</span>(<span style="color:rgb(128,128,0)">double</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">n</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,128,0)">//NewValue</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)">(((OldValue</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)">OldMin)</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)">(NewMax</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)">NewMin))</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)">(OldMax</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)">OldMin))</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)">NewMin</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)">if</span>(<span style="color:rgb(9,46,100)">n</span><span style="color:rgb(192,192,192)"> </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>{</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(9,46,100)">n</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">100</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>}<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">else</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">if</span>(<span style="color:rgb(9,46,100)">n</span><span style="color:rgb(192,192,192)"> </span>><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">300</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(9,46,100)">n</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">300</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </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)">return</span><span style="color:rgb(192,192,192)"> </span>(((<span style="color:rgb(9,46,100)">n</span>-<span style="color:rgb(0,0,128)">0</span>)*(<span style="color:rgb(0,0,128)">0.06</span>-<span style="color:rgb(0,0,128)">0.0</span>))/(<span style="color:rgb(0,0,128)">300</span>-<span style="color:rgb(0,0,128)">100</span>))+<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0.0</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px">}</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></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="font-weight:600;color:rgb(0,103,124)">main</span>(<span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">argc</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(9,46,100)">argv</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)">QSurfaceFormat</span>::<span style="color:rgb(0,103,124)">setDefaultFormat</span>(<span style="color:rgb(128,0,128)">QVTKOpenGLWidget</span>::<span style="color:rgb(0,103,124)">defaultFormat</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)">QApplication</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">a</span>(<span style="color:rgb(9,46,100)">argc</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">argv</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,0,128)">QColor</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">color</span>(<span style="color:rgb(0,0,128)">0</span>,<span style="color:rgb(0,0,128)">0</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">255</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">50</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,0,128)">QVector</span><<span style="color:rgb(128,0,128)">QVector</span><<span style="color:rgb(128,128,0)">double</span>>><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">positions</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></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,0,128)">QList</span><<span style="color:rgb(128,128,0)">double</span>><span style="color:rgb(9,46,100)">p1</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">p1</span><<<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">1.0</span><span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(0,0,128)">0.0</span><span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(0,0,128)">0.0</span><span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">131.162</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">positions</span>.<span style="color:rgb(0,103,124)">append</span>(<span style="color:rgb(128,0,128)">QVector</span><<span style="color:rgb(128,128,0)">double</span>>::<span style="color:rgb(0,103,124)">fromList</span>(<span style="color:rgb(9,46,100)">p1</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)">QList</span><<span style="color:rgb(128,128,0)">double</span>><span style="color:rgb(9,46,100)">p2</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">p2</span><<<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0.0</span><span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(0,0,128)">1.0</span><span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(0,0,128)">0.0</span><span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">130.408</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">positions</span>.<span style="color:rgb(0,103,124)">append</span>(<span style="color:rgb(128,0,128)">QVector</span><<span style="color:rgb(128,128,0)">double</span>>::<span style="color:rgb(0,103,124)">fromList</span>(<span style="color:rgb(9,46,100)">p2</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)">QList</span><<span style="color:rgb(128,128,0)">double</span>><span style="color:rgb(9,46,100)">p3</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">p3</span><<<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">3.0</span><span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(0,0,128)">1.0</span><span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(0,0,128)">0.0</span><span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">131.512</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">positions</span>.<span style="color:rgb(0,103,124)">append</span>(<span style="color:rgb(128,0,128)">QVector</span><<span style="color:rgb(128,128,0)">double</span>>::<span style="color:rgb(0,103,124)">fromList</span>(<span style="color:rgb(9,46,100)">p3</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)">QList</span><<span style="color:rgb(128,128,0)">double</span>><span style="color:rgb(9,46,100)">p4</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">p4</span><<<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0.0</span><span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(0,0,128)">2.0</span><span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(0,0,128)">1.0</span><span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">134.464</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">positions</span>.<span style="color:rgb(0,103,124)">append</span>(<span style="color:rgb(128,0,128)">QVector</span><<span style="color:rgb(128,128,0)">double</span>>::<span style="color:rgb(0,103,124)">fromList</span>(<span style="color:rgb(9,46,100)">p4</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)">QList</span><<span style="color:rgb(128,128,0)">double</span>><span style="color:rgb(9,46,100)">p5</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">p5</span><<<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0.0</span><span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(0,0,128)">3.0</span><span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(0,0,128)">2.0</span><span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">132.8</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">positions</span>.<span style="color:rgb(0,103,124)">append</span>(<span style="color:rgb(128,0,128)">QVector</span><<span style="color:rgb(128,128,0)">double</span>>::<span style="color:rgb(0,103,124)">fromList</span>(<span style="color:rgb(9,46,100)">p5</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)">QList</span><<span style="color:rgb(128,128,0)">double</span>><span style="color:rgb(9,46,100)">p6</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">p6</span><<<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">1.0</span><span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(0,0,128)">2.0</span><span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(0,0,128)">3.0</span><span style="color:rgb(192,192,192)"> </span><<<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">129.458</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">positions</span>.<span style="color:rgb(0,103,124)">append</span>(<span style="color:rgb(128,0,128)">QVector</span><<span style="color:rgb(128,128,0)">double</span>>::<span style="color:rgb(0,103,124)">fromList</span>(<span style="color:rgb(9,46,100)">p6</span>));</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></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,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkPoints</span>><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">points</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)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkParametricSpline</span>><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">spline</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)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkParametricFunctionSource</span>><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">functionSource</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)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkTupleInterpolator</span>><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">interpolatedRadius</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)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkDoubleArray</span>><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">tubeRadius</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)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkPolyData</span>><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">tubePolyData</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)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkTubeFilter</span>><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">tuber</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)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkPolyDataMapper</span>><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">lineMapper</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)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkPolyDataMapper</span>><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">tubeMapper</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)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkActor</span>><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">lineActor</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)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkActor</span>><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">tubeActor</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)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkUnsignedCharArray</span>><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">lineColors</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,0,128)">QVTKOpenGLWidget</span>*<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">vtkWidget</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)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkRenderer</span>><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">renderer</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)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkGenericOpenGLRenderWindow</span>><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">renderWindow</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)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkRenderWindowInteractor</span>><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">rInteractor</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)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkInteractorStyleTrackballCamera</span>><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">style</span><span style="color:rgb(192,192,192)"> </span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></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(9,46,100)">lineColors</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkUnsignedCharArray</span>>::<span style="color:rgb(0,103,124)">New</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">lineColors</span>-><span style="font-style:italic;color:rgb(0,103,124)">SetName</span>(<span style="color:rgb(0,128,0)">"Colors"</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">lineColors</span>-><span style="font-style:italic;color:rgb(0,103,124)">SetNumberOfComponents</span>(<span style="color:rgb(0,0,128)">4</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">points</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkPoints</span>>::<span style="color:rgb(0,103,124)">New</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(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">i</span>=<span style="color:rgb(0,0,128)">0</span>;<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">i</span><span style="color:rgb(192,192,192)"> </span><<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">positions</span>.<span style="color:rgb(0,103,124)">size</span>();<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">i</span>++){</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(9,46,100)">points</span>-><span style="color:rgb(0,103,124)">InsertPoint</span>(<span style="color:rgb(9,46,100)">i</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">positions</span>[<span style="color:rgb(0,103,124)">i</span>][<span style="color:rgb(0,0,128)">0</span>],<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">positions</span>[<span style="color:rgb(0,103,124)">i</span>][<span style="color:rgb(0,0,128)">1</span>],<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">positions</span>[<span style="color:rgb(0,103,124)">i</span>][<span style="color:rgb(0,0,128)">2</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)">float</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">c</span>[<span style="color:rgb(0,0,128)">4</span>]<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span>{<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">static_cast</span><<span style="color:rgb(128,128,0)">float</span>>(<span style="color:rgb(9,46,100)">color</span>.<span style="color:rgb(0,103,124)">red</span>()),<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">static_cast</span><<span style="color:rgb(128,128,0)">float</span>>(<span style="color:rgb(9,46,100)">color</span>.<span style="color:rgb(0,103,124)">green</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)">static_cast</span><<span style="color:rgb(128,128,0)">float</span>>(<span style="color:rgb(9,46,100)">color</span>.<span style="color:rgb(0,103,124)">blue</span>()),<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">static_cast</span><<span style="color:rgb(128,128,0)">float</span>>(<span style="color:rgb(9,46,100)">color</span>.<span style="color:rgb(0,103,124)">alpha</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(9,46,100)">lineColors</span>-><span style="font-style:italic;color:rgb(0,103,124)">InsertNextTuple</span>(<span style="color:rgb(9,46,100)">c</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </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)">Fit</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">a</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">spline</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">to</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)">points</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">spline</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkParametricSpline</span>>::<span style="color:rgb(0,103,124)">New</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">spline</span>-><span style="color:rgb(0,103,124)">SetPoints</span>(<span style="color:rgb(9,46,100)">points</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">functionSource</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkParametricFunctionSource</span>>::<span style="color:rgb(0,103,124)">New</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">functionSource</span>-><span style="font-style:italic;color:rgb(0,103,124)">SetParametricFunction</span>(<span style="color:rgb(9,46,100)">spline</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">functionSource</span>-><span style="font-style:italic;color:rgb(0,103,124)">SetUResolution</span>(<span style="color:rgb(0,0,128)">10</span><span style="color:rgb(192,192,192)"> </span>*<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">points</span>-><span style="color:rgb(0,103,124)">GetNumberOfPoints</span>());</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">functionSource</span>-><span style="font-style:italic;color:rgb(0,103,124)">Update</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)">Interpolate</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)">scalars</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">interpolatedRadius</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkTupleInterpolator</span>><span style="color:rgb(192,192,192)"> </span>::<span style="color:rgb(0,103,124)">New</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">interpolatedRadius</span>-><span style="color:rgb(0,103,124)">SetInterpolationTypeToLinear</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">interpolatedRadius</span>-><span style="color:rgb(0,103,124)">SetNumberOfComponents</span>(<span style="color:rgb(0,0,128)">1</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(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">j</span>=<span style="color:rgb(0,0,128)">0</span>;<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">j</span><span style="color:rgb(192,192,192)"> </span><<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">positions</span>.<span style="color:rgb(0,103,124)">size</span>();<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">j</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(9,46,100)">rad</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,103,124)">convertToz</span>(<span style="color:rgb(9,46,100)">positions</span>[<span style="color:rgb(0,103,124)">j</span>][<span style="color:rgb(0,0,128)">3</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(9,46,100)">interpolatedRadius</span>-><span style="color:rgb(0,103,124)">AddTuple</span>(<span style="color:rgb(9,46,100)">j</span>,<span style="color:rgb(192,192,192)"> </span>&<span style="color:rgb(9,46,100)">rad</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>}</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)">Generate</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)">radius</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">scalars</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">tubeRadius</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkDoubleArray</span>>::<span style="color:rgb(0,103,124)">New</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)">unsigned</span><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(9,46,100)">n</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">functionSource</span>-><span style="color:rgb(0,103,124)">GetOutput</span>()-><span style="font-style:italic;color:rgb(0,103,124)">GetNumberOfPoints</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">tubeRadius</span>-><span style="font-style:italic;color:rgb(0,103,124)">SetNumberOfTuples</span>(<span style="color:rgb(9,46,100)">n</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">tubeRadius</span>-><span style="font-style:italic;color:rgb(0,103,124)">SetName</span>(<span style="color:rgb(0,128,0)">"TubeRadius"</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(9,46,100)">tMin</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">interpolatedRadius</span>-><span style="color:rgb(0,103,124)">GetMinimumT</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(9,46,100)">tMax</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">interpolatedRadius</span>-><span style="color:rgb(0,103,124)">GetMaximumT</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(9,46,100)">r</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(128,128,0)">unsigned</span><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(9,46,100)">i</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0</span>;<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">i</span><span style="color:rgb(192,192,192)"> </span><<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">n</span>;<span style="color:rgb(192,192,192)"> </span>++<span style="color:rgb(9,46,100)">i</span>)</pre>
<pre style="margin-top:0px;margin-bottom:0px"><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(128,128,0)">double</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">t</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span>(<span style="color:rgb(9,46,100)">tMax</span><span style="color:rgb(192,192,192)"> </span>-<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">tMin</span>)<span style="color:rgb(192,192,192)"> </span>/<span style="color:rgb(192,192,192)"> </span>(<span style="color:rgb(9,46,100)">n</span><span style="color:rgb(192,192,192)"> </span>-<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">1</span>)<span style="color:rgb(192,192,192)"> </span>*<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">i</span><span style="color:rgb(192,192,192)"> </span>+<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">tMin</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(9,46,100)">interpolatedRadius</span>-><span style="color:rgb(0,103,124)">InterpolateTuple</span>(<span style="color:rgb(9,46,100)">t</span>,<span style="color:rgb(192,192,192)"> </span>&<span style="color:rgb(9,46,100)">r</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(9,46,100)">tubeRadius</span>-><span style="color:rgb(0,103,124)">SetTuple1</span>(<span style="color:rgb(9,46,100)">i</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">r</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)">float</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">c</span>[<span style="color:rgb(0,0,128)">4</span>]<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span>{<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">static_cast</span><<span style="color:rgb(128,128,0)">float</span>>(<span style="color:rgb(9,46,100)">color</span>.<span style="color:rgb(0,103,124)">red</span>()),<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">static_cast</span><<span style="color:rgb(128,128,0)">float</span>>(<span style="color:rgb(9,46,100)">color</span>.<span style="color:rgb(0,103,124)">green</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)">static_cast</span><<span style="color:rgb(128,128,0)">float</span>>(<span style="color:rgb(9,46,100)">color</span>.<span style="color:rgb(0,103,124)">blue</span>()),<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">static_cast</span><<span style="color:rgb(128,128,0)">float</span>>(<span style="color:rgb(9,46,100)">color</span>.<span style="color:rgb(0,103,124)">alpha</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(9,46,100)">lineColors</span>-><span style="font-style:italic;color:rgb(0,103,124)">InsertNextTuple</span>(<span style="color:rgb(9,46,100)">c</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </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)">Add</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)">scalars</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">to</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)">polydata</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">tubePolyData</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkPolyData</span>>::<span style="color:rgb(0,103,124)">New</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">tubePolyData</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">functionSource</span>-><span style="color:rgb(0,103,124)">GetOutput</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">tubePolyData</span>-><span style="color:rgb(0,103,124)">GetPointData</span>()-><span style="color:rgb(0,103,124)">AddArray</span>(<span style="color:rgb(9,46,100)">tubeRadius</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">tubePolyData</span>-><span style="color:rgb(0,103,124)">GetPointData</span>()-><span style="color:rgb(0,103,124)">SetActiveScalars</span>(<span style="color:rgb(0,128,0)">"TubeRadius"</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)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">set</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)">color</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">array</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">tubePolyData</span>-><span style="color:rgb(0,103,124)">GetPointData</span>()-><span style="color:rgb(0,103,124)">AddArray</span>(<span style="color:rgb(9,46,100)">lineColors</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)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Create</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)">tubes</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">tuber</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkTubeFilter</span>>::<span style="color:rgb(0,103,124)">New</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(9,46,100)">tuber</span>-><span style="color:rgb(0,103,124)">SetInputData</span>(<span style="color:rgb(9,46,100)">tubePolyData</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(9,46,100)">tuber</span>-><span style="font-style:italic;color:rgb(0,103,124)">SetNumberOfSides</span>(<span style="color:rgb(0,0,128)">20</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">tuber</span>-><span style="color:rgb(0,103,124)">SetVaryRadiusToVaryRadiusByAbsoluteScalar</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></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)">Setup</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">actors</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">and</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">mappers</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">lineMapper</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkPolyDataMapper</span>>::<span style="color:rgb(0,103,124)">New</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(9,46,100)">lineMapper</span>-><span style="color:rgb(0,103,124)">SetInputData</span>(<span style="color:rgb(9,46,100)">tubePolyData</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)">lineMapper->SetScalarRange(tubePolyData->GetScalarRange());</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">lineMapper</span>-><span style="color:rgb(0,103,124)">SelectColorArray</span>(<span style="color:rgb(0,128,0)">"Colors"</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">lineActor</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkActor</span>>::<span style="color:rgb(0,103,124)">New</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">lineActor</span>-><span style="font-style:italic;color:rgb(0,103,124)">SetMapper</span>(<span style="color:rgb(9,46,100)">lineMapper</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(9,46,100)">tubeMapper</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkPolyDataMapper</span>>::<span style="color:rgb(0,103,124)">New</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">tubeMapper</span>-><span style="font-style:italic;color:rgb(0,103,124)">SetInputConnection</span>(<span style="color:rgb(9,46,100)">tuber</span>-><span style="color:rgb(0,103,124)">GetOutputPort</span>());</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">tubeMapper</span>-><span style="color:rgb(0,103,124)">SetScalarRange</span>(<span style="color:rgb(9,46,100)">tubePolyData</span>-><span style="color:rgb(0,103,124)">GetScalarRange</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)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Activate</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)">color</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">array</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">tubeMapper</span>-><span style="color:rgb(0,103,124)">SelectColorArray</span>(<span style="color:rgb(0,128,0)">"Colors"</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></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(9,46,100)">tubeActor</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkActor</span>>::<span style="color:rgb(0,103,124)">New</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(9,46,100)">tubeActor</span>-><span style="font-style:italic;color:rgb(0,103,124)">SetMapper</span>(<span style="color:rgb(9,46,100)">tubeMapper</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(9,46,100)">vtkWidget</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">new</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">QVTKOpenGLWidget</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px">    vtkWidget<span style="font-family:Arial,Helvetica,sans-serif">-></span><span style="font-family:Arial,Helvetica,sans-serif;color:rgb(0,103,124)">setMinimumSize</span><span style="font-family:Arial,Helvetica,sans-serif">(</span><span style="font-family:Arial,Helvetica,sans-serif;color:rgb(0,0,128)">800</span><span style="font-family:Arial,Helvetica,sans-serif">,</span><span style="font-family:Arial,Helvetica,sans-serif;color:rgb(0,0,128)">600</span><span style="font-family:Arial,Helvetica,sans-serif">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">renderer</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkRenderer</span>>::<span style="color:rgb(0,103,124)">New</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">renderWindow</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkGenericOpenGLRenderWindow</span>>::<span style="color:rgb(0,103,124)">New</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">style</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkInteractorStyleTrackballCamera</span>>::<span style="color:rgb(0,103,124)">New</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(9,46,100)">renderer</span>-><span style="color:rgb(0,103,124)">AddActor</span>(<span style="color:rgb(9,46,100)">tubeActor</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">renderer</span>-><span style="color:rgb(0,103,124)">AddActor</span>(<span style="color:rgb(9,46,100)">lineActor</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(9,46,100)">vtkWidget</span>-><span style="color:rgb(0,103,124)">SetRenderWindow</span>(<span style="color:rgb(9,46,100)">renderWindow</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">vtkWidget</span>-><span style="font-style:italic;color:rgb(0,103,124)">GetRenderWindow</span>()-><span style="font-style:italic;color:rgb(0,103,124)">AddRenderer</span>(<span style="color:rgb(9,46,100)">renderer</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(9,46,100)">vtkWidget</span>-><span style="font-style:italic;color:rgb(0,103,124)">GetInteractor</span>()-><span style="font-style:italic;color:rgb(0,103,124)">SetInteractorStyle</span>(<span style="color:rgb(9,46,100)">style</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)">QWidget</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">widget</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)">QVBoxLayout</span>*<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">layout</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">new</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">QVBoxLayout</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">layout</span>-><span style="color:rgb(0,103,124)">addWidget</span>(<span style="color:rgb(9,46,100)">vtkWidget</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">widget</span>.<span style="color:rgb(0,103,124)">setLayout</span>(<span style="color:rgb(9,46,100)">layout</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">widget</span>.<span style="color:rgb(0,103,124)">setMaximumSize</span>(<span style="color:rgb(0,0,128)">866</span>,<span style="color:rgb(0,0,128)">600</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">widget</span>.<span style="color:rgb(0,103,124)">show</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)">return</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">a</span>.<span style="color:rgb(0,103,124)">exec</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px">}</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre><div><br></div><div><pre style="margin-top:0px;margin-bottom:0px"><font color="#000080">Thanks,</font></pre></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Abhishek<br><a href="http://zeroth.me" target="_blank">http://zeroth.me</a><br><br></div></div></div></div></div>