[IGSTK-Users] Segmentation Fault when Adding and Removing objects
Sandnes Torleif
Torleif.Sandnes at sintef.no
Sun Jan 20 13:13:47 EST 2008
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
More information about the IGSTK-Users
mailing list