[vtkusers] Points and Contour Filters

Bill Lorensen bill.lorensen at gmail.com
Thu Jul 5 15:37:21 EDT 2012


Take a look here:
http://vtk.org/Wiki/VTK/Examples/Cxx/Filtering/SurfaceFromUnorganizedPoints
and here:
http://vtk.org/Wiki/VTK/Examples/Cxx/Filtering/SurfaceFromUnorganizedPointsWithPostProc


On Thu, Jul 5, 2012 at 2:59 PM, Luke Hetrick <lhetrick at nnu.edu> wrote:

> 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:
>
>
>   vtkSmartPointer<vtkPolyDataReader> PolyData =
>     vtkSmartPointer<vtkPolyDataReader>::New();
>    PolyData->SetFileName( argv[1] );
>    PolyData->Update();
>
>    vtkSmartPointer<vtkPolyData> Input  =
>      vtkSmartPointer<vtkPolyData>::New();
>    Input->ShallowCopy( PolyData->GetOutput() );
>
>    vtkSmartPointer<vtkMarchingContourFilter> Extract1 =
>      vtkSmartPointer<vtkMarchingContourFilter>::New();
>    Extract1->SetInputConnection( Input->GetProducerPort() );
>    Extract1->GenerateValues( atoi( argv[2] ),0,4096 );
>    std::cout << std::endl << "The # of contours is: ";
>    std::cout << Extract1->GetNumberOfContours() << std::endl << std::endl;
>
> It has crossed my mind that perhaps creating contours from points is not
> possible. Does anyone know if that might be true?
>
> Thank you for your time and help,
> Luke H
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>


-- 
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120705/40833b62/attachment.htm>


More information about the vtkusers mailing list