[vtkusers] simple vtk application

Florian Bruckner e0425375 at gmail.com
Tue Aug 23 22:04:47 EDT 2011


ok, but can you tell which one of the 2 designs is more efficient for
some cases:

In my case i have multiple files that should be displayed at once (say
max. 16. If I have time-series then there will always be max.16 files
at a time). These files contain an unstructured grid as well as some
vector / scalar data. Mainly I want to be able to display the grid and
then toggle the vectordata (glyph) on and off. The scalar data should
only change the color. So my intention was to create one mapper/actor
for the structure and one mapper/actor for the glyph per file.
Switching glyph on and off is then done by simple adding / removing
the mapper to the proper renderer (there could be more than one if
some files should be displayed next to each other). so this
approximately would give 2*16 actors which are active at a time. do
you think this could be a performance problem?

if i would use this combine-filter i cannot control the color settings
of structure and glyph seperately, right? because then this method is
no option for me. E.g. I would like display the geometry with opacity
and gray color if the glyph is switched on.

thanks Alex for your fast reply
FloB


On Wed, Aug 24, 2011 at 1:43 AM, Alex Malyushytskyy
<alexmalvtk at gmail.com> wrote:
> First, there are a multiple ways you can do things in vtk.
>
> Using multiple actors make sense only if you need an ability easy
> separate object from other objects and might be not efficient
> if you have large number of objects ( if your data has more than few
> hundred objects (pieces/files,) I will avoid using one actor per
> object.
>
> You also probably don't need multiple renderers.
>
> In my practice mostly often I used 2 designs:
>
> 1.  per file: Reader -> filter -> actor
> One window and one renderer per application
>
> 2  per file: Reader -> filter ->
>
> every filter(s) output goes to combining filter as an input (for
> example vtkAppendPolyData)
>
> combining filter-> actor ->
> still one  window and one renderer per application
>
>
>
>
>
> On Tue, Aug 23, 2011 at 3:26 AM, Florian Bruckner <e0425375 at gmail.com> wrote:
>> hi, i'm new to vtk and i have a few design questions. I want to write a
>> simple visualization tool for our data. It should support multiple input
>> files and different filters for each input file. Each filter then needs
>> a mapper and an actor, if I understand that correctly. All those things
>> should be put into an new class asdf_input.
>>
>> Finally there is an renderer window where the data should be displayed.
>> So I would add the proper actors from the asdf_input object and add them
>> to multiple renderers. Then these multiple renderers are added to the
>> renderer window. All these things are put into another class
>> asdf_output.
>>
>> So this is the first plan. But after looking over the vtk class
>> reference i found vtkView, vtkDataRepresentation, ... and i was
>> wondering whether there is already something very similar available.
>>
>> So my question is whether there is already some top-level class
>> available, which allows to simplify the handling of multiple
>> input/filters/renderers.
>>
>> greetings
>> Florian
>>
>>
>> _______________________________________________
>> 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