Vtk/Python imageWarp.py example

David Gobbi dgobbi at irus.rri.on.ca
Sat Oct 9 21:48:42 EDT 1999


Hi Dean,

I haven't ever seen the problem you describe, and can't think of an easy
solution (except for upgrading your compiler and/or operating system,
which isn't exactly easy).

You might have to use gdb to identify the problem.  To get you started,
to use gdb on a python program you should do this:

gdb `which python`      <note: use backquotes>
(gdb) run imageWarp.py

press 'control-C' once the program freezes

(gdb) backtrace

You can do 'continue', 'control-C', 'backtrace' a few times until you
stop in a piece of code which you think you can figure out.  Yes, it
does seem masochistic -- bugtracking never is very fun. 

 - David


On Sat, 9 Oct 1999, Dean N. Williams wrote:

> Hi David,
> 
>     Thanks for answering my question. But the Vtk/Python examples continue
>     to not respond with the "renWin.Render()" call just before the "iren.Start()".
> 
>     For example, the code now has:
> 
> # prevent the tk window from showing up then start the event loop
> #wm withdraw .
> renWin.Render()
> iren.Start()
> 
>     But when I try to execute the code "spToPd.py", I get nothing! Not even
>     a canvas! It doesn't core dump either.
> 
>     By adding: "USER_CFLAGS = -O2 -D__NO_MATH_INLINES" and
>     "USER_CXXFLAGS = -O2 -D__NO_MATH_INLINES" to the user.make
>     file, I am now able to run examples like headBone.py and
> TestImageMarchingCubes.py.
>     Is there something else that I should remove or add in order to run the
> examples:
>     "imageWarp.py",  "thrshldV.py", "spToPd.py", and "officeStreamPoints.py"?
> 
>     It was suggested in a response that I remove the -DVTK_USE_PTHREADS from
> CFLAGS
>     and CXXFLAGS in the system.make file and then recompile. I did this as well
> and still
>     the same response. Nothing happens when executing the command. That is, no
> canvas,
>     no seg fault, no nothing. It just sit there.
> 
>     Can anyone give me some guidance on the error? I must get this to work.
> 
>     Thanks in advance for any suggestions or comments...
> 
> Best Regards,
>     Dean
> 
> >
> > The VTK/Python bug you describe has been around, at least on my
> > system, since vtk 2.3 or thereabouts).  It has been reported two or
> > three times.  Several of the examples in graphics/examplesPython are
> > afflicted.  The bug is not present under Windows, only UNIX.
> >
> > The symptoms are: an empty window pops up, and clicking in the
> > window results in a segfault.
> >
> > An easy work around is to add "renWin.Render()" immediately
> > before "iren.Start()".
> >
> >  - David
> >
> > --David Gobbi, MSc                    dgobbi at irus.rri.on.ca
> >   Advanced Imaging Research Group
> >   Robarts Research Institute, University of Western Ontario
> >
> > On Fri, 8 Oct 1999, Dean N. Williams wrote:
> >
> > > Dear Vtk community,
> > >
> > >     I am developing Vtk visualization using the Python interface and
> > > PC/Linux Red Hat 5.2.
> > >
> > >     I am noticing that certain Vtk/Python scripts are not working. For
> > > example: imageWarp.py
> > >     just sits at the prompt and does not core dump or display a canvas
> > > with an image.
> > >
> > >     Other do nothing Vtk/Python scripts are: thrshldV.py, spToPd.py, and
> > > officeStreamPoints.py
> > >
> > >     Has anyone else using Vtk/Python run across this same problem, and
> > > how did you fix it?
> > >
> > >     Thanks in advance.
> > >
> > > Best Regards,
> > >         Dean
> > >
> > >
> > > --
> > > Dean N. Williams
> > > Computer Scientist/Computation Group Leader             o
> > > Lawrence Livermore National Laboratory                --
> > > Livermore, California 94550                          `\< *
> > > Phone: (925) 423-0145    FAX: (925) 422-7675        /  \
> > > http://www-pcmdi.llnl.gov                         williams13 at llnl.gov
> > >
> > >
> > >
> > >
> > >
> > > -----------------------------------------------------------------------------
> > > This is the private VTK discussion list.  Please keep messages on-topic.
> > > Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
> > > To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
> > > <majordomo at gsao.med.ge.com>.  For help, send message body containing
> > > "info vtkusers" to the same address.     Live long and prosper.
> > > -----------------------------------------------------------------------------
> > >
> 
> --
> Dean N. Williams
> Computer Scientist/Computation Group Leader             o
> Lawrence Livermore National Laboratory                --
> Livermore, California 94550                          `\< *
> Phone: (925) 423-0145    FAX: (925) 422-7675        /  \
> http://www-pcmdi.llnl.gov                         williams13 at llnl.gov
> 
> 
> 
> 
> 
> -----------------------------------------------------------------------------
> This is the private VTK discussion list.  Please keep messages on-topic.
> Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
> To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
> <majordomo at gsao.med.ge.com>.  For help, send message body containing
> "info vtkusers" to the same address.     Live long and prosper.
> -----------------------------------------------------------------------------
> 



-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------




More information about the vtkusers mailing list