<div dir="ltr"><span style="font-size:12.8px">Hi </span><span style="font-size:12.8px;color:rgb(0,0,0);white-space:pre-wrap">Liu Peng,</span><br><div><span style="font-size:12.8px;color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="font-size:12.8px;color:rgb(0,0,0);white-space:pre-wrap">Thanks for your support.My picker worked.The problem was that i didn't consider the pixel spacing while Picking,that's why it returned wrong values.In addition to the x-y co-ordinates is it possible to get the pixel value from the image,If so please let me know.</span></div><div><span style="font-size:12.8px;color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="font-size:12.8px;color:rgb(0,0,0);white-space:pre-wrap">Thanks.</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 22, 2017 at 8:20 AM, Liu_tj <span dir="ltr"><<a href="mailto:tjlp@netease.com" target="_blank">tjlp@netease.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, Duster,<br><br>Below is my code (I use a vtkpoitwidget). Not sure whether it is helpful to you.<br><br>              int clickpoint[2];<br>                double pickpoint[3];<br>                _widget->GetInteractor()-><wbr>GetEventPosition(clickpoint);<br>                vtkCellPicker* picker = vtkCellPicker::New();<br>                picker->SetTolerance(0.0005);<br>                picker->Pick(clickpoint[0], clickpoint[1], 0, _widget->GetCurrentRenderer())<wbr>;<br>                picker->GetPickPosition(<wbr>pickpoint);<br><div><br>Thanks.</div><span class=""><div><br></div>
 <span>
 </span>
        在2017-09-19,"Duster U" <<a href="mailto:aralol2015@gmail.com" target="_blank">aralol2015@gmail.com</a>> 写道:
        </span><blockquote id="m_9055925697977745754isReplyContent" style="padding-left:1ex;margin:0px 0px 0px 0.8ex;BORDER-LEFT:#ccc 1px solid"><span class="">
        -----原始邮件-----<br>
        <b>发件人:</b>"Duster U" <<a href="mailto:aralol2015@gmail.com" target="_blank">aralol2015@gmail.com</a>> <br>
        </span><b>发送时间:</b>2017年09月19日 星期二<span class=""><br>
        <b>收件人:</b>"Liu_tj" <<a href="mailto:tjlp@netease.com" target="_blank">tjlp@netease.com</a>><br>
        <b>抄送:</b>"vtkusers" <<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>><br>
        </span><b>主题:</b>Re: Re: [vtkusers] Picking in DICOM series<div><div class="h5"><br>
