[vtkusers] Problem using vtkImagePlaneWidget

Kevin Keraudren kevin.keraudren10 at imperial.ac.uk
Fri Mar 23 09:52:08 EDT 2012


Hi,

I believe you are not looking at the right thing.

I do not have an explanation, but I think you should not call 
"Initialize()" or "Start()" yourself, the wx object will take care of it 
himself.

Have a look at the attached code which mixes two examples:
  - 
http://www.doc.ic.ac.uk/project/2011/530/g1153011/builds/vtk/src/VTK/Rendering/Testing/Python/TestMapperLUT.py
  - wxVTKRenderWindowInteractorConeExample() in 
wxVTKRenderWindowInteractor.py

If you leave it as it is, it works. If you uncomment the line 
"widget.Initialize()" you obtain the same crash you described.

Maybe you should try building your application step by step, first 
validating the basic functionalities before putting them all together.

Why don't you write first a working object oriented code with the plane 
widget, then you modify it to have the slice selector, validate it 
before going on with the camera stuff and so on...

Kind regards,

Kevin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.py
Type: text/x-python
Size: 4122 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120323/3bebd2a5/attachment.py>


More information about the vtkusers mailing list