<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style>
<!--
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Consolas}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
pre
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New"}
p.msochpdefault, li.msochpdefault, div.msochpdefault
        {margin-right:0cm;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Calibri","sans-serif"}
span.emailstyle17
        {font-family:"Calibri","sans-serif";
        color:windowtext}
span.EmailStyle19
        {font-family:"Calibri","sans-serif";
        color:#1F497D}
span.HTMLPreformattedChar
        {font-family:"Courier New"}
.MsoChpDefault
        {font-size:10.0pt;
        font-family:"Calibri","sans-serif"}
@page WordSection1
        {margin:72.0pt 72.0pt 72.0pt 72.0pt}
div.WordSection1
        {}
-->
</style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hi,</span></p>
<p class="MsoNormal"><span style="color:#1F497D">&nbsp;</span></p>
<p class="MsoNormal"><span style="color:#1F497D">Anybody with visual studio 2012 around ?</span></p>
<p class="MsoNormal"><span style="color:#1F497D">I have a text example, derived from Cone5.cxx which crashes/hangs when a vtkTextActor is added to the scene during a pick callback.</span></p>
<p class="MsoNormal"><span style="color:#1F497D">Can anybody confirm this behavior behavior before I submit it as a bug ?</span></p>
<p class="MsoNormal"><span style="color:#1F497D">&nbsp;</span></p>
<p class="MsoNormal"><span style="color:#1F497D">Best regards,</span></p>
<p class="MsoNormal"><span style="color:#1F497D">Jean-Michel</span></p>
<p class="MsoNormal"><span style="color:#1F497D">&nbsp;</span></p>
<p class="MsoNormal"><span style="color:#1F497D">&nbsp;</span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:green">//&nbsp;First&nbsp;include&nbsp;the&nbsp;required&nbsp;header&nbsp;files&nbsp;for&nbsp;the&nbsp;VTK&nbsp;classes&nbsp;we&nbsp;are&nbsp;using.</span><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:blue">#include</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:#A31515">&quot;vtkConeSource.h&quot;</span><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:blue">#include</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:#A31515">&quot;vtkPolyDataMapper.h&quot;</span><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:blue">#include</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:#A31515">&quot;vtkRenderWindow.h&quot;</span><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:blue">#include</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:#A31515">&quot;vtkRenderWindowInteractor.h&quot;</span><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:blue">#include</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:#A31515">&quot;vtkCamera.h&quot;</span><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:blue">#include</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:#A31515">&quot;vtkActor.h&quot;</span><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:blue">#include</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:#A31515">&quot;vtkRenderer.h&quot;</span><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:blue">#include</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:#A31515">&quot;vtkInteractorStyleTrackballCamera.h&quot;</span><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:blue">#include</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:#A31515">&quot;vtkCallbackCommand.h&quot;</span><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:blue">#include</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:#A31515">&quot;vtkCellPicker.h&quot;</span><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:blue">#include</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:#A31515">&quot;vtkTextActor.h&quot;</span><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:blue">#include</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:#A31515">&quot;vtkTextProperty.h&quot;</span><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:green">//&nbsp;-----------------------------------------------------------------------</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:green">// define a callbackcommand subclass to react to picking events.</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:green">// here we simply add a vtkTextActor to the scene when the user picks</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:green">// the cone object, and remove it when the user picks outside of it.</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:green">//</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:blue">class</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;myPickCallbackCommand&nbsp;:&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:blue">public</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;vtkCommand</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">{</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:blue">private</span><span style="font-size:10.0pt; font-family:Consolas; color:black">:</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkRenderer*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mRenderer;</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkRenderWindowInteractor*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mRenderWindowInteractor;</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkTextActor*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mTextActor;</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:blue">public</span><span style="font-size:10.0pt; font-family:Consolas; color:black">:</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style="font-size:10.0pt; font-family:Consolas; color:blue">static</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;myPickCallbackCommand&nbsp;*New()&nbsp;{&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:blue">return</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:blue">new</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;myPickCallbackCommand;
 }</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; myPickCallbackCommand()&nbsp;: mRenderer(0x0), mRenderWindowInteractor(0x0), mTextActor(0x0) {}</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style="font-size:10.0pt; font-family:Consolas; color:blue">virtual</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:blue">void</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;Execute(vtkObject&nbsp;*caller,&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:blue">unsigned</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:blue">long</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;eid,&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:blue">void</span><span style="font-size:10.0pt; font-family:Consolas; color:black">*)</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style="font-size:10.0pt; font-family:Consolas; color:blue">if</span><span style="font-size:10.0pt; font-family:Consolas; color:black">(&nbsp;eid&nbsp;!=&nbsp;vtkCommand::EndPickEvent&nbsp;)&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:blue">return</span><span style="font-size:10.0pt; font-family:Consolas; color:black">;</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style="font-size:10.0pt; font-family:Consolas; color:blue">if</span><span style="font-size:10.0pt; font-family:Consolas; color:black">(&nbsp;!mRenderer&nbsp;||&nbsp;!mRenderWindowInteractor&nbsp;)&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:blue">return</span><span style="font-size:10.0pt; font-family:Consolas; color:black">;</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkCellPicker&nbsp;*picker&nbsp;=&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:blue">reinterpret_cast</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&lt;vtkCellPicker*&gt;(caller);</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkProp*&nbsp;picked&nbsp;=&nbsp;picker-&gt;GetViewProp();</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style="font-size:10.0pt; font-family:Consolas; color:blue">if</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;(&nbsp;picked&nbsp;!=&nbsp;NULL&nbsp;)</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout&nbsp;&lt;&lt;&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:#A31515">&quot;Picked:&nbsp;&quot;</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&lt;&lt;&nbsp;endl;</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style="font-size:10.0pt; font-family:Consolas; color:blue">if</span><span style="font-size:10.0pt; font-family:Consolas; color:black">(mTextActor&nbsp;==&nbsp;NULL)</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; std::cout&nbsp;&lt;&lt;&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:#A31515">&quot;adding&nbsp;a&nbsp;text&nbsp;actor&quot;</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&lt;&lt;&nbsp;std::endl;</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mTextActor&nbsp;=&nbsp;vtkTextActor::New();</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mTextActor-&gt;SetInput(</span><span style="font-size:10.0pt; font-family:Consolas; color:#A31515">&quot;this&nbsp;is&nbsp;a&nbsp;test&quot;</span><span style="font-size:10.0pt; font-family:Consolas; color:black">);</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mTextActor-&gt;SetDisplayPosition(0.2,0.2);</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mRenderer-&gt;AddActor2D(&nbsp;mTextActor&nbsp;);</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mTextActor-&gt;Delete();</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style="font-size:10.0pt; font-family:Consolas; color:blue">else</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout&nbsp;&lt;&lt;&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:#A31515">&quot;nothing&nbsp;picked\n&quot;</span><span style="font-size:10.0pt; font-family:Consolas; color:black">;</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style="font-size:10.0pt; font-family:Consolas; color:blue">if</span><span style="font-size:10.0pt; font-family:Consolas; color:black">(mTextActor&nbsp;!=&nbsp;NULL)</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mRenderer-&gt;RemoveActor2D(mTextActor);</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mTextActor&nbsp;=&nbsp;NULL;</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mRenderWindowInteractor-&gt;Render();</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style="font-size:10.0pt; font-family:Consolas; color:blue">void</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;SetRenderer(vtkRenderer*&nbsp;ren)&nbsp;{&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:blue">this</span><span style="font-size:10.0pt; font-family:Consolas; color:black">-&gt;mRenderer&nbsp;=&nbsp;ren;&nbsp;}</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style="font-size:10.0pt; font-family:Consolas; color:blue">void</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;SetRenderWindowInteractor(vtkRenderWindowInteractor*&nbsp;iren)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:blue">this</span><span style="font-size:10.0pt; font-family:Consolas; color:black">-&gt;mRenderWindowInteractor&nbsp;=&nbsp;iren;&nbsp;}
