I believe the problem is with the SmartPointer usage as I pointed out.<br><br><div class="gmail_quote">On Mon, Sep 20, 2010 at 12:00 PM, Nicolas Sarrasin <span dir="ltr">&lt;<a href="mailto:nsarrasin@phenix-systems.com">nsarrasin@phenix-systems.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;">

  
    
  
  <div bgcolor="#ffffff" text="#003333">
    <font size="-1"><font face="Tahoma">Anyone from vtk dev can confirm
        ?<br>
        <br>
        Can you post a simple example Jim ?<br>
        <br>
        Thanks by advance.<br>
      </font></font><br>
    Le 17/09/2010 17:22, Jim Peterson a écrit :
    <div><div></div><div class="h5"><blockquote type="cite">I Am not
      sure if this is a factor based on the information provided, but it
      appears the vtkOrientationMarkerWidget expects the
      renderWindowInteractor to be connected to the RenderWindow before
      widget is connected to the RenderWindowInteractor.  At least that
      appears to be the controlling factor from my Java implementations.
      <br>
      <br>
      in other words, Widget.SetInteractor() prior to
      RenderWindow.SetInteractor() or
      RenderWindowInteractor.SetRenderWindow() fails.
      Widget.SetInteractor() after either of the other functions works.
      <br>
      <br>
      HTH,
      <br>
      Jim
      <br>
      <br>
      Benoist Laurent wrote:
      <br>
      <blockquote type="cite">Hi all,
        <br>
        <br>
        The example works very well.
        <br>
        However, when I try to put the code relative to the axes in a
        different fonction the application crashes.
        <br>
        <br>
        void displayAxes(vtkRenderWindowInteractor
        *renderWindowInteractor)
        <br>
        {     vtkSmartPointer&lt;vtkAxesActor&gt; axes =        
        vtkSmartPointer&lt;vtkAxesActor&gt;::New();
        <br>
        <br>
            vtkSmartPointer&lt;vtkOrientationMarkerWidget&gt; widget =
               
        vtkSmartPointer&lt;vtkOrientationMarkerWidget&gt;::New();
        <br>
            widget-&gt;SetOutlineColor( 0.9300, 0.5700, 0.1300 );
        <br>
            widget-&gt;SetOrientationMarker( axes );
        <br>
            widget-&gt;SetInteractor( renderWindowInteractor );
        <br>
            widget-&gt;SetViewport( 0.0, 0.0, 0.4, 0.4 );
        <br>
            widget-&gt;SetEnabled( 1 );
        <br>
            widget-&gt;InteractiveOn();
        <br>
        }
        <br>
        <br>
        So I guess there&#39;s something I did not understand with the
        vtkSmartPointer and/or the vtkWidget.
        <br>
        <br>
        An idea ?
        <br>
        Thanks,
        <br>
        <br>
        Benoist
        <br>
        <br>
        <br>
        Le 17 sept. 10 à 15:55, Nicolas Sarrasin a écrit :
        <br>
        <br>
        <blockquote type="cite">Thanks very much!
          <br>
          It&#39;s exactly what I wanted.
          <br>
          <br>
          Le 16/09/2010 18:55, David Doria a écrit :
          <br>
          <blockquote type="cite">On Thu, Sep 16, 2010 at 12:31 PM,
            Nicolas Sarrasin &lt;<a href="mailto:nsarrasin@phenix-systems.com" target="_blank">nsarrasin@phenix-systems.com</a>
            <a href="mailto:nsarrasin@phenix-systems.com" target="_blank">&lt;mailto:nsarrasin@phenix-systems.com&gt;</a>&gt; wrote:
            <br>
            <br>
                Hi all,
            <br>
            <br>
                How can i display 3Daxes in the bottom-right corner of
            my window ?
            <br>
                I want to fix the position in the screen, not in the
            space.
            <br>
            <br>
                I can render those axes with vtkAxesActor but I don&#39;t
            know to to
            <br>
                fix its position.
            <br>
            <br>
                Thanks by advance,
            <br>
            <br>
                N. Sarrasin
            <br>
            <br>
            <br>
            Try this:
<a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/DisplayCoordinateAxes" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/DisplayCoordinateAxes</a><br>
            <br>
            David </blockquote>
          <br>
          _______________________________________________
          <br>
          Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a> <a href="http://www.kitware.com" target="_blank">&lt;http://www.kitware.com&gt;</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>
        </blockquote>
        <br>
------------------------------------------------------------------------
        <br>
        <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>
          </blockquote>
      <br>
      <br>
    </blockquote>
    <br>
    </div></div><div class="im"><div>-- <br>
      <hr style="width: 100%; min-height: 2px;">
      <table style="text-align: left; font-family: Verdana; width: 500px; min-height: 110px;" border="0" cellpadding="2" cellspacing="0">
        <tbody>
          <tr>
            <td style="text-align: center; width: 80px; font-family: Verdana;"><a><img src="" style="border: 0px solid; width: 75px; min-height: 66px;" alt="Logo Phenix Systems"></a></td>
            <td style="width: 506px; font-family: Verdana;"><small style="color: rgb(51, 102, 102);"><span style="font-weight: bold;">Nicolas Sarrasin -
                  Ingénieur Developpement 3D CFAO</span><br style="background-color: transparent;">
                <a style="background-color: transparent; text-decoration: underline;">Phenix systems</a><br style="background-color: transparent; font-style: italic;">
                <small><span style="background-color: transparent; font-style: italic;"> Parc Européen d&#39;Entreprises </span><br style="background-color: transparent; font-style: italic;">
                  <span style="background-color: transparent; font-style: italic;">
                    rue Richard Wagner - 63200 Riom FRANCE </span><br style="font-style: italic;">
                  <span style="font-style: italic;">
                    tel : +33 (0)4 73 33 45 85 | fax : +33 (0)4 73 33 45
                    86 </span></small></small></td>
          </tr>
          <tr style="font-family: Verdana;">
            <td colspan="2" rowspan="1" style="width: 80px;"><font color="#36a629" size="2">Pensez environnement !</font><br>
              <font color="#36a629" size="1">N&#39;imprimez ce mail que si
                c&#39;est vraiment nécessaire</font></td>
          </tr>
        </tbody>
      </table>
      <br style="font-family: Verdana;">
    </div>
  </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>