<div class="gmail_quote">On Thu, Sep 9, 2010 at 2:22 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>></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 "axes", 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 <return> to continue, or q <return> to quit---<br>#21 0x004a2c1e in wxPyCallback::EventThunker(wxEvent&) () 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&), wxEvent&) const ()<br> from /usr/lib/libwx_baseu-2.8.so.0<br>#23 0x00dab209 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) ()<br>
from /usr/lib/libwx_baseu-2.8.so.0<br>#24 0x00dab398 in wxEvtHandler::SearchDynamicEventTable(wxEvent&) () from /usr/lib/libwx_baseu-2.8.so.0<br>#25 0x00dac3a5 in wxEvtHandler::ProcessEvent(wxEvent&) () 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&) () from /usr/lib/libwx_gtk2u_core-2.8.so.0<br>#28 0x00afa449 in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&) () from /usr/lib/libwx_gtk2u_core-2.8.so.0<br>
#29 0x00afa449 in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&) () from /usr/lib/libwx_gtk2u_core-2.8.so.0<br>#30 0x00afa449 in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&) () from /usr/lib/libwx_gtk2u_core-2.8.so.0<br>
#31 0x00afa449 in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&) () from /usr/lib/libwx_gtk2u_core-2.8.so.0<br>#32 0x00afa449 in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&) () from /usr/lib/libwx_gtk2u_core-2.8.so.0<br>
#33 0x00afa449 in wxAppBase::SendIdleEvents(wxWindow*, wxIdleEvent&) () 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 <return> to continue, or q <return> 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"><<a href="mailto:rodrigo.valina@usc.es">rodrigo.valina@usc.es</a>> wrote:<br>
> On Thu, Sep 9, 2010 at 11:45 AM, David Doria <<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@gmail.com</a>><br>
> wrote:<br>
>><br>
>> On Thu, Sep 9, 2010 at 4:44 AM, Rodrigo Valiña Gutiérrez<br>
>> <<a href="mailto:rodrigo.valina@usc.es">rodrigo.valina@usc.es</a>> wrote:<br>
>> > Hi,<br>
>> ><br>
>> > I want an actor or a way to draw an object composed of 3 arrows for X Y<br>
>> > and<br>
>> > Z axes, in the lower left corner of the window, and orients itself<br>
>> > acording<br>
>> > to the rotation of the camera. I do not want it to zoom or displace. It<br>
>> > should be like the one ParaView has in the lower left corner.<br>
>> ><br>
>> > Is there any simple way to do it?<br>
>> ><br>
>> > --<br>
>> > Rodrigo<br>
>><br>
>> This should do the trick;<br>
>><br>
>> <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>
>><br>
>> David<br>
><br>
> It does not work for me.<br>
> The code in the link places the object in world coordinates, and the object<br>
> moves and zooms with the rest of the scene.<br>
> I wanted an object that was fixed-size and fixed-position (lower left corner<br>
> of the visualization), and only oriented itself like the other objects in<br>
> the scene.<br>
><br>
> --<br>
> Rodrigo<br>
><br>
</div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <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:<br>
> <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>
</blockquote></div><br>