Hi, guys!<br><br>I have a similar problem. I want to get intensity values from a dicom volume; this volume was created using vtkDICOMImageReader vtkRayCastVolumeMapper and vtkVolume. I want give the X, Y, Z coordinates and get the intensity value of the voxel X, Y, Z. In my case, it is not necessary to use mouse. Passing X, Y, Z parameters are sufficient.<br>
<br>I would be more than grateful if I had some help from anyone.<br><br>Thanks!<br><br><br><br><div class="gmail_quote">2010/9/10 Rodrigo Valiña Gutiérrez <span dir="ltr">&lt;<a href="mailto:rodrigo.valina@usc.es">rodrigo.valina@usc.es</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi,<br><br>My app crashes when I add a new tab, before showing the scene.<br>I wrote an example and... does not crash (axis_.py).<br>
Then I wrote another example (note.py) with a wx.aui.AuiNotebook and it crashes after adding the scene, when pasing the mouse over it.<br><font color="#888888">
<br>Rodrigo</font><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Fri, Sep 10, 2010 at 5:34 AM, Bill Lorensen <span dir="ltr">&lt;<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Please post a complete python example that crashes and I&#39;ll take a look.<br>
<br>
Bill<br>
<br>
On Thu, Sep 9, 2010 at 11:05 AM, Rodrigo Valiña Gutiérrez<br>
<div><div></div><div>&lt;<a href="mailto:rodrigo.valina@usc.es" target="_blank">rodrigo.valina@usc.es</a>&gt; wrote:<br>
&gt; On Thu, Sep 9, 2010 at 2:22 PM, Bill Lorensen &lt;<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Try this:<br>
&gt;&gt;<br>
&gt;&gt; <a href="http://vtk.org/Wiki/VTK/Examples/Cxx/Visualization/DisplayCoordinateAxes#AxesIndicator.cxx" target="_blank">http://vtk.org/Wiki/VTK/Examples/Cxx/Visualization/DisplayCoordinateAxes#AxesIndicator.cxx</a><br>


