<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">ok thanks.... it works... but get me
      the selection the second time that i select other points....<br>
      <br>
      For example i select two point first time and the output is:<br>
      <br>
      Selected Points<br>
      <br>
      <br>
      secont time i select 4 points and the output is:<br>
      <br>
      Selected Points <br>
      Number of tuples : 2 <br>
      18 <br>
      272 <br>
      <br>
      <br>
      now i reselect the same two point of the first time ad the output
      will be:<br>
      Selected Points <br>
      Number of tuples : 4 <br>
      20 <br>
      10 <br>
      341 <br>
      203 <br>
      <br>
      that correspond to the previous selection.<br>
      <br>
      It's strange, maybe there is a pointer to update after selection
      and before getting selection? <br>
      <br>
      here is the code:<br>
      <br>
      void ScatterPlot2D::getPointSelected()<br>
      {<br>
      &nbsp; qDebug() &lt;&lt; "Selected Points";<br>
      &nbsp; vtkIdTypeArray *idarray =
      vtkIdTypeArray::SafeDownCast(chart-&gt;GetPlot(0)-&gt;GetSelection());<br>
      &nbsp; if(idarray){<br>
      &nbsp;&nbsp;&nbsp; qDebug() &lt;&lt; "Number of tuples :" &lt;&lt;
      idarray-&gt;GetNumberOfTuples();<br>
      &nbsp;&nbsp;&nbsp; for(vtkIdType i = 0; i &lt; idarray-&gt;GetNumberOfTuples();
      i++){<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qDebug() &lt;&lt; idarray-&gt;GetValue(i);<br>
      &nbsp;&nbsp;&nbsp; }<br>
      &nbsp; }<br>
      }<br>
      <br>
      <br>
      <br>
      Thank<br>
      <br>
      Marco<br>
      <br>
      <br>
      On 09/04/2012 04:54 PM, Darshan Pai wrote:<br>
    </div>
    <blockquote
cite="mid:CAD6XMXOAYT=r+HREYSAo++NHkCu91fxdt+WybkAaoBdDp8C6Vg@mail.gmail.com"
      type="cite">If yu have access to the vtkChartXY object in the
      getPointSelected function()<br>
      you can retrieve the ID's using the following command<br>
      <br>
      vtkIdTypeArray *idarray =
      chartxy-&gt;GetPlot(0)-&gt;GetSelection();<br>
      <br>
      you can iterate through the Id's and retrieve the corresponding
      points .<br>
      <br>
      Regards<br>
      <br>
      <br>
      <div class="gmail_quote">On Mon, Sep 3, 2012 at 7:11 PM, Giuseppe
        Marco Randazzo <span dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:gmrandazzo@gmail.com" target="_blank">gmrandazzo@gmail.com</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div bgcolor="#FFFFFF" text="#000000">
            <div>Points are selected, but i'm not able to get these
              selected points... i'm not able to accesso to selection. <br>
              vtkChartXY i know that is not a Qt Widget. I put a
              vtkchartXY into a qvtkwidget.<br>
              <br>
              My connection works, but i'm my slot getPointSelected() is
              empty<br>
              <br>
              getPointSelected()<br>
              {<br>
              &nbsp;&nbsp; // how to get point selected?<br>
              }<br>
              <br>
              regards and thanks a lot :)
              <div>
                <div class="h5"><br>
                  <br>
                  <br>
                  <br>
                  On 09/04/2012 12:41 AM, Darshan Pai wrote:<br>
                </div>
              </div>
            </div>
            <div>
              <div class="h5">
                <blockquote type="cite">What exactly is your error? Does
                  it highlight or not?<br>
                  vtkChartXY is not a Qt Widget , so I am not sure how
                  were you able to use vtkQtSlotConnect .<br>
                  <br>
                  Regards<br>
                  <br>
                  <br>
                  <div class="gmail_quote">On Mon, Sep 3, 2012 at 11:56
                    AM, Giuseppe Marco Randazzo <span dir="ltr">&lt;<a
                        moz-do-not-send="true"
                        href="mailto:gmrandazzo@gmail.com"
                        target="_blank">gmrandazzo@gmail.com</a>&gt;</span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
                      <br>
                      i've some questions about Rubberband selection on
                      vtkchartxy. I'm not able to use this features.<br>
                      <br>
                      I'm using vtk inside a qt widget, so i implemented
                      a slot and after connectet this through:<br>
                      <br>
                      &nbsp; Connections = vtkEventQtSlotConnect::New();<br>
Connections-&gt;Connect(ui.qvtkWidget-&gt;GetRenderWindow()-&gt;GetInteractor(),<br>
                      &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                      vtkCommand::RightButtonReleaseEvent,<br>
                      &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; this,<br>
                      &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                      SLOT(getPointSelected()),0, 1.0);<br>
                      <br>
                      <br>
                      When i select some points on plot with the
                      rubberband selector, the points are highlited and
                      the slot getPointSelected() work.<br>
                      My questions are:<br>
                      <br>
                      Is possible get the points highlighted? and how?<br>
                      is there a better solution than mine?<br>
                      <br>
                      Thanks<br>
                      <br>
                      Giuseppe Marco Randazzo<br>
                      <br>
                      _______________________________________________<br>
                      Powered by <a moz-do-not-send="true"
                        href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
                      <br>
                      Visit other Kitware open-source projects at <a
                        moz-do-not-send="true"
                        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 moz-do-not-send="true"
                        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 moz-do-not-send="true"
                        href="http://www.vtk.org/mailman/listinfo/vtkusers"
                        target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
                    </blockquote>
                  </div>
                  <br>
                </blockquote>
                <br>
              </div>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
    </blockquote>
    <br>
  </body>
</html>