<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi everybody,<br>
    <br>
    I have a very specific problem concerning a vtkPointPicker with VTK
    5.10 build for x64 (MSVC 2010). I have two classes involved:<br>
    <br>
    class: MyInteractorStyle<br>
    &nbsp;&nbsp;&nbsp; - reacts on a LeftMouseButtonDown and delivers the coordinates
    the user has clicked<br>
    <br>
    class: ImageViewer<br>
    &nbsp;&nbsp;&nbsp; - holds a vtkImageViewer2 instance for displaying images<br>
    &nbsp;&nbsp;&nbsp; - sets the interactor style of the vtkRenderWindowInteractor
    retrieved from a QVTKWidget to MyInteractorStyle<br>
    &nbsp;&nbsp;&nbsp; - assigns a vtkPointPicker to vtkRenderWindowInteractor of the
    QVTKWidget<br>
    <br>
    -----------------------------------------------------<br>
    code snippets from ImageViewer:<br>
    <br>
    <span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">this</span><span
      style=" color:#000000;">-&gt;</span><span style=" color:#800000;">vtkimageviewer2</span><span
      style=" color:#000000;">-&gt;</span><span style="
      font-style:italic; color:#000000;">SetupInteractor</span><span
      style=" color:#000000;">(</span><span style=" color:#800000;">m_ui</span><span
      style=" color:#000000;">-&gt;<span style=" color:#000000;"></span><span
        style=" color:#800000;">qvtkwidget</span><span style="
        color:#000000;"></span></span><span style=" color:#000000;">-&gt;</span><span
      style=" font-style:italic; color:#000000;">GetRenderWindow</span><span
      style=" color:#000000;">()-&gt;</span><span style="
      font-style:italic; color:#000000;">GetInteractor</span><span
      style=" color:#000000;">());</span>
    <pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
