[vtkusers] Help with running scripts from VTK book!
Vidya Raghavan
vidya_raghavan at hotmail.com
Mon Jul 26 13:37:01 EDT 2004
Thanks. That worked.
>Vidya,
>
>Just change it in similar way, something like:
> iren AddObserver UserEvent {wm deiconify .vtkInteract}
>
>Please cc your mail to vtkusers too. Have a nice day!
>
>Huiqun Zhou
>
>----- Original Message -----
>From: "Vidya Raghavan" <vidya_raghavan at hotmail.com>
>To: <zhou_huiqun at hotmail.com>
>Sent: Monday, July 26, 2004 12:10 AM
>Subject: Re: [vtkusers] Help with running scripts from VTK book!
>
>
> > Huiqun,
> >
> > Thanks this works! I'm getting one more error though:
> >
> > could not find requested method: SetUserMethod or the method was called
>with incorrect arguments.
> >
> > while executing "iren SetUserMethod {wm deiconify .vtkInteract}"
> >
> > The code is:
> >
> > vtkRenderer ren1
> > vtkRenderWindow renWin
> > renWin AddRenderer ren1
> > vtkRenderWindowInteractor iren
> > iren SetRenderWindow renWin
> >
> > ren1 SetBackground 0.2 0.3 0.4;
> > renWin SetSize 450 450;
> > [ren1 GetActiveCamera] SetViewUp 0 -1 0;
> > [ren1 GetActiveCamera] Azimuth 180;
> > iren Initialize;
> >
> > # render the image
> >
> > #Error!
> > iren SetUserMethod {wm deiconify .vtkInteract};
> >
> >
> >
> >
> >
> >
> > >Vidya,
> > >
> > >I wrote AddObserver() just for short typing. You need change the code
>as
> > >following:
> > >Before change:
> > >filter SetStartMethod your-method
> > >After change:
> > >filter AddObserver StartEvent your-method
> > >
> > >Of course, you need to change SetEndMethod in the similar way, too.
> > >
> > >Hope this help you.
> > >
> > >
> > >Huiqun Zhou
> > >
> > >----- Original Message -----
> > >From: "Vidya Raghavan" <vidya_raghavan at hotmail.com>
> > >To: <zhou_huiqun at hotmail.com>
> > >Sent: Saturday, July 24, 2004 12:49 PM
> > >Subject: Re: [vtkusers] Help with running scripts from VTK book!
> > >
> > >
> > > >
> > > > Hi,
> > > >
> > > > The place where I get error is in:
> > > >
> > > > proc readerStart {} {global NAME; puts -nonewline "$NAME read
>took:\t";
> > >flush stdout};
> > > > reader SetStartMethod readerStart
> > > > proc mcubesStart {} {global NAME; puts -nonewline "$NAME mcubes
> > >generated\t"; flush stdout};
> > > > proc mcubesEnd {} {
> > > > global NAME
> > > > puts -nonewline "[[mcubes GetOutput] GetNumberOfPolys]"
> > > > puts -nonewline " polygons in "
> > > > flush stdout
> > > > };
> > > >
> > > >
> > > > Now if I put AddObserver instead of setStartMethod ,
> > > >
> > > > reader AddObserver() I still get error -> cannot find AddObserver
> > > >
> > > > Am I putting it wrongly in the code?
> > > >
> > > > Please help.
> > > >
> > > > Thanks.
> > > >
> > > > Vidya
> > > >
> > > > >You need to change it to use AddObserver().
> > > > >
> > > > >Huiqun Zhou
> > > > >
> > > > >----- Original Message -----
> > > > >From: "Vidya Raghavan" <vidya_raghavan at hotmail.com>
> > > > >To: <vtkusers at vtk.org>
> > > > >Sent: Saturday, July 24, 2004 6:54 AM
> > > > >Subject: [vtkusers] Help with running scripts from VTK book!
> > > > >
> > > > >
> > > > > > Dear VTK users,
> > > > > >
> > > > > > Do any of you have the book: "The Visualization Toolkit, An
> > > > >Object-Oriented
> > > > > > Approach to 3D Graphics"? If so, would anyone please compile the
> > >following
> > > > > > Tcl script from the frog example (page 427 - pg 438):
> > > > > >
> > > > > > blood.tcl or brain.tcl
> > > > > >
> > > > > > To run these scripts you would need frog.tcl, segmented8.tcl,
> > > > > > SliceOrder.tcl, and the data frog/frogTissue.*
> > > > > >
> > > > > > I am getting an error when I run blood.tcl or brain.tcl "cannot
>find
> > > > > > startMethod for reader in segmented8.tcl".
> > > > > >
> > > > > > I do think the code works for VTK 4.2, since the CD of the
>textbook
> > >has
> > > > >that
> > > > > > version. I just want to check if anyone else is getting the same
>error
> > >or
> > > > > > I'm doing something wrong.
> > > > > >
> > > > > > I really appreicate your help.
> > > > > >
> > > > > > Sincerely,
> > > > > >
> > > > > > Vidya
> > > > > >
> > > > > >
>_________________________________________________________________
> > > > > > News, views and events. Hot downloads 'n pictures.
> > > > > > http://www.msn.co.in/Cinema/ Get it all at MSN Cinema!
> > > > > >
> > > > > > _______________________________________________
> > > > > > This is the private VTK discussion list.
> > > > > > Please keep messages on-topic. Check the FAQ at:
> > > > ><http://public.kitware.com/cgi-bin/vtkfaq>
> > > > > > Follow this link to subscribe/unsubscribe:
> > > > > > http://www.vtk.org/mailman/listinfo/vtkusers
> > > > > >
> > > >
> > > >
> >
> >
_________________________________________________________________
Cricket maniacs ahoy! CDs, books, and more goodies!
http://www.msn.co.in/Shopping/CricketShop/ Available at the cricket shop!
More information about the vtkusers
mailing list