Can you post the polygonal dataset, along with the StartVertex and EndVertex Id&#39;s that were passed onto vtkDijkstraGraphGeodesicPath<br><br>thx<br>--<br>karthik<br><br><div class="gmail_quote">On Thu, Jan 13, 2011 at 11:36 PM, Nicolas Sarrasin <span dir="ltr">&lt;<a href="mailto:nsarrasin@phenix-systems.com">nsarrasin@phenix-systems.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

  

    
  
  <div bgcolor="#ffffff" text="#003333">
    <font size="-1"><font face="Tahoma">Hi all,<br>
        <br>
        I&#39;m coding an application to select edges on a vtkPolyData.<br>
        <br>
        For my needs, I first have to build a wireframe vtkPolyData of
        the input (vtkPolyline-&gt;GetPointIds(...);
        vtkCellArray-&gt;InsertNextCell(vtkPolyLine); </font></font><font size="-1"><font face="Tahoma">vtkPolyData-&gt;SetPoints(..); </font></font><font size="-1"><font face="Tahoma">vtkPolyData-&gt;SetLines(vtkCellArray);</font></font><font size="-1"><font face="Tahoma">...)<br>

        <br>
        This part is ok. Then I use vtkContourWidget with </font></font><font size="-1"><font face="Tahoma">vtkPolygonalSurfacePointPlacer and </font></font><font size="-1"><font face="Tahoma">vtkPolygonalSurfaceContourLineInterpolator
      </font></font><font size="-1"><font face="Tahoma">:<br>
        <br>
        <br>
            vtkSmartPointer&lt;vtkContourWidget&gt; contourWidget =
        vtkSmartPointer&lt;vtkContourWidget&gt;::New();<br>
            contourWidget-&gt;SetInteractor(interactor);<br>
        <br>
            vtkSmartPointer&lt;vtkOrientedGlyphContourRepresentation&gt;
        rep = <br>
               
vtkOrientedGlyphContourRepresentation::SafeDownCast(contourWidget-&gt;GetRepresentation());<br>
            rep-&gt;GetLinesProperty()-&gt;SetColor(1, 0.2, 0);<br>
            rep-&gt;GetLinesProperty()-&gt;SetLineWidth(3.0);<br>
        <br>
            vtkSmartPointer&lt;vtkPolygonalSurfacePointPlacer&gt;
        pointPlacer =<br>
               
        vtkSmartPointer&lt;vtkPolygonalSurfacePointPlacer&gt;::New();<br>
            pointPlacer-&gt;AddProp(actor);<br>
            pointPlacer-&gt;GetPolys()-&gt;AddItem( my_polydata );<br>
            <br>
           
        vtkSmartPointer&lt;vtkPolygonalSurfaceContourLineInterpolator&gt;
        interpolator =<br>
               
vtkSmartPointer&lt;vtkPolygonalSurfaceContourLineInterpolator&gt;::New();<br>
            interpolator-&gt;GetPolys()-&gt;AddItem( </font></font><font size="-1"><font face="Tahoma">my_</font></font><font size="-1"><font face="Tahoma">polydata </font></font><font size="-1"><font face="Tahoma">);<br>

        <br>
            </font></font><font size="-1"><font face="Tahoma">rep-&gt;SetPointPlacer(pointPlacer);</font></font><br>
    <font size="-1"><font face="Tahoma">   
        rep-&gt;SetLineInterpolator(interpolator);<br>
        <br>
            contourWidget-&gt;EnabledOn();<br>
        <br>
        When I pick one point it&#39;s ok but after the second picking I get
        an exception  : &quot;vector subscript out of range&quot; thrown in the
        function vtkDijkstraGraphGeodesicPath::TraceShortestPath().<br>
        <br>
        It appears only if I the LineInterPolator is </font></font><font size="-1"><font face="Tahoma">vtkPolygonalSurfaceContourLineInterpolator.
        It seems that Dijkstra can&#39;t find the path allong the lines.<br>
        <br>
        So I&#39;m asking where does this comes from ?<br>
        <br>
        When I compute a vtkpolyDataConnectivityFilter, it says me I
        have only one region, so my data is right connected (i means I
        have no holes on my polylines).<br>
        <br>
        Is there a filter I can pass to my polydata to make it works ??<br>
        <br>
        Thanks by advance for helping me.<br>
        <br>
        Nicolas<br>
      </font></font>
  </div>

<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <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: <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></blockquote></div><br>