Re: [wxVTK] wxVTK with python
Brought to you by:
malat
From: Mathieu M. <mat...@gm...> - 2008-06-10 21:02:52
|
Hi Brian, I doubt you'll get much help here, as most people here -AFAIK- only uses the C++ wxVTK. Anyway you did not specify the OS you are running this (very) short python script into ? If this is linux symply run the whole thing via gdb: $ gdb python (gdb) run myscript.py I would suggest you get rid of the ITK dependencie by either rewriting your data into something simple (like vtk format), and then use a simple vtk class to load that data back again. If the gdb backtrace is not clear, feel free to send it here. HTH -Mathieu On Tue, Jun 10, 2008 at 10:53 PM, Brian Eastwood <bea...@em...> wrote: > Hello everyone, > > I have used wxVTK in C++ for a while, and wanted to try it in Python. I > have a fairly simple pipeline, using WrapITK and vtk's python wrappers: > > imageType = itk.Image[itk.US, 3] > reader = itk.ImageFileReader[imageType].New() > reader.SetFileName(fileIn) > > convert = itkvtk.ImageToVTKImageFilter[imageType].New() > convert.SetInput(reader.GetOutput()) > > render = vtk.vtkRenderer() > self.rwi.GetRenderWindow().AddRenderer(render) > > viewer = vtk.vtkImagePlaneWidget() > viewer.SetInput(convert.GetOutput()) > viewer.SetPlaneOrientationToZAxes() > viewer.SetInteractor(self.rwi) > viewer.SetWindowLevel(2000, 1000) > viewer.DisplayTextOn() > viewer.SetSliceIndex(60) > viewer.On() > > self.rwi.GetRenderWindow().Render() > > The image displays, but the application crashes when the render window > is moused-over at wxVTKRenderWindowInteractor line 330: > > self._Iren.MouseMoveEvent() > > Some other widgets don't seem to have this problem (e.g. a vtkImageActor > added to a vtkRenderer by hand). > > I am using: > cmake 2.6.0 > ITK 3.6.0 with WrapITK > VTK 5.0.4 > wxWidgets 2.8.7 > wxVTK packaged from vtk or from the download here: > http://www.vtk.org/cgi-bin/viewcvs.cgi/*checkout*/Wrapping/Python/vtk/wx/wxVTKRenderWindowInteractor.py > > Has any one else had a similar experience? Any help on this would be > very much appreciated. > > Thank you in advance, > Brian Eastwood > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Wxvtk-users mailing list > Wxv...@li... > https://lists.sourceforge.net/lists/listinfo/wxvtk-users > -- Mathieu |