[vtkusers] Represent Grid as Points
Müller, Jan
J.Mueller at vr.rwth-aachen.de
Tue Aug 15 04:15:22 EDT 2017
That is exactly what I was looking for, Thank you!
________________________________________
Von: Bill Lorensen <bill.lorensen at gmail.com>
Gesendet: Dienstag, 15. August 2017 02:30
An: Müller, Jan
Cc: Dan Lipsa; vtkusers at vtk.org
Betreff: Re: [vtkusers] Represent Grid as Points
Try this:
https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/Glyph3DImage/
On Mon, Aug 14, 2017 at 5:50 PM, Müller, Jan
<J.Mueller at vr.rwth-aachen.de> wrote:
> My goal is to visualise the points (and only the points) of a grid as points
> and i found no other way then converting the grid into vtkPoints.
>
> ________________________________
> Von: Dan Lipsa <dan.lipsa at kitware.com>
> Gesendet: Montag, 14. August 2017 23:41
> An: Müller, Jan
>
> Cc: vtkusers at vtk.org
> Betreff: Re: [vtkusers] Represent Grid as Points
>
> 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
>
>
>
> _______________________________________________
> 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
More information about the vtkusers
mailing list