Thanks for your response.  It turns out on my machine that that initialization is too slow.  What&#39;s happening is the following<div>1.  The user click indicating that they want to try a contour</div><div>2.  A new vtkContourWidget is made with the <span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">dijkstra interpolator.</span></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">3.  The contour widget is initialized as I described above with just two points.  Adding that second point is where the slowdown occurs.</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">As far as point 2, I am initializing a contour widget with the output of vtkCutter, but I am subsampling when I do that (I take 7% of the points), so I only have a handful of control points.  Is there a way to frontload the load time so I only have to do it once as opposed to every time a user wants to draw a contour?  That is simply too slow for my application.</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">Also do you have any idea why rendering the meshes is slow?  Could it be related to the point order, or is is something else?</span></font></div>
<div><br><div class="gmail_quote">On Sat, Nov 6, 2010 at 8:54 AM, Karthik Krishnan <span dir="ltr">&lt;<a href="mailto:karthik.krishnan@kitware.com">karthik.krishnan@kitware.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Tue, Nov 2, 2010 at 6:31 AM, Jonathan Morra &lt;<a href="mailto:jonmorra@gmail.com">jonmorra@gmail.com</a>&gt; wrote:<br>
&gt; on vtkDijkstraImageContourLineInterpolator and am able to successfully<br>
&gt; create the contour widget with live wire interpolation. However, when I<br>
&gt; first initialize the contour with the following code it is very slow<br>
&gt;     // For now, we&#39;re just initializing the data with<br>
&gt;     // the point that was clicked<br>
&gt;     vtkPoints points = new vtkPoints();<br>
&gt;<br>
&gt;     // The initial data MUST be at least a &quot;line&quot;<br>
&gt;     // by giving the same point twice we are effictively creating a zero<br>
&gt;     // length line<br>
&gt;     points.InsertNextPoint(lastContourControlPoint);<br>
&gt;     points.InsertNextPoint(lastContourControlPoint);<br>
&gt;     vtkPolyData initialData = new vtkPolyData();<br>
&gt;     initialData.SetPoints(points);<br>
&gt;     contourWidget.Initialize(initialData, 0);<br>
&gt; The line that is slow is the last line.  The weird part is that if I do not<br>
&gt; use live wire, and just use the default Bezier curve interpolation the<br>
&gt; initialization is instant.<br>
<br>
</div>Yes. There are 2 issues here.<br>
<br>
1. The dijkstra interpolator is a bit slow to start with, since during<br>
the time of initialization, it builds the adjacency information. But<br>
that&#39;s not a big deal when you are drawing on an image. The very first<br>
line segment placement is a bit slow (~3 seconds). After that its fast<br>
and interactive.<br>
<br>
2. The real issue, I think, here is the fact that you are initializing<br>
the contour with the contour with lots of control points. How many of<br>
them are there ? As I understand, you are generating these control<br>
points from the output of vtkCutter ? Perhaps you want to sample the<br>
input polyline and then feed those sample points as the control<br>
points.<br>
<br>
Thanks<br>
--<br>
<font color="#888888">karthik<br>
</font></blockquote></div><br></div>