[vtkusers] How to 'best' visualize meshed objects with VTK?

David E DeMarle dave.demarle at kitware.com
Fri Apr 8 09:45:50 EDT 2011


I just meant rendering of polygons. See vtkDataSetSurfaceFilter which
takes in any vtkDataSet and produces polygons of its external faces,
which are all you see unless you want to use opacity to see inside.

You might also consider vtkAppendPolyDataFilter, which will merge your
many vtkPolyDatas into one vtkPolyData and then you can have exactly
one actor. You may get still faster rendering of that.

David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109



On Fri, Apr 8, 2011 at 1:02 AM, Petr Lorenz <petr.lorenz at ieee.org> wrote:
> Thank you for the hints.
>
> I have now solved the problem by creating one vtkPolyData object for each
> discretized object and drawing there the cubes of the object as polygons (6
> faces for each cube). In this way I have only as many actors as I have
> objects and things are much faster.
>
> I find also interesting the idea of using surface rendering. As I am not so
> deep in VTK yet, could you provide me with a simple example, or a hint where
> to look, on how this can be done? Will this render the surface of an object
> only?
>
> Thank you.
>
> Petr
>
> Am 04.04.11 15:35, schrieb David E DeMarle:
>>
>> Also, avoid using many actors whenever possible. Besides volume
>> rendering, consider using a threshold filter to remove the empty cells
>> and then use simple surface rendering to show the rest.
>>
>> David E DeMarle
>> Kitware, Inc.
>> R&D Engineer
>> 28 Corporate Drive
>> Clifton Park, NY 12065-8662
>> Phone: 518-371-3971 x109
>>
>>
>>
>> 2011/4/4 Dženan Zukić<dzenanz at gmail.com>:
>>>
>>> Is volume rendering applicable to your case?
>>> HTH
>>>
>>> On Tue, Mar 29, 2011 at 17:45, Petr Lorenz<petr.lorenz at ieee.org>  wrote:
>>>>
>>>> Hello,
>>>>
>>>> I have a mesh = rectilinear grid, and objects meshed in this grid. To
>>>> each
>>>> "cell" of the grid either an object is assigned, or the cell is left
>>>> empty.
>>>> Now I want to visualize the non-empty cells with differently colored
>>>> cubes
>>>> (cells) with a color corresponding to specific objects.
>>>>
>>>> The primitive way I used for the visualization is to create a
>>>> vtkCubeSource->vtkPolyDataMapper->vtkActor pipeline for each non-empty
>>>> cell
>>>> and see in this way the meshed objects. However, the number of cells in
>>>> a
>>>> typical mesh is about 1.000.000 with ca. 100.000 non-empty cells, which
>>>> results in very large processing time of VTK making any interactive
>>>> usage
>>>> impossible.
>>>>
>>>> Does anybody have an idea how to do the visualization in a better way?
>>>> Can
>>>> I maybe somehow use glyphing?
>>>>
>>>> Many thanks!
>>>> Petr
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>>
>>> _______________________________________________
>>> 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
>>>
>>>
>



More information about the vtkusers mailing list