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