[Paraview] Filter to keep points, dropping topology

Biddiscombe, John A. biddisco at cscs.ch
Wed Oct 22 10:52:43 EDT 2014


Output->SetPoints(input->GetPoints());

Or

Output->CopyStructure(input);
Output->SetCells(NULL)

Then copy point field data etc


On 22/10/14 16:19, "B.W.H. van Beest" <bwvb at xs4all.nl> wrote:

>Hello,
>
>I need a filter that only keeps the 3D points of a certain source (e.g.
>coming from  an stl file).
>The topology of the data set may go.
>
>I thought that the following filter, only passing through the pointdata,
>would do the job,
>but that appears not to be the case (no points after the filter!)
>What's going wrong and how should I change the filter?
>
>Kind Regards,
>Bertwim
>
>================
>
>int FilterPoints::RequestData( vtkInformation*,
>                                             vtkInformationVector**
>inputVector,
>                                             vtkInformationVector*
>outputVector)
>{
>   // Get the input and output data objects.
>   vtkDataSet* input = vtkDataSet::GetData( inputVector[0] );
>   vtkDataSet* output = vtkDataSet::GetData( outputVector );
>
>   // output->CopyStructure( input );
>   output->GetPointData()->PassData( input->GetPointData() );
>  
>   return 1;
>}
>
>_______________________________________________
>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 ParaView Wiki at:
>http://paraview.org/Wiki/ParaView
>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/paraview



More information about the ParaView mailing list