<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal>I have a vtkPolyData mesh with scalar data and a
vtkBandedPolyDataContourFilter.&nbsp; I am trying to use pickers to get the
scalar data at a point.&nbsp; It works with a vtkCanvas, but <b>not with a
vtkPanel</b>.&nbsp; Here is the code I use in the addWindowSetObserver method
to make the picker work.&nbsp; I want it to work with a vtkPointPicker and with
a vtkPanel.&nbsp; The problem is that vtkPanels do not have a getIren() method
like the vtkCanvas.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><span style='font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; //
Delay creation and setup of picker till the VTK window is ready<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
renWin.addWindowSetObserver(new Observer() {<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
public void update(Observable o, Object arg) {<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// Create a cell picker.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
picker = new vtkCellPicker();<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// Now at the end of the pick event call the above function.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
picker.AddObserver(&quot;EndPickEvent&quot;, AnnotatePick.this,
&quot;annotatePick&quot;);<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
renWin.getIren().SetPicker(picker);<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// Initially pick the cell at this location.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
picker.Pick(85, 126, 0, renWin.GetRenderer());<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
});<o:p></o:p></span></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>I tried creating a vtkRenderWindowInteractor and setting the
render window to renWin.GetRenderWindow().&nbsp; However, the picker doesn&#8217;t
work when I do this; it only works with the vtkCanvas.&nbsp; Is there any way
you can implement pickers with the vtkPanel, or can it only be done with a
vtkCanvas?<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Thanks in advance!<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><b><i><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:#00337F'>Bill Lucarell</span></i></b><span style='font-size:12.0pt;
font-family:"Times New Roman","serif";color:navy'><o:p></o:p></span></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>