I have just merged the updated contour widget a couple minutes ago. The changes increase the speed of initializing the widget with large datasets (100K+ points ), and also increases the active point location speed.<div><br>

</div><div><br><div class="gmail_quote">On Mon, Nov 8, 2010 at 3:53 PM, Sebastien Jourdain <span dir="ltr">&lt;<a href="mailto:sebastien.jourdain@kitware.com">sebastien.jourdain@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;">

No, we don&#39;t know yet...<br>
Rob still need to validate its fix with our internal users...<br>
<br>
Seb<br>
<div><div></div><div class="h5"><br>
On Mon, Nov 8, 2010 at 1:48 PM, Jonathan Morra &lt;<a href="mailto:jonmorra@gmail.com">jonmorra@gmail.com</a>&gt; wrote:<br>
&gt; Thanks for this update, do you guys have any idea when this might be merged?<br>
&gt;<br>
&gt;<br>
&gt; On Mon, Nov 8, 2010 at 10:46 AM, Sebastien Jourdain<br>
&gt; &lt;<a href="mailto:sebastien.jourdain@kitware.com">sebastien.jourdain@kitware.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hi Jonathan,<br>
&gt;&gt;<br>
&gt;&gt; Rob is currently working on vtkContourWidget to make it much faster.<br>
&gt;&gt; Right now, its work is not merged to master yet but it&#39;s available on<br>
&gt;&gt; the git stage of VTK...<br>
&gt;&gt;<br>
&gt;&gt; Seb<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Mon, Nov 8, 2010 at 1:26 PM, Jonathan Morra &lt;<a href="mailto:jonmorra@gmail.com">jonmorra@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; Thanks for your response.  It turns out on my machine that that<br>
&gt;&gt; &gt; initialization is too slow.  What&#39;s happening is the following<br>
&gt;&gt; &gt; 1.  The user click indicating that they want to try a contour<br>
&gt;&gt; &gt; 2.  A new vtkContourWidget is made with the dijkstra interpolator.<br>
&gt;&gt; &gt; 3.  The contour widget is initialized as I described above with just two<br>
&gt;&gt; &gt; points.  Adding that second point is where the slowdown occurs.<br>
&gt;&gt; &gt; As far as point 2, I am initializing a contour widget with the output of<br>
&gt;&gt; &gt; vtkCutter, but I am subsampling when I do that (I take 7% of the<br>
&gt;&gt; &gt; points), so<br>
&gt;&gt; &gt; I only have a handful of control points.  Is there a way to frontload<br>
&gt;&gt; &gt; the<br>
&gt;&gt; &gt; load time so I only have to do it once as opposed to every time a user<br>
&gt;&gt; &gt; wants<br>
&gt;&gt; &gt; to draw a contour?  That is simply too slow for my application.<br>
&gt;&gt; &gt; Also do you have any idea why rendering the meshes is slow?  Could it be<br>
&gt;&gt; &gt; related to the point order, or is is something else?<br>
&gt;&gt; &gt; On Sat, Nov 6, 2010 at 8:54 AM, Karthik Krishnan<br>
&gt;&gt; &gt; &lt;<a href="mailto:karthik.krishnan@kitware.com">karthik.krishnan@kitware.com</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; On Tue, Nov 2, 2010 at 6:31 AM, Jonathan Morra &lt;<a href="mailto:jonmorra@gmail.com">jonmorra@gmail.com</a>&gt;<br>
&gt;&gt; &gt;&gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt; on vtkDijkstraImageContourLineInterpolator and am able to<br>
&gt;&gt; &gt;&gt; &gt; successfully<br>
&gt;&gt; &gt;&gt; &gt; create the contour widget with live wire interpolation. However, when<br>
&gt;&gt; &gt;&gt; &gt; I<br>
&gt;&gt; &gt;&gt; &gt; first initialize the contour with the following code it is very slow<br>
&gt;&gt; &gt;&gt; &gt;     // For now, we&#39;re just initializing the data with<br>
&gt;&gt; &gt;&gt; &gt;     // the point that was clicked<br>
&gt;&gt; &gt;&gt; &gt;     vtkPoints points = new vtkPoints();<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;     // The initial data MUST be at least a &quot;line&quot;<br>
&gt;&gt; &gt;&gt; &gt;     // by giving the same point twice we are effictively creating a<br>
&gt;&gt; &gt;&gt; &gt; zero<br>
&gt;&gt; &gt;&gt; &gt;     // length line<br>
&gt;&gt; &gt;&gt; &gt;     points.InsertNextPoint(lastContourControlPoint);<br>
&gt;&gt; &gt;&gt; &gt;     points.InsertNextPoint(lastContourControlPoint);<br>
&gt;&gt; &gt;&gt; &gt;     vtkPolyData initialData = new vtkPolyData();<br>
&gt;&gt; &gt;&gt; &gt;     initialData.SetPoints(points);<br>
&gt;&gt; &gt;&gt; &gt;     contourWidget.Initialize(initialData, 0);<br>
&gt;&gt; &gt;&gt; &gt; The line that is slow is the last line.  The weird part is that if I<br>
&gt;&gt; &gt;&gt; &gt; do<br>
&gt;&gt; &gt;&gt; &gt; not<br>
&gt;&gt; &gt;&gt; &gt; use live wire, and just use the default Bezier curve interpolation<br>
&gt;&gt; &gt;&gt; &gt; the<br>
&gt;&gt; &gt;&gt; &gt; initialization is instant.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Yes. There are 2 issues here.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; 1. The dijkstra interpolator is a bit slow to start with, since during<br>
&gt;&gt; &gt;&gt; the time of initialization, it builds the adjacency information. But<br>
&gt;&gt; &gt;&gt; that&#39;s not a big deal when you are drawing on an image. The very first<br>
&gt;&gt; &gt;&gt; line segment placement is a bit slow (~3 seconds). After that its fast<br>
&gt;&gt; &gt;&gt; and interactive.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; 2. The real issue, I think, here is the fact that you are initializing<br>
&gt;&gt; &gt;&gt; the contour with the contour with lots of control points. How many of<br>
&gt;&gt; &gt;&gt; them are there ? As I understand, you are generating these control<br>
&gt;&gt; &gt;&gt; points from the output of vtkCutter ? Perhaps you want to sample the<br>
&gt;&gt; &gt;&gt; input polyline and then feed those sample points as the control<br>
&gt;&gt; &gt;&gt; points.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Thanks<br>
&gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt; karthik<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Visit other Kitware open-source projects at<br>
&gt;&gt; &gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt;&gt; &gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; &gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Robert Maynard<br>
</div>