<div dir="ltr">Dear all,<div><br></div><div>I'm writing an DICOM image viewer that could display pixel intensity when the mouse moving over the image.</div><div><br></div><div>During the picking, I got this error information "ERROR: In ..\..\VTK_src\Rendering\vtkWin32OpenGLRenderWindow.cxx, line 225</div>
<div>vtkWin32OpenGLRenderWindow (0CF6B6F8): Attempting to call MakeCurrent for a different window than the one doing the picking, this can causes crashes and/or bad pick results</div><div>"</div><div>And then everything in the viewer disappeared. </div>
<div><br></div><div>I use vtkResliceImageViewer for image display and MPR, here are the relative codes:</div><div><div><br></div><div>vtkRenderer * pRender = m_pResliceImageViewer->GetRenderer( m_nWidgetIndex );</div>
<div>int nCode = 0;</div><div>nCode = GetInteractor()->GetPicker()->Pick( dEventPos[0], dEventPos[1], 0, pRender );<br></div><div> if ( 0 == nCode )</div><div> {</div><div> return ERROR_VALUE_INVALID;</div>
<div> }</div><div>GetInteractor()->GetPicker()->GetPickPosition( m_dCurrentPositionWorld ); </div><div><br></div><div>FYI, this problem occured by chance. Moving mouse over the image very fast, or moving mouse over multiple actors may increase the probability of occurrence. I tried to call renderwindow->MakeCurrent() every time before picking, but the problem still existed. I guess this may be caused because of the multithreading, but I have no idea how to fix it.</div>
<div><br></div><div>This problem bother me a lot for several days, I really appriciate if you could help me with it.</div><div>Thanks a lot!</div></div><div><br></div><div>Best,</div><div style>Wenbo</div></div>