<div dir="ltr">The fix is on gerrit here for review:<div><br></div><div><a href="http://review.source.kitware.com/#/t/4325/">http://review.source.kitware.com/#/t/4325/</a></div><div><br></div><div>Jeff</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Sun, Jun 22, 2014 at 6:45 PM, Martijn Steenwijk <span dir="ltr"><<a href="mailto:martijnsteenwijk@gmail.com" target="_blank">martijnsteenwijk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi Jeff,<br><br>Sorry for the late response. You can drop the error about the nan's. It was another error in my code. So fixing the first issue would be enough.<br><br>Best,<br>Martijn <br></div><div class="HOEnZb">
<div class="h5"><div class="gmail_extra">
<br><br><div class="gmail_quote">On Tue, Jun 17, 2014 at 3:42 PM, Jeff Baumes <span dir="ltr"><<a href="mailto:jeff.baumes@kitware.com" target="_blank">jeff.baumes@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">I did a Windows build where I was able to replicate the first issue (subscript out of range), but not the second issue. Here are some details on my setup:<div><br></div><div>Visual Studio 2010 64-bit</div>
<div>
Boost 1.55.0</div><div>VTK master</div><div>Windows 7</div><div><br></div><div>When I turn on testing and run the following:</div><div><br></div><div>C:\code\VTK-build>"C:\Program Files (x86)\CMake 2.8\bin\ctest.exe" -R Divided -V -C Debug<br>
</div><div><br></div><div>the bundling completes successfully and matches the test image. Can you reproduce your error running the test?</div><span><font color="#888888"><div><br></div><div>Jeff</div></font></span></div>
<div><div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Jun 16, 2014 at 10:53 AM, Martijn Steenwijk <span dir="ltr"><<a href="mailto:martijnsteenwijk@gmail.com" target="_blank">martijnsteenwijk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>I tried the previous conversion-example in my own code (after updating the edgebundling filter); that's why it gave the same values as the output of the edgebundling filter. Stupid, sorry. </div><div>
<br></div><div><br></div><div>BUT; (completely separately from the edgebundlingfilter) conversion from vtkData to </div><div><div><div style="font-family:arial,sans-serif;font-size:13px"> vtkVector3f *nodes = reinterpret_cast<vtkVector3f*>(</div>
<div style="font-family:arial,sans-serif;font-size:13px"> vtkFloatArray::SafeDownCast(g->GetPoints()->GetData())->GetPointer(0));</div></div></div><div>gives zeros for all elements (the IND stuff might result from division somewhere?)</div>
<div><br></div><div>whereas</div><div><div>vtkVector3d *nodes = reinterpret_cast<vtkVector3d*>(</div><div> vtkDoubleArray::SafeDownCast(graph->GetPoints()->GetData())->GetPointer(0));</div></div><div>
gives Access violation reading location 0x000000e0.</div>
<div><br></div><div>So I think this should be done differently I think...</div><div><br></div><div>Thanks again for your help. </div><div><br></div><div>Best,</div><div>Martijn </div></div><div><div>
<div class="gmail_extra"><br><br>
<div class="gmail_quote">On Mon, Jun 16, 2014 at 4:41 PM, Jeff Baumes <span dir="ltr"><<a href="mailto:jeff.baumes@kitware.com" target="_blank">jeff.baumes@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">On second thought this will not work when converting to vtkVector3f, you would need to use vtkVector3d everywhere ...<span><font color="#888888"><div><br></div><div>Jeff</div></font></span></div>
<div><div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Jun 16, 2014 at 10:39 AM, Jeff Baumes <span dir="ltr"><<a href="mailto:jeff.baumes@kitware.com" target="_blank">jeff.baumes@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">See if it works if you change vtkFloatArray to vtkDoubleArray. May be another issue of not testing all cases/systems.<span><font color="#888888"><div><br></div><div>Jeff</div></font></span></div>
<div><div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Jun 16, 2014 at 10:37 AM, Martijn Steenwijk <span dir="ltr"><<a href="mailto:martijnsteenwijk@gmail.com" target="_blank">martijnsteenwijk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi Jeff,<div><br></div><div>It does run, but does not give proper output. I tried to figure out what's going wrong. The filter returns 8 vertices and 11 edges, however the points have values </div><div>
-1.#IND -1.#IND -1.#IND</div>
<div>-1.#IND -1.#IND -1.#IND<br></div><div>-1.#IND -1.#IND -1.#IND<br></div><div>-1.#IND -1.#IND -1.#IND<br></div><div>-1.#IND -1.#IND -1.#IND<br></div><div>-1.#IND -1.#IND -1.#IND<br></div><div>-1.#IND -1.#IND -1.#IND<br>
</div><div>-1.#IND -1.#IND -1.#IND<br></div><div>-1.#IND -1.#IND -1.#IND<br></div><div><br></div><div>I've the feeling th at it already goes wrong at the import of the points; i.e. </div><div><div> vtkVector3f *nodes = reinterpret_cast<vtkVector3f*>(</div>
<div> vtkFloatArray::SafeDownCast(g->GetPoints()->GetData())->GetPointer(0));</div></div><div><br></div><div>std::cout << nodes[0][0] << std::cendl; </div><div><br></div><div>gives already -1.#IND</div>
<div><br></div><div>Best,</div><div>Martijn </div><div><br></div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 16, 2014 at 1:32 PM, Jeff Baumes <span dir="ltr"><<a href="mailto:jeff.baumes@kitware.com" target="_blank">jeff.baumes@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Looks to me like you caught a bug. This does indeed sometimes go off the end of the array, but the potential junk data it gets is always multiplied with an alpha value of 0, so the algorithm still functions properly. It seems this code may not currently be tested in an environment with runtime bounds-checking exceptions. Modifiying the loop with an additional check may resolve the problem (though on my Mac I am not getting the runtime error even though it was going past the end of the array):<br>
<br> for (vtkIdType e = 0; e < numEdges; ++e)<br> {<br> for (int m = 0; m < newMeshCount; ++m)<br> {<br> float indexFloat = (this->MeshCount - 1.0f)*m/(newMeshCount - 1.0f);<br> int index = static_cast<int>(indexFloat);<br>
float alpha = indexFloat - index;<br> vtkVector3f before = this->EdgeMesh[e][index];<br> if (alpha > 0)<br> {<br> vtkVector3f after = this->EdgeMesh[e][index+1];<br> newEdgeMesh[e][m] = before + alpha*(after - before);<br>
}<br> else<br> {<br> newEdgeMesh[e][m] = before;<br> }<br> }<br> }<br><br></div>Let me know if this works for you and we can get a fix into VTK.<span><font color="#888888"><br>
<br>Jeff<br></font></span></div><div><div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Jun 16, 2014 at 6:00 AM, Martijn Steenwijk <span dir="ltr"><<a href="mailto:martijnsteenwijk@gmail.com" target="_blank">martijnsteenwijk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">To add on that. It seems that LayoutEdgePoints() is in its first iteration (so i is 0 at line 530) - this is right after initializeedgemesh().<div><br></div><div>Best,</div><div>Martijn </div></div><div>
<div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Jun 16, 2014 at 11:52 AM, Martijn Steenwijk <span dir="ltr"><<a href="mailto:martijnsteenwijk@gmail.com" target="_blank">martijnsteenwijk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><br></div>Hi Jeff,<div><br></div><div>You're right. At first glance I thought that too, but then got a linker error message which was (after second reading) not related to VTK. Sorry, I should have looked better. </div>
<div><br></div><div>Now it does compile, but I'm getting another error on calling Update() of vtkBoostDividedEdgeBundling: I use the same graph as in the TestBoostDividedEdgeBundling:</div><div><br></div><div><div> graph->AddVertex();</div>
<div> points->InsertNextPoint(20, 40, 0);</div><div> graph->AddVertex();</div><div> points->InsertNextPoint(20, 80, 0);</div><div> graph->AddVertex();</div><div> points->InsertNextPoint(20, 120, 0);</div>
<div> graph->AddVertex();</div><div> points->InsertNextPoint(20, 160, 0);</div><div> graph->AddVertex();</div><div> points->InsertNextPoint(380, 40, 0);</div><div> graph->AddVertex();</div><div> points->InsertNextPoint(380, 80, 0);</div>
<div> graph->AddVertex();</div><div> points->InsertNextPoint(380, 120, 0);</div><div> graph->AddVertex();</div><div> points->InsertNextPoint(380, 160, 0);</div><div> graph->SetPoints(points.GetPointer());</div>
<div><br></div><div> graph->AddEdge(0, 4);</div><div> graph->AddEdge(0, 5);</div><div> graph->AddEdge(1, 4);</div><div> graph->AddEdge(1, 5);</div><div> graph->AddEdge(2, 6);</div><div> graph->AddEdge(2, 7);</div>
<div> graph->AddEdge(3, 6);</div><div> graph->AddEdge(3, 7);</div><div><br></div><div> graph->AddEdge(4, 0);</div><div> graph->AddEdge(5, 0);</div><div> graph->AddEdge(6, 0);</div></div><div><br></div>
<div>Then a "vector subscript out of range" is thrown at line 368 of vtkBoostDividedEdgeBundling.cxx (see image):</div><div><img src="cid:ii_146a40f868a74ba4" alt="Inline image 2" height="410.05477528089887" width="562"><br>
</div><div><br></div><div>it tries to get this->EdgeMesh[e][index+1] where e=0 and index=1 (so element [0][2] is requested), but this->EdgeMesh[e] has length 2. </div><div><br></div><div>Any thoughts how this can be solved? </div>
<div><br></div><div>Best,</div><div>Martijn </div><div><div><div><br></div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 16, 2014 at 3:49 AM, Jeff Baumes <span dir="ltr"><<a href="mailto:jeff.baumes@kitware.com" target="_blank">jeff.baumes@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">You should not need to turn on the vtkInfovisParallel module to compile vtkBoostDividedEdgeBundling. You should be able to just turn vtkInfovisBoostGraphAlgorithms on.<span><font color="#888888"><br>
<br>Jeff<br></font></span></div><div><div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Sat, Jun 14, 2014 at 4:38 AM, Martijn Steenwijk <span dir="ltr"><<a href="mailto:martijnsteenwijk@gmail.com" target="_blank">martijnsteenwijk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="auto"><div>Hi David, </div><div><br></div><div>Thanks for your response. I'm building this module because I would like to use vtkBoostDevidedEdgeBundling which seems to rely on this module (i.e. If I do not compile the module I get a linker error). Or am I doing something wrong?</div>
<div><br></div><div>Is there any quick fix for this?</div><div><br></div><div>Thanks for your response,</div><div>Martijn<br><br>Verstuurd vanaf mijn iPhone</div><div><br>Op 14 jun. 2014 om 00:55 heeft David E DeMarle <<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>> het volgende geschreven:<br>
<br></div><div><div><blockquote type="cite"><div><div dir="ltr">I had that compiling with boost 1.48 on one of the dashboard machines a while back.<div><br></div><div>The module itself hasn't been maintained in a long while and thus I marked it as deprecated in master a few months back. If there is interest in it from the community and someone brings it up to date with current boost and supply tests for the module, I can undeprecate it before 6.2.</div>
<div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div>David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: <a href="tel:518-881-4909" value="+15188814909" target="_blank">518-881-4909</a></div>
<br><br><div class="gmail_quote">On Fri, Jun 13, 2014 at 5:51 PM, Martijn Steenwijk <span dir="ltr"><<a href="mailto:martijnsteenwijk@gmail.com" target="_blank">martijnsteenwijk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">Hi all,<div><br></div><div>I'm trying to compile VTK 6.1.0 on Windows (MSVC 2010) with Boost 1.55.0 and openmpi 1.6.2. I'm getting an error while compiling vtkInfovisParallel / vtkPBGLBreadtFirstSearch.cxx. as listed below. It seems that Boost misses some properties. Could this be related to the Boost version (if so, what could be used best?)</div>
<div><br></div><div>Any help would be appreciated. </div><div><br></div><div>Best,</div><div>Martijn</div><div><div><br></div><div><div>D:\libs\boost_1_55_0\boost/graph/distributed/breadth_first_search.hpp(111): error C2039: 'ref' : is not a member of 'boost::detail::error_property_not_found'</div>
<div>94> D:\libs\boost_1_55_0\boost/pending/detail/property.hpp(16) : see declaration of 'boost::detail::error_property_not_found'</div><div>94> ..\..\..\Infovis\Parallel\vtkPBGLBreadthFirstSearch.cxx(365) : see reference to function template instantiation 'void boost::detail::parallel_bfs_helper<vtkDirectedGraph*,DistributedColorMap,pbgl_bfs_distance_recorder<DistanceMap>,boost::detail::error_property_not_found,boost::vtkGraphIndexMap>(DistributedGraph &,boost::graph_traits<vtkGraph*>::vertex_descriptor,ColorMap,BFSVisitor,BufferRef,VertexIndexMap)' being compiled</div>
<div>94> with</div><div>94> [</div><div>94> DistanceMap=DistributedDistanceMap,</div><div>94> DistributedGraph=vtkDirectedGraph *,</div><div>94> ColorMap=DistributedColorMap,</div>
<div>94> BFSVisitor=pbgl_bfs_distance_recorder<DistributedDistanceMap>,</div><div>94> BufferRef=boost::detail::error_property_not_found,</div><div>94> VertexIndexMap=boost::vtkGraphIndexMap</div>
<div>94> ]</div><div><span style="background-color:rgb(255,255,0)">94>D:\libs\boost_1_55_0\boost/graph/distributed/breadth_first_search.hpp(111): error C2780: 'void boost::breadth_first_search(const VertexListGraph &,graph_traits<G>::vertex_descriptor,const boost::bgl_named_params<T,Tag,Base> &)' : expects 3 arguments - 5 provided</span></div>
<div>94> D:\libs\boost_1_55_0\boost/graph/breadth_first_search.hpp(334) : see declaration of 'boost::breadth_first_search'</div><div>94>D:\libs\boost_1_55_0\boost/graph/distributed/breadth_first_search.hpp(111): error C2780: 'void boost::breadth_first_search(const VertexListGraph &,SourceIterator,SourceIterator,Buffer &,BFSVisitor,ColorMap)' : expects 6 arguments - 5 provided</div>
<div>94> D:\libs\boost_1_55_0\boost/graph/breadth_first_search.hpp(112) : see declaration of 'boost::breadth_first_search'</div><div>94>D:\libs\boost_1_55_0\boost/graph/distributed/breadth_first_search.hpp(111): error C2039: 'ref' : is not a member of 'boost::detail::error_property_not_found'</div>
<div>94> D:\libs\boost_1_55_0\boost/pending/detail/property.hpp(16) : see declaration of 'boost::detail::error_property_not_found'</div><div>94> ..\..\..\Infovis\Parallel\vtkPBGLBreadthFirstSearch.cxx(373) : see reference to function template instantiation 'void boost::detail::parallel_bfs_helper<vtkUndirectedGraph*,DistributedColorMap,pbgl_bfs_distance_recorder<DistanceMap>,boost::detail::error_property_not_found,boost::vtkGraphIndexMap>(DistributedGraph &,boost::graph_traits<vtkGraph*>::vertex_descriptor,ColorMap,BFSVisitor,BufferRef,VertexIndexMap)' being compiled</div>
<div>94> with</div><div>94> [</div><div>94> DistanceMap=DistributedDistanceMap,</div><div>94> DistributedGraph=vtkUndirectedGraph *,</div><div>94> ColorMap=DistributedColorMap,</div>
<div>94> BFSVisitor=pbgl_bfs_distance_recorder<DistributedDistanceMap>,</div><div>94> BufferRef=boost::detail::error_property_not_found,</div><div>94> VertexIndexMap=boost::vtkGraphIndexMap</div>
<div>94> ]</div><div><span style="background-color:rgb(255,255,0)">94>D:\libs\boost_1_55_0\boost/graph/distributed/breadth_first_search.hpp(111): error C2780: 'void boost::breadth_first_search(const VertexListGraph &,graph_traits<G>::vertex_descriptor,const boost::bgl_named_params<T,Tag,Base> &)' : expects 3 arguments - 5 provided</span></div>
<div><span style="background-color:rgb(255,255,0)">94> D:\libs\boost_1_55_0\boost/graph/breadth_first_search.hpp(334) : see declaration of 'boost::breadth_first_search'</span></div><div><span style="background-color:rgb(255,255,0)">94>D:\libs\boost_1_55_0\boost/graph/distributed/breadth_first_search.hpp(111): error C2780: 'void boost::breadth_first_search(const VertexListGraph &,SourceIterator,SourceIterator,Buffer &,BFSVisitor,ColorMap)' : expects 6 arguments - 5 provided</span></div>
<div>94> D:\libs\boost_1_55_0\boost/graph/breadth_first_search.hpp(112) : see declaration of 'boost::breadth_first_search'</div><div>108>------ Build started: Project: ALL_BUILD, Configuration: Debug Win32 ------</div>
<div>108> Build all projects</div><div>========== Build: 105 succeeded, 3 failed, 24 up-to-date, 0 skipped ==========</div></div><div><br></div></div></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://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>
</div></blockquote></div></div></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://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>