<br><div dir="ltr">Hi,<div>Below my code that i tried to pick the coordinates has been given.Please reply if any modifications needs to be done,or if my approach is wrong</div><div><br></div><div>Thanks in Advance</div><div><br></div><div><br></div><div><div>void MyVtkInteractorStyleImage::<wbr>OnMouseMove()</div><div>{</div><div>    //std::cout << "Picking pixel: " << this->Interactor-><wbr>GetEventPosition()[0]<< " " << this->Interactor-><wbr>GetEventPosition()[1] << std::endl;</div><div>    this->Interactor->GetPicker()-<wbr>>Pick(this->Interactor-><wbr>GetEventPosition()[0],</div><div>                       this->Interactor-><wbr>GetEventPosition()[1],</div><div>                       0,  // always zero.</div><div>                       this->Interactor-><wbr>GetRenderWindow()-><wbr>GetRenderers()-><wbr>GetFirstRenderer());</div><div><br></div><div>    double pos[3];</div><div>    this->Interactor->GetPicker()-<wbr>>GetPickPosition(pos);</div><div>   //std::cout << "Picked value: " << pos[0] << " " << pos[1] << " " << pos[2] << std::endl;</div><div><br></div><div>     int x = pos[0];</div><div>     int y = pos[1];</div><div>     std::cout << "(x,y) = (" << x << "," << y << ")" << std::endl;</div><div>     vtkSmartPointer<<wbr>vtkCoordinate> coordinate =</div><div>                  vtkSmartPointer<vtkCoordinate><wbr>::New();</div><div>     coordinate-><wbr>SetCoordinateSystemToWorld();</div><div>     coordinate->SetValue(x,y,0);</div><div>     double* world = coordinate->GetValue();</div><div>     std::cout << "World coordinate: " << world[0] << ", " << world[1] << ", " << world[2] << std::endl;</div><div><br></div><div><br></div><div><br></div><div>    // Forward events</div><div>    vtkInteractorStyleImage::<wbr>OnMouseMove();</div><div><br></div><div>}</div></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 18, 2017 at 5:16 PM, Duster U <span dir="ltr"><<a href="mailto:aralol2015@gmail.com" target="_blank">aralol2015@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi <span style="color:rgb(0,0,0);white-space:pre-wrap">Liu Peng,,</span><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">Thanks for the reply.Let me try the different coordinate system and will let u know if it works.</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">Thanks</span></div></div><div class="m_9055925697977745754gmail-HOEnZb"><div class="m_9055925697977745754gmail-h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Sep 16, 2017 at 9:53 AM, Liu_tj <span dir="ltr"><<a href="mailto:tjlp@netease.com" target="_blank">tjlp@netease.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>As there are several kind of coordinate system in VTK, you need to check the check values are world, viewport, normalized viewport coordinate.</div><div><br></div><div>Perhaps you can post your code here and the forum guys can help you.</div><div><br></div><div>Thanks<br></div><span>
 <span>
 </span>
<br>      在2017-09-15,"Duster U" <<a href="mailto:aralol2015@gmail.com" target="_blank">aralol2015@gmail.com</a>> 写道:
        </span><blockquote id="m_9055925697977745754gmail-m_-353536634894964160m_-860100116545477270isReplyContent" style="padding-left:1ex;margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204)"><span>
        -----原始邮件-----<br>
        <b>发件人:</b>"Duster U" <<a href="mailto:aralol2015@gmail.com" target="_blank">aralol2015@gmail.com</a>> <br>
        </span><b>发送时间:</b>2017年09月15日 星期五<br>
        <b>收件人:</b>"Liu_tj" <<a href="mailto:tjlp@netease.com" target="_blank">tjlp@netease.com</a>><br>
        <b>抄送:</b>"vtkusers" <<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>><br>
        <b>主题:</b>Re: [vtkusers] Picking in DICOM series<div><div class="m_9055925697977745754gmail-m_-353536634894964160h5"><br>
<br><div dir="ltr"><pre style="white-space:pre-wrap;color:rgb(0,0,0)">Hi Liu Peng,</pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)">I have tried different dicom samples of different resolutions.When i use a sample of 320*320,the max value that i get from the picker is 150*150,and this too varies with samples.when i tried with another 320*320 sample max value that i got was 160*160.</pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><br></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)">Thanks</pre></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 14, 2017 at 5:50 PM, Liu_tj <span dir="ltr"><<a href="mailto:tjlp@netease.com" target="_blank">tjlp@netease.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">How do you know the values are wrong?<br><div><br><br></div>
 <span>
 </span>
<br>      在2017-09-14,"Duster U" <<a href="mailto:aralol2015@gmail.com" target="_blank">aralol2015@gmail.com</a>> 写道:
        <blockquote id="m_9055925697977745754gmail-m_-353536634894964160m_-860100116545477270m_6375408575272633594isReplyContent" style="padding-left:1ex;margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204)">
        -----原始邮件-----<br>
        <b>发件人:</b>"Duster U" <<a href="mailto:aralol2015@gmail.com" target="_blank">aralol2015@gmail.com</a>> <br>
        <b>发送时间:</b>2017年09月14日 星期四<br>
        <b>收件人:</b>"vtkusers" <<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>><br>
        <b>主题:</b>[vtkusers] Picking in DICOM series<div><div class="m_9055925697977745754gmail-m_-353536634894964160m_-860100116545477270h5"><br>
<br><div dir="ltr"><br><div><span style="font-size:12.8px">Hi,</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I've been trying to implement a Picker in the OnMouseMove of a custom vtkinteractorstyleImage,so that i can get the pixel coordinates of an image while hovering over an image.Now I've tried both the Point Picker and the Prop Picker to do so,,both gives the coordinates but the problem is that the values are not correct.So am i missing anything?</div><div style="font-size:12.8px">and i am new to vtk,So please help me out</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Thanks in Advance</div></div></div>
</div></div></blockquote><br><br><span title="neteasefooter"><p> </p></span></blockquote></div><br></div>
</div></div></blockquote></blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>
</div></div></blockquote></blockquote></div><br></div>