<html><body><div style="color:#000; background-color:#fff; font-family:tahoma, new york, times, serif;font-size:10pt"><div style="font-family: tahoma, 'new york', times, serif; font-size: 10pt;"><span>Still no one interested in this topic?</span></div><div style="font-family: tahoma, 'new york', times, serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span><br></span></div><div style="font-family: tahoma, 'new york', times, serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span>I also tried it with the Enthought Suite. No chance. The same error. I compiled VTK myself. No chance. Do I have to compile VTK in a special way?&nbsp;</span></div><div style="font-family: tahoma, 'new york', times, serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span><br></span></div><div style="font-family: tahoma, 'new york', times,
 serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span>I have debugged into the error and it always occurs when vtkCallbackCommand::Execute is called (this is the callback registered by the widget):</span></div><div style="font-family: tahoma, 'new york', times, serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span><br></span></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 13px; font-family: tahoma, 'new york', times, serif; font-style: normal;"><span><div style="color: rgb(0, 0, 0); font-family: tahoma, 'new york', times, serif; font-size: 13px; font-style: normal; background-color: transparent;"><font size="2">&nbsp;<span class="Apple-tab-span" style="white-space: pre;">        </span>ntdll.dll!77b9013d() <span class="Apple-tab-span" style="white-space: pre;">        </span></font></div><div style="color: rgb(0, 0, 0); font-family:
 tahoma, 'new york', times, serif; font-size: 13px; font-style: normal; background-color: transparent;"><font size="2">&nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span>[Unten angegebene Rahmen sind möglicherweise nicht korrekt und/oder fehlen, keine Symbole geladen für ntdll.dll]<span class="Apple-tab-span" style="white-space:pre">        </span></font></div><div style="color: rgb(0, 0, 0); font-family: tahoma, 'new york', times, serif; font-size: 13px; font-style: normal; background-color: transparent;"><font size="2">&nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span>ntdll.dll!77b9013d() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div><div style="color: rgb(0, 0, 0); font-family: tahoma, 'new york', times, serif; font-size: 13px; font-style: normal; background-color: transparent;"><font size="2">&nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span>KernelBase.dll!763015e9() <span
 class="Apple-tab-span" style="white-space:pre">        </span></font></div><div style="color: rgb(0, 0, 0); font-family: tahoma, 'new york', times, serif; font-size: 13px; font-style: normal; background-color: transparent;"><font size="2">&nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span>ntdll.dll!77be74df() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div><div style="color: rgb(0, 0, 0); font-family: tahoma, 'new york', times, serif; font-size: 13px; font-style: normal; background-color: transparent;"><font size="2">&nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span>ntdll.dll!77be73bc() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div><div style="color: rgb(0, 0, 0); font-family: tahoma, 'new york', times, serif; font-size: 13px; font-style: normal; background-color: transparent;"><font size="2">&nbsp;<span class="Apple-tab-span" style="white-space:pre">
        </span>ntdll.dll!77be7261() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div><div style="color: rgb(0, 0, 0); font-family: tahoma, 'new york', times, serif; font-size: 13px; font-style: normal; background-color: transparent;"><font size="2">&nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span>ntdll.dll!77bcb459() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div><div style="color: rgb(0, 0, 0); font-family: tahoma, 'new york', times, serif; font-size: 13px; font-style: normal; background-color: transparent;"><font size="2">&nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span>ntdll.dll!77bcb42b() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div><div style="color: rgb(0, 0, 0); font-family: tahoma, 'new york', times, serif; font-size: 13px; font-style: normal; background-color: transparent;"><font size="2">&nbsp;<span class="Apple-tab-span"
 style="white-space:pre">        </span>ntdll.dll!77bcb3ce() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div><div style="color: rgb(0, 0, 0); font-family: tahoma, 'new york', times, serif; font-size: 13px; font-style: normal; background-color: transparent;"><font size="2">&nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span>ntdll.dll!77b80133() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div><div style="color: rgb(0, 0, 0); font-family: tahoma, 'new york', times, serif; font-size: 13px; font-style: normal; background-color: transparent;"><font size="2">&gt;<span class="Apple-tab-span" style="white-space:pre">        </span>vtkCommon.dll!vtkCallbackCommand::Execute(vtkObject * caller=0x04262ed0, unsigned long event=26, void * callData=0x00000000) &nbsp;Zeile 42 + 0x15 Bytes<span class="Apple-tab-span" style="white-space:pre">        </span>C++</font></div><div style="color: rgb(0, 0, 0); font-family: tahoma,
 'new york', times, serif; font-size: 13px; font-style: normal; background-color: transparent;"><font size="2">&nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span>vtkCommon.dll!vtkSubjectHelper::InvokeEvent(unsigned long event=26, void * callData=0x00000000, vtkObject * self=0x04262ed0) &nbsp;Zeile 605<span class="Apple-tab-span" style="white-space:pre">        </span>C++</font></div><div style="color: rgb(0, 0, 0); font-family: tahoma, 'new york', times, serif; font-size: 13px; font-style: normal; background-color: transparent;"><font size="2">&nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span>vtkCommon.dll!vtkObject::InvokeEvent(unsigned long event=37718944, void * callData=0x01d51030) &nbsp;Zeile 773<span class="Apple-tab-span" style="white-space:pre">        </span>C++</font></div><div style="color: rgb(0, 0, 0); font-family: tahoma, 'new york', times, serif; font-size: 13px; font-style: normal;"><br></div><div style="color: rgb(0,
 0, 0); font-family: tahoma, 'new york', times, serif; font-size: 13px; font-style: normal;">This is the code:</div><div style="color: rgb(0, 0, 0); font-family: tahoma, 'new york', times, serif; font-size: 13px; font-style: normal;"><br></div><div><div><font size="2"><span class="Apple-tab-span" style="white-space: pre;">        </span>self.widget = QVTKRenderWindowInteractor( self )</font></div><div><font size="2"><br></font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>######VTK#####</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>from vtk.util.misc import vtkGetDataRoot</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>VTK_DATA_ROOT = vtkGetDataRoot()</font></div><div><font size="2"><br></font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span># Start by loading some data.</font></div><div><font
 size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>v16 = tvtk.Volume16Reader()</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>v16.data_dimensions = ( 64, 64 )</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>v16.data_byte_order = 'little_endian'</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>v16.file_prefix = VTK_DATA_ROOT + "/Data/headsq/quarter"</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>v16.image_range = ( 1, 93 )</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>v16.data_spacing = ( 3.2, 3.2, 1.5 )</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>v16.update()</font></div><div><font size="2"><br></font></div><div><font size="2"><span class="Apple-tab-span"
 style="white-space:pre">        </span>xMin, xMax, yMin, yMax, zMin, zMax = v16.output.whole_extent</font></div><div><font size="2"><br></font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>spacing = v16.output.spacing</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>sx, sy, sz = spacing</font></div><div><font size="2"><br></font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>origin = v16.output.origin</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>ox, oy, oz = origin</font></div><div><font size="2"><br></font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span># An outline is shown for context.</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>outline = tvtk.OutlineFilter()</font></div><div><font size="2"><span
 class="Apple-tab-span" style="white-space:pre">        </span>outline.input_connection = v16.output_port</font></div><div><font size="2"><br></font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>outlineMapper = tvtk.PolyDataMapper()</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>outlineMapper.input_connection = outline.output_port</font></div><div><font size="2"><br></font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>outlineActor = tvtk.Actor()</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>outlineActor.mapper = outlineMapper</font></div><div><font size="2"><br></font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span># The shared picker enables us to use 3 planes at one time</font></div><div><font size="2"><span class="Apple-tab-span"
 style="white-space:pre">        </span># and gets the picking order right</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>picker = tvtk.CellPicker()</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>picker.tolerance = 0.005</font></div><div><font size="2"><br></font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span># The 3 image plane widgets are used to probe the dataset.</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>planeWidgetX = tvtk.ImagePlaneWidget()</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>planeWidgetX.display_text = 'on'</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>planeWidgetX.input = v16.output</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">
        </span>planeWidgetX.plane_orientation = 'x'</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>planeWidgetX.slice_index = 32</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>planeWidgetX.set_picker( picker )</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span># planeWidgetX.SetKeyPressActivationValue( "x" )</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>prop1 = planeWidgetX.plane_property</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>prop1.color = ( 1, 0, 0 )</font></div><div><font size="2"><br></font></div><div><font size="2"><br></font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span># Create the RenderWindow and Renderer</font></div><div><font size="2"><span class="Apple-tab-span"
 style="white-space:pre">        </span>ren = tvtk.Renderer()</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>self.widget.GetRenderWindow().AddRenderer( tvtk.to_vtk( ren ) )</font></div><div><font size="2"><br></font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span># Add the outline actor to the renderer, set the background color and size</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>ren.add_actor( outlineActor )</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>self.widget.GetRenderWindow().SetSize( 600, 600 )</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>ren.background = ( 0.1, 0.1, 0.2 )</font></div><div><font size="2"><br></font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>interactor =
 self.widget.GetRenderWindow().GetInteractor()</font></div><div><font size="2"><br></font></div><div><font size="2"><span class="Apple-tab-span" style="white-space:pre">        </span>planeWidgetX.interactor = tvtk.to_tvtk( interactor )</font></div><div><font size="2"><span class="Apple-tab-span" style="white-space: pre;">        </span>planeWidgetX.on()</font></div><div><font size="2"><br></font></div><div><font size="2">Try mouse over the window and it suddenly crashes.</font></div></div></span></div><div style="font-family: tahoma, 'new york', times, serif; font-size: 10pt;"><span style="background-color: transparent;">So if one might be gentle an advice would be helpful. Maybe its a simple problme but I can't see it.</span><br></div><div style="font-family: tahoma, 'new york', times, serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="background-color: transparent;"><br></span></div><div style="font-family:
 tahoma, 'new york', times, serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="background-color: transparent;">Thanks in advance,</span></div><div style="font-family: tahoma, 'new york', times, serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="background-color: transparent;">Willi</span></div><div style="font-family: tahoma, 'new york', times, serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;">  <div style="font-family: tahoma, 'new york', times, serif; font-size: 10pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">Von:</span></b> Willi Huber
 &lt;surfersparadise85-vtk@yahoo.com&gt;<br> <b><span style="font-weight: bold;">An:</span></b> "vtkusers@vtk.org" &lt;vtkusers@vtk.org&gt; <br> <b><span style="font-weight: bold;">Gesendet:</span></b> 20:39 Montag, 21.Januar 2013<br> <b><span style="font-weight: bold;">Betreff:</span></b> [vtkusers] General problems using VTK widgets in PyQt<br> </font> </div> <br><div id="yiv918204575"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: tahoma, 'new york', times, serif; font-size: 10pt;"><div>Hello all,</div><div><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: tahoma, 'new york', times, serif; background-color: transparent; font-style: normal;">I 've come across a problem that occurs with all so far tested VTK widgets in combination with Python and PyQt.</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: tahoma, 'new york', times, serif; background-color: transparent;
 font-style: normal;">I was trying to embedd a lot of widgets (vtkResliceImageViewer, vtkImageViewer, vtkImagePlaneWidget, ...) into my application without success. Every time I have the problem that if an event (like MouseMove oder LeftButtonDown) is handled by one of these widgets the whole app crashes without any information why.</div><div style="color:rgb(0, 0, 0);font-size:13px;font-family:tahoma, 'new
 york', times, serif;background-color:transparent;font-style:normal;">I know so far that it is definitely in combination with events that are handled by the widgets. Whenever I delete the observer for such an event the previously problematic action doesn't crash the app anymore.</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: tahoma, 'new york', times, serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: tahoma, 'new york', times, serif; background-color: transparent; font-style: normal;">I am curious why this is only happening with PyQt and not with Tk as this are the samples I tried. Next I want to debug into this problem using either Visual Studio or gdb. Has anyone had such problems using widgets in these combinations? Is it only a problem with pythonxy as this is what I was using all the time.</div><div style="color: rgb(0, 0, 0); font-size: 13px;
 font-family: tahoma, 'new york', times, serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: tahoma, 'new york', times, serif; background-color: transparent; font-style: normal;">Would be nice if someone could assist me with this problem since this could be a major one.</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: tahoma, 'new york', times, serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: tahoma, 'new york', times, serif; background-color: transparent; font-style: normal;">Cheers,</div><div style="color: rgb(0, 0, 0); font-size: 13px; font-family: tahoma, 'new york', times, serif; background-color: transparent; font-style: normal;">Willi</div></div></div></div><br>_______________________________________________<br>Powered by www.kitware.com<br><br>Visit other Kitware
 open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br>Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br><br><br> </div> </div> </blockquote></div>   </div></body></html>