[vtkusers] Represent Grid as Points
Dan Lipsa
dan.lipsa at kitware.com
Mon Aug 14 17:41:36 EDT 2017
Why do you need a vtkPoints? In the example it is only used to create the
points. For a uniform grid (or image data) the points are not stored but
infered from origin and spacing so you should not need them at least for
making something similar with the example work.
Dan
On Mon, Aug 14, 2017 at 4:49 PM, Müller, Jan <J.Mueller at vr.rwth-aachen.de>
wrote:
> This:
> https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/ColoredPoints/
> Plus:
> vtkSmartPointer<vtkUniformGrid> grid = vtkSmartPointer<
> vtkUniformGrid>::New();
> grid->SetDimensions(xsize, ysize, zsize);
>
> vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New();
> for (int i = 0; i < grid->GetNumberOfPoints(); ++i) {
> points->InsertNextPoint(grid->GetPoint(i));
> }
> is pretty much what i do at the moment, I wonder if there is a way to get
> the Points out of a grid without iterating through the whole grid and
> copying every single point it contains.
> Thanks for your help
>
>
> ------------------------------
> *Von:* Bill Lorensen <bill.lorensen at gmail.com>
> *Gesendet:* Montag, 14. August 2017 19:34
> *An:* Dan Lipsa; Müller, Jan
> *Cc:* vtkusers at vtk.org
> *Betreff:* Re: [vtkusers] Represent Grid as Points
>
> Or https://lorensen.github.io/VTKExamples/site/Cxx/
> Visualization/Glyph3DMapper
>
> On Mon, Aug 14, 2017 at 11:57 AM Dan Lipsa <dan.lipsa at kitware.com> wrote:
>
>> Does this help?
>> https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/ColoredPoints/
>>
>> On Mon, Aug 14, 2017 at 9:57 AM, Müller, Jan <J.Mueller at vr.rwth-aachen.de
>> > wrote:
>>
>>> Hi All,
>>>
>>> I am new to VTK and I have trouble visualising just the points of a
>>> "vtkUniformGrid". I create a grid and attach Scalars to its points. So far
>>> so good but when it comes to visualising the points of the grid im having
>>> problems.
>>>
>>>
>>> I found "SetRepresentationToPoints"sadly this only visualises the
>>> surface of my Grid but i want ALL points of the grid.
>>>
>>> The next promising thing I found is "vtkVertexGlyphFilter" but I didnt
>>> manage to find a comfortable way of connecting my Grid to it ,
>>> without creating "vtkPolyData" by iterating through all points of the grid
>>> one by one.
>>>
>>>
>>> I am pretty sure there must be an easy way to visualise a Grid as Points
>>> but im unable to find it.
>>> Any help is very much appreciated!
>>>
>>> Greetings
>>> Jan
>>>
>>>
>>>
>>> _______________________________________________
>>> 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
>>>
>>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://public.kitware.com/mailman/listinfo/vtkusers
>>>
>>>
>> _______________________________________________
>> 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
>>
>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtkusers
>>
> --
> Unpaid intern in BillsBasement at noware dot com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170814/24e1d817/attachment.html>
More information about the vtkusers
mailing list