[vtkusers] Re: vtkRenderWindowInteractor event loop

Sarah Graham sarah at cs.jhu.edu
Sat Jul 15 18:53:50 EDT 2000


I am running everything from the console.  I'm working under a time crunch
so don't want to learn how to use Tcl/Tk right now.  Basically, I want to
render a volume, allow the user to interact with the volume and pick
points, and then stop the interaction but not close the renderWindow
with the volume. (with marked points) I then want to do more processing
based on the points that were picked.  

Does that make sense?  Am I making things too complicated somehow?

Thanks,
-sg

On Fri, 14 Jul 2000, K. R. Subramanian wrote:

> 
> What interface language are you  using?  If you use Motif or tcl or
> something
> equivalent, you should be able to control your entire application
> through the interface.. I dont see the need to get back to the main
> program
> after the event loop has begun.
> 
> For instance, after you pick all your points, I would have a button or
> some interface
> widget to indicate the picking is finished to application
> and then it can continue doing other processing.
> 
> You do need to use the application contexts if vtkRenderWindow is
> embedded
> within an interface toolkit like Motif..
> 
> Hope that helps..
> 
>     -- krs
> 
> 
> 
> 
> Message: 2
> Date: Wed, 12 Jul 2000 17:23:58 -0400 (EDT)
> From: Sarah Graham <sarah at cs.jhu.edu>
> To: VTK Mailing List <vtkusers at public.kitware.com>
> Subject: [vtkusers] vtkRenderWindowInteractor event loop
> 
> 
> I use a vtkPointPicker and vtkRenderWindowInteractor to
> interactively (of course ;) rotate a model and select certain points.
> Currently, the interaction is enabled simply by the call iren->Start().
> 
> However, I would like to regain control and perform further processing
> after all the points have been picked.  That is, I would like to be
> able to include commands for execution in main() AFTER the interaction
> occurs rather than simply exiting when "q" is hit.
> 
> 
> I tried using iren->Enable() and iren->Disable() without success.  I
> also tried creating a method for iren's SetExitMethod. It is executed,
> but
> control does not return to main().
> 
> I found a message in the archives that recommends creating a context
> (XtAppContext) and then defining XtAppAddInput on Stdin to map
> characters
> to actions.  I'm not sure if this is the route I should take, though.
> 
> Can someone point me in the right direction?
> 
> Thanks,
> -Sarah
> 
> --
> K.R.Subramanian                           Phone: (301) 435-3264
> National Library of Medicine              FAX:   (301) 402-4080
> Bldg 38A, Rm. B1N30D
> 8600 Rockville Pike, Bethesda, MD 20894
> 
> 
> 

------------------------
Sarah Graham
Johns Hopkins University
sarah at cs.jhu.edu
http://www.sarahgraham.org







More information about the vtkusers mailing list