</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">};</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:blue">int</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;main()</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">{</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;vtkConeSource&nbsp;*cone&nbsp;=&nbsp;vtkConeSource::New();</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;cone-&gt;SetHeight(&nbsp;3.0&nbsp;);</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;cone-&gt;SetRadius(&nbsp;1.0&nbsp;);</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;cone-&gt;SetResolution(&nbsp;10&nbsp;);</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;vtkPolyDataMapper&nbsp;*coneMapper&nbsp;=&nbsp;vtkPolyDataMapper::New();</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;coneMapper-&gt;SetInputConnection(&nbsp;cone-&gt;GetOutputPort()&nbsp;);</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;vtkActor&nbsp;*coneActor&nbsp;=&nbsp;vtkActor::New();</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;coneActor-&gt;SetMapper(&nbsp;coneMapper&nbsp;);</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;vtkRenderer&nbsp;*ren1=&nbsp;vtkRenderer::New();</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;ren1-&gt;AddActor(&nbsp;coneActor&nbsp;);</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;ren1-&gt;SetBackground(&nbsp;0.1,&nbsp;0.2,&nbsp;0.4&nbsp;);</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;vtkRenderWindow&nbsp;*renWin&nbsp;=&nbsp;vtkRenderWindow::New();</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;renWin-&gt;AddRenderer(&nbsp;ren1&nbsp;);</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;renWin-&gt;SetSize(&nbsp;300,&nbsp;300&nbsp;);</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;vtkRenderWindowInteractor&nbsp;*iren&nbsp;=&nbsp;vtkRenderWindowInteractor::New();</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;iren-&gt;SetRenderWindow(renWin);</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;vtkInteractorStyleTrackballCamera&nbsp;*style&nbsp;=&nbsp;vtkInteractorStyleTrackballCamera::New();</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;iren-&gt;SetInteractorStyle(style);</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:green">//&nbsp;add&nbsp;a&nbsp;cell&nbsp;picker&nbsp;with&nbsp;pickCallbackFunction;</span><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;vtkCellPicker*&nbsp;&nbsp;&nbsp;&nbsp;cellpicker&nbsp;=&nbsp;vtkCellPicker::New();</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;cellpicker-&gt;SetTolerance(0.1);</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;cellpicker-&gt;PickFromListOff();</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;iren-&gt;SetPicker(cellpicker);</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;myPickCallbackCommand*&nbsp;pickercbc&nbsp;=&nbsp;myPickCallbackCommand::New();</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;pickercbc-&gt;SetRenderer(ren1);</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;pickercbc-&gt;SetRenderWindowInteractor(iren);</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;cellpicker-&gt;AddObserver(vtkCommand::EndPickEvent,pickercbc);</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;pickercbc-&gt;Delete();</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;iren-&gt;Initialize();</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;iren-&gt;Start();</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;cellpicker-&gt;Delete();</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp; cone-&gt;Delete();</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;coneMapper-&gt;Delete();</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;coneActor-&gt;Delete();</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;ren1-&gt;Delete();</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;renWin-&gt;Delete();</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;iren-&gt;Delete();</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;style-&gt;Delete();</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;&nbsp;</span><span style="font-size:10.0pt; font-family:Consolas; color:blue">return</span><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;0;</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">}</span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black"></span></p>
<p class="MsoNormal" style="background:white"><span style="font-size:10.0pt; font-family:Consolas; color:black">&nbsp;</span></p>
</div>
<p class="MsoNormal"><span style="font-size:12.0pt; font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">&nbsp;</span></p>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1">The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified
 that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.<br>
</font>
</body>
</html>