</pre>
    <span style=" color:#800000;">m_ui</span><span style="
      color:#000000;">-&gt;</span><span style=" color:#800000;">qvtkwidget</span><span
      style=" color:#000000;">-&gt;</span><span style="
      font-style:italic; color:#000000;">GetRenderWindow</span><span
      style=" color:#000000;">()-&gt;</span><span style="
      font-style:italic; color:#000000;">GetInteractor</span><span
      style=" color:#000000;">()-&gt;</span><span style="
      font-style:italic; color:#000000;">SetInteractorStyle</span><span
      style=" color:#000000;">(</span><span style=" color:#808000;">this</span><span
      style=" color:#000000;">-&gt;</span><span style=" color:#800000;">myinteractorStyle</span><span
      style=" color:#000000;">);</span><span style=" color:#c0c0c0;"><br>
    </span><span style=" color:#800000;">m_ui</span><span style="
      color:#000000;">-&gt;<span style=" color:#000000;"></span><span
        style=" color:#800000;">qvtkwidget</span><span style="
        color:#000000;"></span></span><span style=" color:#000000;">-&gt;</span><span
      style=" font-style:italic; color:#000000;">GetRenderWindow</span><span
      style=" color:#000000;">()-&gt;</span><span style="
      font-style:italic; color:#000000;">GetInteractor</span><span
      style=" color:#000000;">()-&gt;</span><span style="
      font-style:italic; color:#000000;">SetPicker</span><span style="
      color:#000000;">(</span><span style=" color:#808000;">this</span><span
      style=" color:#000000;">-&gt;</span><span style=" color:#800000;">vtkpointpicker</span><span
      style=" color:#000000;">);</span><br>
    <br>
    -----------------------------------------------------<br>
    code snippets from MyInteractorStyle:<br>
    <br>
    void MyInteractorStyle::<span style=" font-style:italic;
      color:#000000;">OnLeftButtonDown</span>() {<br>
    <br>
    <span style=" color:#800080;">vtkRenderWindowInteractor</span><span
      style=" color:#c0c0c0;"> </span><span style=" color:#000000;">*</span><span
      style=" color:#000000;">rwi</span><span style=" color:#c0c0c0;"> </span><span
      style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span
      style=" color:#808000;">this</span><span style=" color:#000000;">-&gt;</span><span
      style=" color:#800000;">Interactor</span><span style="
      color:#000000;">;</span><br>
    <span style=" color:#800080;">vtkPointPicker</span><span style="
      color:#c0c0c0;"> </span><span style=" color:#000000;">*</span><span
      style=" color:#c0c0c0;"> </span><span style=" color:#000000;">pPicker</span><span
      style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span
      style=" color:#c0c0c0;"> </span><span style=" color:#808000;">reinterpret_cast</span><span
      style=" color:#000000;">&lt;</span><span style=" color:#800080;">vtkPointPicker</span><span
      style=" color:#000000;">*&gt;(</span><span style=" color:#000000;">rwi</span><span
      style=" color:#000000;">-&gt;</span><span style="
      font-style:italic; color:#000000;">GetPicker</span><span style="
      color:#000000;">());</span>
    <br>
    <br>
    <span style=" color:#808000;">if</span><span style=" color:#c0c0c0;">
    </span><span style=" color:#000000;">(</span><span style="
      color:#000000;">pPicker</span><span style=" color:#000000;">-&gt;</span><span
      style=" font-style:italic; color:#000000;">Pick</span><span
      style=" color:#000000;">(</span><span style=" color:#000000;">rwi</span><span
      style=" color:#000000;">-&gt;</span><span style="
      font-style:italic; color:#000000;">GetEventPosition</span><span
      style=" color:#000000;">()[</span><span style=" color:#000080;">0</span><span
      style=" color:#000000;">],</span> <span style=" color:#000000;">rwi</span><span
      style=" color:#000000;">-&gt;</span><span style="
      font-style:italic; color:#000000;">GetEventPosition</span><span
      style=" color:#000000;">()[</span><span style=" color:#000080;">1</span><span
      style=" color:#000000;">],</span> <span style=" color:#000080;">0</span><span
      style=" color:#000000;">, this-&gt;<span style=" color:#000000;"></span><span
        style=" color:#800000;">vtkimageviewer2</span><span style="
        color:#000000;"></span></span><span style=" color:#000000;">-&gt;</span><span
      style=" font-style:italic; color:#000000;">GetRenderer</span><span
      style=" color:#000000;">()))</span>
    <br>
    <span style=" color:#c0c0c0;"></span><span style=" color:#000000;">{</span>
    <br>
    <span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">&nbsp;&nbsp;&nbsp;
      double</span><span style=" color:#c0c0c0;"> </span><span style="
      color:#000000;">ptMapped</span><span style=" color:#000000;">[</span><span
      style=" color:#000080;">3</span><span style=" color:#000000;">];</span>
    <br>
    <span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">&nbsp;&nbsp;&nbsp;
      int</span><span style=" color:#c0c0c0;"> </span><span style="
      color:#000000;">coords</span><span style=" color:#000000;">[</span><span
      style=" color:#000080;">3</span><span style=" color:#000000;">];</span>
    <br>
    <span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">&nbsp;&nbsp;&nbsp;
      pPicker</span><span style=" color:#000000;">-&gt;</span><span
      style=" font-style:italic; color:#000000;">GetMapperPosition</span><span
      style=" color:#000000;">(</span><span style=" color:#000000;">ptMapped</span><span
      style=" color:#000000;">);<br>
      &nbsp;&nbsp;&nbsp; ...<br>
      }<br>
      <br>
      }<br>
      -----------------------------------------------------<br>
      <br>
      Now, all this works perfectly fine when using VTK 5.10 built in
      32-bit mode (MSVC 2010 for x86). However, when the application is
      build using MSVC 2010 for 64-bit the Pick function of the
      vtkPointPicker always returns false! The reason for this is may be
      that vtkAssemblyPath (this-&gt;Path) is not set (is Null) in Pick
      of vtkPicker class which is not the case for 32-bit. I'm not that
      familiar with VTK that I know what the AssemblyPath is exactly for
      and how this could be caused.<br>
      <br>
      Does anybody have an idea what could be the reason for that? Is it
      probably a bug which appears in 64-bit mode only? I'd be very
      happy about a guess or ideas what I can try else. <br>
      Thank you very much.<br>
      <br>
      &nbsp;-Sebastian<br>
    </span>
    <pre class="moz-signature" cols="72">-- 
===================================================
Dipl. Ing. Sebastian Sch&auml;fer
Institut f&uuml;r Simulation und Graphik
Universit&auml;t Magdeburg
Universit&auml;tsplatz 2
39106 Magdeburg, Germany

Tel.   +49 (0)391 67 51441
Fax.   +49 (0)391 67 11164
Email  <a class="moz-txt-link-abbreviated" href="mailto:schaefer@isg.cs.uni-magdeburg.de">schaefer@isg.cs.uni-magdeburg.de</a>
<a class="moz-txt-link-freetext" href="http://isgwww.cs.uni-magdeburg.de/isg/schaefer.html">http://isgwww.cs.uni-magdeburg.de/isg/schaefer.html</a>
===================================================</pre>
    <br>
    <br>
    <br>
  </body>
</html>