Thanks for this update, do you guys have any idea when this might be merged? <br><br><div class="gmail_quote">On Mon, Nov 8, 2010 at 10:46 AM, Sebastien Jourdain <span dir="ltr"><<a href="mailto:sebastien.jourdain@kitware.com">sebastien.jourdain@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Jonathan,<br>
<br>
Rob is currently working on vtkContourWidget to make it much faster.<br>
Right now, its work is not merged to master yet but it's available on<br>
the git stage of VTK...<br>
<br>
Seb<br>
<div><div></div><div class="h5"><br>
<br>
On Mon, Nov 8, 2010 at 1:26 PM, Jonathan Morra <<a href="mailto:jonmorra@gmail.com">jonmorra@gmail.com</a>> wrote:<br>
> Thanks for your response. It turns out on my machine that that<br>
> initialization is too slow. What's happening is the following<br>
> 1. The user click indicating that they want to try a contour<br>
> 2. A new vtkContourWidget is made with the dijkstra interpolator.<br>
> 3. The contour widget is initialized as I described above with just two<br>
> points. Adding that second point is where the slowdown occurs.<br>
> As far as point 2, I am initializing a contour widget with the output of<br>
> vtkCutter, but I am subsampling when I do that (I take 7% of the points), so<br>
> I only have a handful of control points. Is there a way to frontload the<br>
> load time so I only have to do it once as opposed to every time a user wants<br>
> to draw a contour? That is simply too slow for my application.<br>
> Also do you have any idea why rendering the meshes is slow? Could it be<br>
> related to the point order, or is is something else?<br>
> On Sat, Nov 6, 2010 at 8:54 AM, Karthik Krishnan<br>
> <<a href="mailto:karthik.krishnan@kitware.com">karthik.krishnan@kitware.com</a>> wrote:<br>
>><br>
>> On Tue, Nov 2, 2010 at 6:31 AM, Jonathan Morra <<a href="mailto:jonmorra@gmail.com">jonmorra@gmail.com</a>> wrote:<br>
>> > on vtkDijkstraImageContourLineInterpolator and am able to successfully<br>
>> > create the contour widget with live wire interpolation. However, when I<br>
>> > first initialize the contour with the following code it is very slow<br>
>> > // For now, we're just initializing the data with<br>
>> > // the point that was clicked<br>
>> > vtkPoints points = new vtkPoints();<br>
>> ><br>
>> > // The initial data MUST be at least a "line"<br>
>> > // by giving the same point twice we are effictively creating a zero<br>
>> > // length line<br>
>> > points.InsertNextPoint(lastContourControlPoint);<br>
>> > points.InsertNextPoint(lastContourControlPoint);<br>
>> > vtkPolyData initialData = new vtkPolyData();<br>
>> > initialData.SetPoints(points);<br>
>> > contourWidget.Initialize(initialData, 0);<br>
>> > The line that is slow is the last line. The weird part is that if I do<br>
>> > not<br>
>> > use live wire, and just use the default Bezier curve interpolation the<br>
>> > initialization is instant.<br>
>><br>
>> 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'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>
>> karthik<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the VTK FAQ at:<br>
> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
><br>
</blockquote></div><br>