[IGSTK-Users] Segmentation Fault when Adding and Removing objects

Vincent Gratsac vincent.gratsac at irisa.fr
Mon Jan 28 04:51:29 EST 2008


Hi Matt,

It seems that the problem is not resolved for me. Maybe I do something 
wrong, so I attach an example which should underline the problem. This 
example is very similar to the one I attached a few days ago.

If you add the object representation, remove it, and add it again, it 
will be not displayed.

Please, let me know if you can reproduce the problem or if I do some misuse.

Thank you,

Vincent

Matt Turek a écrit :
>
>
> I'm sorry for the confusion; my comment was meant as a way to 
> understand the problem.
>
> Changes have been made to the Sandbox code, though, since my original 
> comment. I would expect that these changes, specifically to the reset 
> camera code in the view, would have fixed this issue.
>
> Please let me know if you are still having the problem with the 
> current version of the Sandbox and without the change to 
> ObjectRepresentation visibility.
>
> Thanks,
> Matt
>
>
> Vincent Gratsac wrote:
>> Hi Torleif,
>>
>> Thank you for your reply and sorry for the delay.
>>
>> Actually, these changes correct the adding/removing problem, but is 
>> it correct to set all ObjectRepresentation visible by default ? Is 
>> this a way to determine and to understand to problem, or is this a 
>> solution ?
>>
>> Have a nice day,
>>
>> Vincent
>>
>> Sandnes Torleif a écrit :
>>> Hi Vincent. I got this reply from Matt Turek. After making the 
>>> changes he proposed, the adding/removing problem went away.
>>>
>>> Torleif
>>>
>>> -----Original Message-----
>>> From: Matt Turek [mailto:matt.turek at kitware.com]
>>> Sent: Thu 11/29/2007 9:44 PM
>>> To: Sandnes Torleif
>>> Cc: Andinet Enquobahrie
>>> Subject: Re: [IGSTK-Developers] Problem adding and removing 
>>> MeshObjectRepresentation to ViewNew3D
>>>  
>>>
>>> Torleif,
>>>
>>> Would you try changing the following lines in igstkObjectRepresentation
>>>
>>> from:
>>>
>>> /** Add an actor to the actors list */
>>> void ObjectRepresentation::AddActor( vtkProp * actor )
>>> {
>>>   // Initialize objects as invisible until we learn from their 
>>> Transform time stamp.
>>>   actor->VisibilityOff();
>>>   m_Actors.push_back( actor );
>>> }
>>>
>>> to:
>>>
>>> /** Add an actor to the actors list */
>>> void ObjectRepresentation::AddActor( vtkProp * actor )
>>> {
>>>   // Initialize objects as invisible until we learn from their 
>>> Transform time stamp.
>>>   actor->VisibilityOn(); // <-- HERE
>>>   m_Actors.push_back( actor );
>>> }
>>>
>>> This change will help us understand if there's an issue related to 
>>> the visibility state machine in the object representation.
>>>
>>> Thanks,
>>> Matt
>>>
>>>
>>> Torleif Sandnes wrote:
>>>  
>>>> Hi.
>>>>
>>>> I have tried to use igstk::MeshObjectRepresentation in my 
>>>> application, but I have encountered some problems using it:
>>>>
>>>> 1. I first load the meshobject and set up the representation. In a 
>>>> separate operation initiated by the user, I add the representation 
>>>> to the view. It seems I have to do the add operation twice to show 
>>>> the loaded mesh.
>>>>
>>>> 2. When I remove the meshobject from the view, I cannot add it back 
>>>> to the view no matter how many times I perform RequestAddObject on 
>>>> the View.
>>>>
>>>> Can anybody explain why this happens?
>>>> Am I doing something wrong, or does the problem lie in the mesh 
>>>> representation object?
>>>>
>>>> I have attached a minimal example that shows the behaviour I describe.
>>>> Note that this example is built against a slightly old version of 
>>>> the sandbox.
>>>>
>>>> Regards
>>>>
>>>> Torleif Sandnes
>>>>
>>>> ------------------------------------------------------------------------ 
>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------ 
>>>>
>>>>
>>>> _______________________________________________
>>>> IGSTK-Developers mailing list
>>>> IGSTK-Developers at public.kitware.com
>>>> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-developers
>>>>     
>>>
>>>   
>>
>
>

-- 
Vincent Gratsac
----------------------------------------------------
Unité/Projet VisAGeS U746
INSERM/INRIA/CNRS/U. de Rennes I
IRISA
Campus de Beaulieu, 35042 Rennes Cedex, France

Ph:  +33 (0) 2 23 23 49 20/ Fax: +33/0 2 99 84 71 71
email: Vincent.Gratsac at irisa.fr
http://www.irisa.fr/visages/
-----------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: AddRemoveTest.tar.gz
Type: application/x-gzip
Size: 4610 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/igstk-users/attachments/20080128/26ee3c99/attachment.bin>


More information about the IGSTK-Users mailing list