SetPoints is present in vtkDataSets that are subclasses of vtkPointSet

You said you didn’t want any topology, so I didn’t think you wanted vertex
cells.

vtkSmartPointer<vtkCellArray> vertices =
vtkSmartPointer<vtkCellArray>::New();
    vtkIdType *cells = vertices->WritePointer(Nt, 2*Nt);
    for (vtkIdType i=0; i<Nt; ++i)
      {
      cells[2*i] = 1;
      cells[2*i+1] = i;
      }
    output->SetVerts(vertices);
    }




On 22/10/14 17:15, "B.W.H. van Beest" <b...@xs4all.nl> wrote:

>Are you saying that one cannot have just points?
>
>In my case, I want to  snap the points to a structured grid,
>but haven't done that yet, as I wanted to see the
>points first, and do the snapping as a next step.
>So that is not a good idea? I need to do it all in one go?
>
>Regards,
>Bertwim
>
>
>
>
>
>On 10/22/2014 04:58 PM, Burlen Loring wrote:
>> don't forget to add vertex type cells, or you will not be able to see
>> the points,  and that it's going to be more complicated if you're
>> starting from data types that have implicit points.
>>
>>
>> On 10/22/2014 07:52 AM, Biddiscombe, John A. wrote:
>>> 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" <b...@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
>>> _______________________________________________
>>> 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
>>
>>
>>
>
>_______________________________________________
>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

_______________________________________________
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

Reply via email to