Take a look here:<br><a href="http://vtk.org/Wiki/VTK/Examples/Cxx/Filtering/SurfaceFromUnorganizedPoints">http://vtk.org/Wiki/VTK/Examples/Cxx/Filtering/SurfaceFromUnorganizedPoints</a><br>and here:<br><a href="http://vtk.org/Wiki/VTK/Examples/Cxx/Filtering/SurfaceFromUnorganizedPointsWithPostProc">http://vtk.org/Wiki/VTK/Examples/Cxx/Filtering/SurfaceFromUnorganizedPointsWithPostProc</a><br>
<br><br><div class="gmail_quote">On Thu, Jul 5, 2012 at 2:59 PM, Luke Hetrick <span dir="ltr"><<a href="mailto:lhetrick@nnu.edu" target="_blank">lhetrick@nnu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am having some difficulty reading in a .vtk file with information regarding points, vertices, scalars, and normals into a contour filter. When I try to connect the /vtkPolyDataReader to /vtkMarchingContourFilter, it does not see any points to draw contours for. I know there are nearly 7k points in the file but I just can not figure out why the contour filters are not seeing the points. Here is the relevant bit of code I am using in case you are interested:<br>
<br><br> vtkSmartPointer<vtkPolyDataReader> PolyData =<br> vtkSmartPointer<vtkPolyDataReader>::New();<br> PolyData->SetFileName( argv[1] ); <br> PolyData->Update();<br><br> vtkSmartPointer<vtkPolyData> Input =<br>
vtkSmartPointer<vtkPolyData>::New();<br> Input->ShallowCopy( PolyData->GetOutput() );<br><br> vtkSmartPointer<vtkMarchingContourFilter> Extract1 =<br> vtkSmartPointer<vtkMarchingContourFilter>::New();<br>
Extract1->SetInputConnection( Input->GetProducerPort() );<br> Extract1->GenerateValues( atoi( argv[2] ),0,4096 );<br> std::cout << std::endl << "The # of contours is: ";<br> std::cout << Extract1->GetNumberOfContours() << std::endl << std::endl;<br>
<br>It has crossed my mind that perhaps creating contours from points is not possible. Does anyone know if that might be true?<br><br>Thank you for your time and help,<br>Luke H<br>
<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><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br><br>