[IGSTK-Developers] View class refactoring

Andinet Enquobahrie andinet.enqu at kitware.com
Wed Aug 15 12:20:49 EDT 2007


Torleif,

>
> 1. There seems to be missing a transition in the state machine for  
> adding an object after calling RequestInitializeWindowinteractor(). I  
> got this errormessage from the igstkViewNew log output:
>
> (ERROR) In class ViewNew2D No transitions have been defined for  
> current state and input  State = 144 [InteractorInitializedState]  
> Input = 125 [ValidAddObjectInput]


I have added transitions to the InteractorInitializeState with 
ValidAddObjectInput. 
You should be able to add spatial objects after initializing the interactor.

>
>
> 2. I am unable to get interaction working. Looking into the code for  
> igstkViewNew, I cannot see how the m_Reporter of the view is  
> connected to the m_Reporter of the igstkQTWidget. Maybe this should  
> be copied by the proxy? This is what I do:
>
> myWidget = new igstk::QTWidget;
> myView = igstk::ViewNew2D::New();
> myWidget->RequestSetView(myView);
> myView->RequestStart();
> myView->AddObserver(igstk::TransformModifiedEvent(), myObserver);
>

I have committed a fix.  Now, when you set the view in the widget, the 
reporter will be also connected.  So you can add an
observer to the widget and you will be able to listen to 
TransformModified events.

For testing, I have added code snippet that observes TransfomModified 
event and outputs the translation parameter
in OneViewAndTrackingUsingQTWidget.

> 3. I am still missing a method to set the background color of the  
> renderer.


I have added RequestSetRendererBackgroundColor( ... ) method.

Let me know if you see other issues.

Thanks

-Andinet



-- 
==========================================================
Andinet A. Enquobahrie, PhD
R&D Engineer
Kitware Inc.

28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x124
www.kitware.com





More information about the IGSTK-Developers mailing list