[IGSTK-Users] ObjectRepresentation lost when displaying it

Luis Ibanez luis.ibanez at kitware.com
Mon Oct 8 07:58:13 EDT 2007


Hi Vincent,

IGSTK follows a data-centered design.

This means that for every real physical object in the surgical scene
we have a corresponding single SpatialObject that contains its
geometrical information.

The display of each one of these SpatialObjects in the views is done
by Representation classes. For a given SpatialObject you need to create
one Representation class per View.

For example, if you have an application with four quadrant views, and
you want to display an ellipsoid, then you do:

   1) Create an EllipsoidSpatialObject
   2) Create four Ellipsoid Representation Object
   3) Connect the four representations to the EllipsoidSpatialObject
   4) Connect the representations one-to-one to each one of the Views.


If you are familiar with VTK, you can think of the IGSTK Representation
classes as a collection of vtkActors. That's actually what they contain
internally. When representing an object in multiple render windows you
need a vtkActor for each one of those render windows.

The Copy method in the representation classes is just a convenience
for you. It makes easier to create multiple identical representation
classes so that you can add each one of them to their respective View.

You will find more details on IGSTK architecture in the IGSTK Book:

     http://www.igstk.org/papers/IGSTKTheBook.pdf



    Regards,


       Luis


---------------------
Vincent Gratsac wrote:
> Hi igstk-users !
> 
> I noticed in many IGSTK Examples that for adding an object 
> representation to display, there is one method per object type.
> I mean that we can find methods called AddCylinder() and AddEllipsoid() 
> in OneViewAndTracking example for instance.
> 
> This is due to the fact that we have to Copy the representation before 
> adding it to display. Why this copy is required ?
> 
> In my application, if I do not copy object representations, then only 
> the last one will be shown.
> 
> Must I write as many methods as objects types used, in order to copy 
> them before adding?
> Could someone help me to understand ?
> 
> Thank you and have a nice day,
> 



More information about the IGSTK-Users mailing list