&gt;&gt; or for a more sophisticated &quot;axes&quot;, this:<br>
&gt;&gt; <a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/OrientationMarkerWidget" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/OrientationMarkerWidget</a><br>
&gt;&gt;<br>
&gt;<br>
&gt; Thanks, I think that it should do, but it keeps giving me Segmentation<br>
&gt; Fault...<br>
&gt;<br>
&gt; With Python 2.6.5, VTK 5.2.1-14ubuntu4, and Ubuntu 10.04, and this code:<br>
&gt;<br>
&gt; axes = vtk.vtkAxesActor()<br>
&gt; vomw = vtk.vtkOrientationMarkerWidget()<br>
&gt; vomw.SetOutlineColor( 0.9300, 0.5700, 0.1300 )<br>
&gt; vomw.SetOrientationMarker( axes )<br>
&gt; #vomw.SetDefaultRenderer( self.ren )<br>
&gt; vomw.SetInteractor( self.iren )<br>
&gt; vomw.SetViewport( 0.0, 0.0, 0.4, 0.4 )<br>
&gt; vomw.SetEnabled( 1 )<br>
&gt; vomw.InteractiveOn( )<br>
&gt;<br>
&gt; It crashes:<br>
&gt;<br>
&gt; Program received signal SIGSEGV, Segmentation fault.<br>
&gt; 0x0530497d in vtkRenderer::GetActiveCamera() () from<br>
&gt; /usr/lib/libvtkRendering.so.5.2<br>
&gt; (gdb) bt<br>
&gt; #0  0x0530497d in vtkRenderer::GetActiveCamera() () from<br>
&gt; /usr/lib/libvtkRendering.so.5.2<br>
&gt; #1  0x07b3f05a in<br>
&gt; vtkOrientationMarkerWidget::ExecuteCameraUpdateEvent(vtkObject*, unsigned<br>
&gt; long, void*) ()<br>
&gt;    from /usr/lib/libvtkWidgets.so.5.2<br>
&gt; #2  0x07b40499 in vtkOrientationMarkerWidgetObserver::Execute(vtkObject*,<br>
&gt; unsigned long, void*) ()<br>
&gt;    from /usr/lib/libvtkWidgets.so.5.2<br>
&gt; #3  0x0264f922 in vtkSubjectHelper::InvokeEvent(unsigned long, void*,<br>
&gt; vtkObject*) () from /usr/lib/libvtkCommon.so.5.2<br>
&gt; #4  0x0264f9d8 in vtkObject::InvokeEvent(unsigned long, void*) () from<br>
&gt; /usr/lib/libvtkCommon.so.5.2<br>
&gt; #5  0x05306f80 in vtkRenderer::Render() () from<br>
&gt; /usr/lib/libvtkRendering.so.5.2<br>
&gt; #6  0x053032bb in vtkRendererCollection::Render() () from<br>
&gt; /usr/lib/libvtkRendering.so.5.2<br>
&gt; #7  0x0531352f in vtkRenderWindow::DoStereoRender() () from<br>
&gt; /usr/lib/libvtkRendering.so.5.2<br>
&gt; #8  0x05313910 in vtkRenderWindow::DoFDRender() () from<br>
&gt; /usr/lib/libvtkRendering.so.5.2<br>
&gt; #9  0x05314d1c in vtkRenderWindow::DoAARender() () from<br>
&gt; /usr/lib/libvtkRendering.so.5.2<br>
&gt; #10 0x05313a55 in vtkRenderWindow::Render() () from<br>
&gt; /usr/lib/libvtkRendering.so.5.2<br>
&gt; #11 0x053b64b4 in vtkXOpenGLRenderWindow::Render() () from<br>
&gt; /usr/lib/libvtkRendering.so.5.2<br>
&gt; #12 0x050a2635 in ?? () from /usr/lib/libvtkRenderingPythonD.so.5.2<br>
&gt; #13 0x080e0a21 in PyEval_EvalFrameEx ()<br>
&gt; #14 0x080e1bb0 in PyEval_EvalFrameEx ()<br>
&gt; #15 0x080e2807 in PyEval_EvalCodeEx ()<br>
&gt; #16 0x0816b2ac in ?? ()<br>
&gt; #17 0x0806245a in PyObject_Call ()<br>
&gt; #18 0x0806a45c in ?? ()<br>
&gt; #19 0x0806245a in PyObject_Call ()<br>
&gt; #20 0x080db892 in PyEval_CallObjectWithKeywords ()<br>
&gt; ---Type &lt;return&gt; to continue, or q &lt;return&gt; to quit---<br>
&gt; #21 0x004a2c1e in wxPyCallback::EventThunker(wxEvent&amp;) () from<br>
&gt; /usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/_core_.so<br>
&gt; #22 0x00d0ca9f in wxAppConsole::HandleEvent(wxEvtHandler*, void<br>
&gt; (wxEvtHandler::*)(wxEvent&amp;), wxEvent&amp;) const ()<br>
&gt;    from /usr/lib/libwx_baseu-2.8.so.0<br>
&gt; #23 0x00dab209 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase<br>
&gt; const&amp;, wxEvtHandler*, wxEvent&amp;) ()<br>
&gt;    from /usr/lib/libwx_baseu-2.8.so.0<br>
&gt; #24 0x00dab398 in wxEvtHandler::SearchDynamicEventTable(wxEvent&amp;) () from<br>
&gt; /usr/lib/libwx_baseu-2.8.so.0<br>
&gt; #25 0x00dac3a5 in wxEvtHandler::ProcessEvent(wxEvent&amp;) () from<br>
&gt; /usr/lib/libwx_baseu-2.8.so.0<br>
&gt; #26 0x07ea42a2 in wxGLCanvas::OnInternalIdle() () from<br>
&gt; /usr/lib/libwx_gtk2u_gl-2.8.so.0<br>
&gt; #27 0x00afa415 in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&amp;) () from<br>
&gt; /usr/lib/libwx_gtk2u_core-2.8.so.0<br>
&gt; #28 0x00afa449 in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&amp;) () from<br>
&gt; /usr/lib/libwx_gtk2u_core-2.8.so.0<br>
&gt; #29 0x00afa449 in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&amp;) () from<br>
&gt; /usr/lib/libwx_gtk2u_core-2.8.so.0<br>
&gt; #30 0x00afa449 in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&amp;) () from<br>
&gt; /usr/lib/libwx_gtk2u_core-2.8.so.0<br>
&gt; #31 0x00afa449 in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&amp;) () from<br>
&gt; /usr/lib/libwx_gtk2u_core-2.8.so.0<br>
&gt; #32 0x00afa449 in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&amp;) () from<br>
&gt; /usr/lib/libwx_gtk2u_core-2.8.so.0<br>
&gt; #33 0x00afa449 in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&amp;) () from<br>
&gt; /usr/lib/libwx_gtk2u_core-2.8.so.0<br>
&gt; #34 0x00afa6c1 in wxAppBase::ProcessIdle() () from<br>
&gt; /usr/lib/libwx_gtk2u_core-2.8.so.0<br>
&gt; #35 0x00a4e2c3 in ?? () from /usr/lib/libwx_gtk2u_core-2.8.so.0<br>
&gt; #36 0x01604661 in ?? () from /lib/libglib-2.0.so.0<br>
&gt; #37 0x016065e5 in g_main_context_dispatch () from /lib/libglib-2.0.so.0<br>
&gt; #38 0x0160a2d8 in ?? () from /lib/libglib-2.0.so.0<br>
&gt; #39 0x0160a817 in g_main_loop_run () from /lib/libglib-2.0.so.0<br>
&gt; #40 0x010603c9 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0<br>
&gt; #41 0x00a67708 in wxEventLoop::Run() () from<br>
&gt; /usr/lib/libwx_gtk2u_core-2.8.so.0<br>
&gt; ---Type &lt;return&gt; to continue, or q &lt;return&gt; to quit---<br>
&gt; #42 0x00afa4de in wxAppBase::MainLoop() () from<br>
&gt; /usr/lib/libwx_gtk2u_core-2.8.so.0<br>
&gt; #43 0x004a0b92 in wxPyApp::MainLoop() () from<br>
&gt; /usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/_core_.so<br>
&gt; #44 0x005139da in ?? () from<br>
&gt; /usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/_core_.so<br>
&gt; #45 0x080e0f4d in PyEval_EvalFrameEx ()<br>
&gt; #46 0x080e2807 in PyEval_EvalCodeEx ()<br>
&gt; #47 0x0816b2ac in ?? ()<br>
&gt; #48 0x0806245a in PyObject_Call ()<br>
&gt; #49 0x0806a45c in ?? ()<br>
&gt; #50 0x0806245a in PyObject_Call ()<br>
&gt; #51 0x080e0471 in PyEval_EvalFrameEx ()<br>
&gt; #52 0x080e1bb0 in PyEval_EvalFrameEx ()<br>
&gt; #53 0x080e1bb0 in PyEval_EvalFrameEx ()<br>
&gt; #54 0x080e2807 in PyEval_EvalCodeEx ()<br>
&gt; #55 0x080e2907 in PyEval_EvalCode ()<br>
&gt; #56 0x081005ad in PyRun_FileExFlags ()<br>
&gt; #57 0x08100812 in PyRun_SimpleFileExFlags ()<br>
&gt; #58 0x0805de5c in Py_Main ()<br>
&gt; #59 0x0805d03b in main ()<br>
&gt;<br>
&gt; --------<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Thu, Sep 9, 2010 at 7:56 AM, Rodrigo Valiña Gutiérrez<br>
&gt;&gt; &lt;<a href="mailto:rodrigo.valina@usc.es" target="_blank">rodrigo.valina@usc.es</a>&gt; wrote:<br>
&gt;&gt; &gt; On Thu, Sep 9, 2010 at 11:45 AM, David Doria &lt;<a href="mailto:daviddoria%2Bvtk@gmail.com" target="_blank">daviddoria+vtk@gmail.com</a>&gt;<br>
&gt;&gt; &gt; wrote:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; On Thu, Sep 9, 2010 at 4:44 AM, Rodrigo Valiña Gutiérrez<br>
&gt;&gt; &gt;&gt; &lt;<a href="mailto:rodrigo.valina@usc.es" target="_blank">rodrigo.valina@usc.es</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt; Hi,<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; I want an actor or a way to draw an object composed of 3 arrows for X<br>
&gt;&gt; &gt;&gt; &gt; Y<br>
&gt;&gt; &gt;&gt; &gt; and<br>
&gt;&gt; &gt;&gt; &gt; Z axes, in the lower left corner of the window, and orients itself<br>
&gt;&gt; &gt;&gt; &gt; acording<br>
&gt;&gt; &gt;&gt; &gt; to the rotation of the camera. I do not want it to zoom or displace.<br>
&gt;&gt; &gt;&gt; &gt; It<br>
&gt;&gt; &gt;&gt; &gt; should be like the one ParaView has in the lower left corner.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; Is there any simple way to do it?<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; --<br>
&gt;&gt; &gt;&gt; &gt; Rodrigo<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; This should do the trick;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; <a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Axes" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Axes</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; David<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; It does not work for me.<br>
&gt;&gt; &gt; The code in the link places the object in world coordinates, and the<br>
&gt;&gt; &gt; object<br>
&gt;&gt; &gt; moves and zooms with the rest of the scene.<br>
&gt;&gt; &gt; I wanted an object that was fixed-size and fixed-position (lower left<br>
&gt;&gt; &gt; corner<br>
&gt;&gt; &gt; of the visualization), and only oriented itself like the other objects<br>
&gt;&gt; &gt; in<br>
&gt;&gt; &gt; the scene.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; --<br>
&gt;&gt; &gt; Rodrigo<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Visit other Kitware open-source projects at<br>
&gt;&gt; &gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt;&gt; &gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; &gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br>
</div></div><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><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></blockquote></div><br>