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

Vincent Gratsac vincent.gratsac at irisa.fr
Fri Jan 25 11:18:50 EST 2008


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/
-----------------------------------------------------



More information about the IGSTK-Users mailing list