[vtkusers] Problem adding actor to a renderer

Roger Blum rogerblum at hawaii.rr.com
Tue May 27 19:49:54 EDT 2008


Hi Goodwin,

Thanks for your reply. Sorry I only get back to you now but I only can 
work in my time off on this project :-)

I finally located the problem. Your hints and some vtk source code 
analysis did the trick.

I originally checked if the actor was added to the renderer by querying 
the actors collection I retrieved from the renderer with getActors.
The vtkImageActor object doesn't seem to be added to this collection. 
When I checked the ViewProps collection the object showed up as being 
added to the renderer.

I also found the spot in my new Tcl code which caused to image not to be 
shown. I was not able to find the reason why it showed when added to the 
2nd renderer, though. But as it works now, I guess I will not 
investigate this further. I still have other things to build and fix.

Thanks again,
Roger

Goodwin Lawlor wrote:
> Hi Roger,
> 
> What changed since your application used to work? Additional code or 
> newer vtk version? Or something else...
> 
> Do you add the same actor to the two renderers? Does creating separate 
> actor/mappers for each renderer do anything?
> 
> Do each of the renderers get added to separate vtkRenderWindow instances?
> 
> Goodwin
> 
> Roger Blum wrote:
>> Hi Goodwin,
>>
>> Unfortunately it's a proprietary application with > 15000 lines of Tcl 
>> code. Extracting the problematic part isn't easy and I'm not sure if 
>> writing a special test script would cause the same problem, as it used 
>> to work the way it is set up.
>> I will post a test script if I'm able to reproduce the problem.
>>
>> Thanks,
>> Roger
>>
>> Goodwin Lawlor wrote:
>>> Roger,
>>>
>>> Can you post a small tcl script illustrating this behaviour?
>>>
>>> Goodwin
>>>
>>> Roger Blum wrote:
>>>> Hello
>>>>
>>>> My Tcl application has 2 renderers: 1 showing an overview window and 
>>>> 1 showing the interactive window where user can zoom, pan, etc.
>>>>
>>>> The background in both windows is a bitmap displayed with a 
>>>> vtkImageActor. This used to work perfectly till recently the 
>>>> overview window stopped showing the image. I can not find the reason 
>>>> for this sudden change.
>>>>
>>>> I' ve found that the actor doesn't get added to the renderer. 
>>>> Writing output before and after the AddActor command shows that the 
>>>> renderer has the same amount of actors before and after the call.
>>>> If I try to add the actor 'manually' from the built-in shell I can 
>>>> add it to the main window but it wouldn't add to the overview window.
>>>>
>>>> What would cause a renderer to not accept an (obviously correctly 
>>>> configured) actor?
>>>
>>>
>>> _______________________________________________
>>> This is the private VTK discussion list.
>>> Please keep messages on-topic. Check the FAQ at: 
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>
>> _______________________________________________
>> This is the private VTK discussion list.
>> Please keep messages on-topic. Check the FAQ at: 
>> http://www.vtk.org/Wiki/VTK_FAQ
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
> 
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the 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