Vtk/Python imageWarp.py example

David Gobbi dgobbi at irus.rri.on.ca
Sat Oct 9 10:40:05 EDT 1999


Hi Dean,

Here is what I do to configure/compile, just in case it helps.
The most critical things are using --with-shared when configuring
and using a recent version of egcs.

 - David

-----
configure: (add --with-mesa if you have mesa instead of libGL.so)

./configure --with-shared --with-python --with-tcl --with-tkwidget
                       --with-patented --with-contrib --with-local

-----
user.make:

TCL_INCLUDE=-I/usr/src/tcl8.0.5/generic
TCL_LIB=-ltcl8.0

TK_INCLUDE=-I/usr/src/tk8.0.5/generic
TK_LIB=-ltk8.0

MESA_INCLUDE=
MESA_LIB=-lMesaGL -lXext

# for python you must set this 
PYTHON_INCLUDES=-I/usr/include/python1.5

# Add additional CFLAGS and CXXFLAGS for compilation
# uncomment the following two lines to set your own flags
#USER_CFLAGS =  
#USER_CXXFLAGS = 

----
system configuration:

RedHat 5.2/6.0
egcs 1.1.2



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.
-----------------------------------------------------------------------------




More information about the vtkusers mailing list