<div dir="ltr">Hi David;<div><br></div><div>I am still not getting the output.</div><div>This is what I am doing. </div><div>I don't know if it makes sense.But I thought it'll better to share the code.Please let me know for any clarifications you need.</div><div><br></div><div><br></div><div><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">class</span><span style="color:rgb(192,192,192)"> </span><span style="font-weight:600;color:rgb(128,0,128)">vtkTimerCallback2</span><span style="color:rgb(192,192,192)"> </span>:<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">public</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkCommand</span></pre>
<pre style="margin-top:0px;margin-bottom:0px">{</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">public</span>:</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">timerId</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,128,0)">static</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkTimerCallback2</span><span style="color:rgb(192,192,192)"> </span>*<span style="font-weight:600;color:rgb(0,103,124)">New</span>()</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>{</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(128,0,128)">vtkTimerCallback2</span><span style="color:rgb(192,192,192)"> </span>*<span style="color:rgb(9,46,100)">cb</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">new</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkTimerCallback2</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(9,46,100)">cb</span>-><span style="color:rgb(128,0,0)">TimerCount</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(128,128,0)">return</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">cb</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>}</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,128,0)">virtual</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">void</span><span style="color:rgb(192,192,192)"> </span><span style="font-weight:600;font-style:italic;color:rgb(0,103,124)">Execute</span>(<span style="color:rgb(128,0,128)">vtkObject</span><span style="color:rgb(192,192,192)"> </span>*<span style="color:rgb(9,46,100)">caller</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">unsigned</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">long</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">eventId</span>,</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(128,128,0)">void</span><span style="color:rgb(192,192,192)"> </span>*<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">vtkNotUsed</span>(callData))</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>{</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(128,128,0)">if</span><span style="color:rgb(192,192,192)"> </span>(<span style="color:rgb(128,0,128)">vtkCommand</span>::<span style="color:rgb(128,0,128)">TimerEvent</span><span style="color:rgb(192,192,192)"> </span>==<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">eventId</span>)</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span>{</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span>++<span style="color:rgb(128,128,0)">this</span>-><span style="color:rgb(128,0,0)">TimerCount</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span>}</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(0,128,0)">std::cout</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><<</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">this->TimerCount</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><<</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">std::endl;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(128,0,128)">vtkRenderWindowInteractor</span><span style="color:rgb(192,192,192)"> </span>*<span style="color:rgb(9,46,100)">iren</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkRenderWindowInteractor</span>::<span style="color:rgb(0,103,124)">SafeDownCast</span>(<span style="color:rgb(9,46,100)">caller</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">      </span><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)">  </span><span style="color:rgb(0,128,0)">vtkRenderer</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">*ren</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">vtkRenderer::SafeDownCast(caller);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(128,128,0)">if</span>(<span style="color:rgb(128,0,0)">TimerCount</span><=<span style="color:rgb(128,0,0)">toolLocations</span>-><span style="color:rgb(0,103,124)">GetNumberOfPoints</span>())</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">         </span>{</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(128,128,0)">double</span>*<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">location</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">toolLocations</span>-><span style="color:rgb(0,103,124)">GetPoint</span>(<span style="color:rgb(128,0,0)">TimerCount</span>-<span style="color:rgb(0,0,128)">1</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">a</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">location</span>[<span style="color:rgb(0,0,128)">0</span>];</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">b</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">location</span>[<span style="color:rgb(0,0,128)">1</span>];</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">c</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">location</span>[<span style="color:rgb(0,0,128)">2</span>];</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(128,128,0)">for</span><span style="color:rgb(192,192,192)"> </span>(<span style="color:rgb(128,128,0)">unsigned</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">k</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(0,0,128)">0</span>;<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">k</span><span style="color:rgb(192,192,192)"> </span><<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">height</span>;<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">k</span>++){</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                </span><span style="color:rgb(128,128,0)">for</span><span style="color:rgb(192,192,192)"> </span>(<span style="color:rgb(128,128,0)">unsigned</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">j</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0</span>;<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">j</span><span style="color:rgb(192,192,192)"> </span><<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">roughingToolWidth</span>;<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">j</span>++)<span style="color:rgb(192,192,192)"> </span>{</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                    </span><span style="color:rgb(128,128,0)">for</span><span style="color:rgb(192,192,192)"> </span>(<span style="color:rgb(128,128,0)">unsigned</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">i</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0</span>;<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">i</span><span style="color:rgb(192,192,192)"> </span><<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">roughingToolWidth</span>;<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">i</span>++)<span style="color:rgb(192,192,192)"> </span>{</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                        </span><span style="color:rgb(128,128,0)">unsigned</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">char</span>*<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">voxel</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">static_cast</span><<span style="color:rgb(128,128,0)">unsigned</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">char</span>*>(<span style="color:rgb(128,0,0)">imageData</span>-><span style="font-style:italic;color:rgb(0,103,124)">GetScalarPointer</span>(<span style="color:rgb(9,46,100)">i</span>+<span style="color:rgb(9,46,100)">a</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">j</span>+<span style="color:rgb(9,46,100)">b</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">k</span>+<span style="color:rgb(9,46,100)">c</span>));</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                        </span><span style="color:rgb(0,128,0)">//std::cout<<"voxel</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">value:</span><span style="color:rgb(192,192,192)">  </span><span style="color:rgb(0,128,0)">"<<voxel[0]<<"</span><span style="color:rgb(192,192,192)">  </span><span style="color:rgb(0,128,0)">tool</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">value:</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"<<roughingToolDepthMap[i</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">+</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">j*roughingToolWidth]<<std::endl;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                        </span><span style="color:rgb(128,128,0)">if</span><span style="color:rgb(192,192,192)"> </span>(<span style="color:rgb(128,0,0)">roughingToolDepthMap</span>[<span style="color:rgb(9,46,100)">i</span><span style="color:rgb(192,192,192)"> </span>+<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">j</span>*<span style="color:rgb(128,0,0)">roughingToolWidth</span>]==<span style="color:rgb(0,0,128)">0</span><span style="color:rgb(192,192,192)"> </span>&&<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">voxel</span>[<span style="color:rgb(0,0,128)">0</span>]!=<span style="color:rgb(0,0,128)">0</span>){</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                            </span><span style="color:rgb(9,46,100)">voxel</span>[<span style="color:rgb(0,0,128)">0</span>]<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                        </span>}</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                    </span>}</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">                </span>}</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span>}</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(128,0,0)">imageData</span>-><span style="color:rgb(0,103,124)">GetPointData</span>()-><span style="color:rgb(0,103,124)">GetScalars</span>()-><span style="font-style:italic;color:rgb(0,103,124)">Modified</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(128,0,0)">imageData</span>-><span style="font-style:italic;color:rgb(0,103,124)">Modified</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(128,0,0)">actorTool</span>-><span style="font-style:italic;color:rgb(0,103,124)">SetPosition</span>(<span style="color:rgb(9,46,100)">location</span>[<span style="color:rgb(0,0,128)">0</span>],<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">location</span>[<span style="color:rgb(0,0,128)">1</span>],<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">location</span>[<span style="color:rgb(0,0,128)">2</span>]);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkSmartVolumeMapper</span>><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">mapper</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkSmartVolumeMapper</span>>::<span style="color:rgb(0,103,124)">New</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(9,46,100)">mapper</span>-><span style="font-style:italic;color:rgb(0,103,124)">SetInputData</span>(<span style="color:rgb(128,0,0)">imageData</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(128,0,0)">volume</span>-><span style="color:rgb(0,103,124)">SetMapper</span>(<span style="color:rgb(9,46,100)">mapper</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(0,128,0)">//ren->AddViewProp(volume);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(0,128,0)">//iren->GetRenderWindow()->AddRenderer(ren);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(9,46,100)">iren</span>-><span style="font-style:italic;color:rgb(0,103,124)">GetRenderWindow</span>()-><span style="font-style:italic;color:rgb(0,103,124)">Render</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">         </span>}</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">         </span><span style="color:rgb(128,128,0)">else</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span>{</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(128,128,0)">double</span>*<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">location</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">toolLocations</span>-><span style="color:rgb(0,103,124)">GetPoint</span>(<span style="color:rgb(0,0,128)">0</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(128,0,0)">actorTool</span>-><span style="font-style:italic;color:rgb(0,103,124)">SetPosition</span>(<span style="color:rgb(9,46,100)">location</span>[<span style="color:rgb(0,0,128)">0</span>],<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">location</span>[<span style="color:rgb(0,0,128)">1</span>],<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">location</span>[<span style="color:rgb(0,0,128)">2</span>]);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(9,46,100)">iren</span>-><span style="color:rgb(0,103,124)">DestroyTimer</span>(<span style="color:rgb(128,128,0)">this</span>-><span style="color:rgb(128,0,0)">timerId</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)">            </span><span style="color:rgb(0,128,0)">cout</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><<</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"Timer</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Destroyed:</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><<iren->DestroyTimer(this->timerId)</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><<</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">endl;</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">         </span>}</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>}</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">private</span>:</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">TimerCount</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">public</span>:</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,128)">vtkActor</span>*<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">actorTool</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkPoints</span>><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">toolLocations</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkImageData</span>><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">imageData</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,128,0)">unsigned</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">roughingToolWidth</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">      </span><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span>*<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">roughingToolDepthMap</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">     </span><span style="color:rgb(128,128,0)">unsigned</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">height</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">     </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkVolume</span>><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">volume</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px">};</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre><div><br></div><div><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">void</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">MainWindow</span>::<span style="font-weight:600;color:rgb(0,103,124)">on_toolPathSimulation_clicked</span>()</pre>
<pre style="margin-top:0px;margin-bottom:0px">{</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><span style="color:rgb(192,192,192)"> </span><<span style="color:rgb(128,0,128)">vtkSTLReader</span>><span style="color:rgb(9,46,100)">reader</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><span style="color:rgb(192,192,192)"> </span><<span style="color:rgb(128,0,128)">vtkSTLReader</span>>::<span style="color:rgb(0,103,124)">New</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">reader</span>-><span style="font-style:italic;color:rgb(0,103,124)">SetFileName</span>(<span style="color:rgb(0,128,0)">"C://Users//Shaikh</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Shadab</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Anwar//Desktop//cutter.stl"</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">reader</span>-><span style="font-style:italic;color:rgb(0,103,124)">Update</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,128,0)">//Render</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Tool</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">to</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">VTK</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Widget</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Window</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><span style="color:rgb(192,192,192)"> </span><<span style="color:rgb(128,0,128)">vtkPolyDataMapper</span>><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">mapper</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><span style="color:rgb(192,192,192)"> </span><<span style="color:rgb(128,0,128)">vtkPolyDataMapper</span>>::<span style="color:rgb(0,103,124)">New</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">mapper</span>-><span style="font-style:italic;color:rgb(0,103,124)">SetInputConnection</span>(<span style="color:rgb(9,46,100)">reader</span>-><span style="color:rgb(0,103,124)">GetOutputPort</span>());</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,0)">actorTool</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><span style="color:rgb(192,192,192)"> </span><<span style="color:rgb(128,0,128)">vtkActor</span>>::<span style="color:rgb(0,103,124)">New</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,0)">actorTool</span>-><span style="font-style:italic;color:rgb(0,103,124)">SetMapper</span>(<span style="color:rgb(9,46,100)">mapper</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,0)">actorTool</span>-><span style="color:rgb(0,103,124)">GetProperty</span>()-><span style="font-style:italic;color:rgb(0,103,124)">SetColor</span>(<span style="color:rgb(0,0,128)">0.752941</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0.752941</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0.752941</span>);<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">//(R,G,B)</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,128)">vtkRenderWindowInteractor</span>*<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">renderWindowInteractor</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">ui</span>-><span style="color:rgb(128,0,0)">qvtkWidget</span>-><span style="font-style:italic;color:rgb(0,103,124)">GetRenderWindow</span>()-><span style="font-style:italic;color:rgb(0,103,124)">GetInteractor</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">renderWindowInteractor</span>-><span style="color:rgb(0,103,124)">SetRenderWindow</span>(<span style="color:rgb(128,0,0)">ui</span>-><span style="color:rgb(128,0,0)">qvtkWidget</span>-><span style="font-style:italic;color:rgb(0,103,124)">GetRenderWindow</span>());</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Add</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">the</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">actor</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">to</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">the</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">scene</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,0)">renderer</span>-><span style="color:rgb(0,103,124)">AddActor</span>(<span style="color:rgb(128,0,0)">actorTool</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">     </span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,0)">ui</span>-><span style="color:rgb(128,0,0)">qvtkWidget</span>-><span style="font-style:italic;color:rgb(0,103,124)">GetRenderWindow</span>()-><span style="font-style:italic;color:rgb(0,103,124)">Render</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Initialize</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">must</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">be</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">called</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">prior</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">to</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">creating</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">timer</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">events.</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">renderWindowInteractor</span>-><span style="font-style:italic;color:rgb(0,103,124)">Initialize</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">   // ...doing something</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">inserting</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">few</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">test</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">values</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,128,0)">for</span>(<span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">i</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(0,0,128)">0</span>;<span style="color:rgb(9,46,100)">i</span>!=<span style="color:rgb(0,0,128)">240</span>;<span style="color:rgb(9,46,100)">i</span>++)</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>{</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(9,46,100)">toolPath</span>.<span style="color:rgb(0,103,124)">push_back</span>({<span style="color:rgb(9,46,100)">i</span>,<span style="color:rgb(0,0,128)">128</span>,<span style="color:rgb(0,0,128)">232</span>});</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span>}</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Create</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">a</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">vtkPoints</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">object</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">and</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">store</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">the</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">points</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">in</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">it</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkPoints</span>><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">points</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkPoints</span>>::<span style="color:rgb(0,103,124)">New</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,128,0)">for</span><span style="color:rgb(192,192,192)"> </span>(<span style="color:rgb(128,0,128)">size_t</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">i</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(0,0,128)">0</span>;<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">i</span><span style="color:rgb(192,192,192)"> </span><<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">toolPath</span>.<span style="color:rgb(0,103,124)">size</span>();<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">i</span>++){</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">         </span><span style="color:rgb(128,128,0)">double</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">p</span>[<span style="color:rgb(0,0,128)">3</span>]<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span>{<span style="color:rgb(9,46,100)">toolPath</span>[<span style="color:rgb(0,103,124)">i</span>].<span style="color:rgb(128,0,0)">x</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">toolPath</span>[<span style="color:rgb(0,103,124)">i</span>].<span style="color:rgb(128,0,0)">y</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">toolPath</span>[<span style="color:rgb(0,103,124)">i</span>].<span style="color:rgb(128,0,0)">z</span>};</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">         </span><span style="color:rgb(9,46,100)">points</span>-><span style="color:rgb(0,103,124)">InsertNextPoint</span>(<span style="color:rgb(9,46,100)">p</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">         </span>}</pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,128,0)">//</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">Sign</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">up</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">to</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">receive</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">TimerEvent</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkTimerCallback2</span>><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">cb</span><span style="color:rgb(192,192,192)"> </span>=</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><<span style="color:rgb(128,0,128)">vtkTimerCallback2</span>>::<span style="color:rgb(0,103,124)">New</span>();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">cb</span>-><span style="color:rgb(128,0,0)">actorTool</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">actorTool</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">cb</span>-><span style="color:rgb(128,0,0)">imageData</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">imageData</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">cb</span>-><span style="color:rgb(128,0,0)">roughingToolDepthMap</span>=<span style="color:rgb(9,46,100)">roughingToolDepthMap</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">cb</span>-><span style="color:rgb(128,0,0)">roughingToolWidth</span>=<span style="color:rgb(9,46,100)">roughingToolWidth</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">cb</span>-><span style="color:rgb(128,0,0)">height</span>=<span style="color:rgb(9,46,100)">height</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">cb</span>-><span style="color:rgb(128,0,0)">volume</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">volume</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">cb</span>-><span style="color:rgb(128,0,0)">toolLocations</span><span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">points</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">renderWindowInteractor</span>-><span style="color:rgb(0,103,124)">AddObserver</span>(<span style="color:rgb(128,0,128)">vtkCommand</span>::<span style="color:rgb(128,0,128)">TimerEvent</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(9,46,100)">cb</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(9,46,100)">renderWindowInteractor</span>-><span style="color:rgb(0,103,124)">CreateRepeatingTimer</span>(<span style="color:rgb(0,0,128)">1</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px">}</pre></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jan 18, 2019 at 2:48 PM David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br></div><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"><div>Hi Shadab,</div><div><br></div><div>When you directly modify data in VTK, it is necessary to call Modified() on the data container or else the pipeline will not update.</div><div><br></div><div>For vtkImageData, the voxel values are stored in an array that can be retrieved as follows:</div><div><br></div><div>    data->GetPointData()->GetScalars()</div><div><br></div><div>So when you modify voxels, you should also do the following:</div><div><br></div><div>    data->GetPointData()->GetScalars()->Modified();</div><div>    data->Modified();</div><div><br></div><div>It's been a while since I've done anything similar myself, so there might be other Modifed() calls that are necessary.</div><div><br></div><div>Cheers,</div><div>   David</div><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail-m_9017491008469252376gmail_attr">On Fri, Jan 18, 2019 at 3:40 PM shadab anwar <<a href="mailto:sk.shadabanwar@gmail.com" target="_blank">sk.shadabanwar@gmail.com</a>> wrote:<br></div><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 everyone,<br><div><br></div><div>I am working on creating an animation of a tool and a workpiece (vtkimagedata). Where the tool should move to a  location and turnoff the voxels (create a hole) at that location. I want to animate a dynamic scene.</div><div><br></div><div>I am turning off voxels of workpiece (vtkimagedata) in "<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">virtual</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">void</span><span style="color:rgb(192,192,192)"> </span><span style="font-weight:600;font-style:italic;color:rgb(0,103,124)">Execute </span>() "  function of  " <span style="color:rgb(128,128,0)">class</span><span style="color:rgb(192,192,192)"> </span><span style="font-weight:600;color:rgb(128,0,128)">vtkTimerCallback"</span>   but I am not able to render the updated vtkimagedata.</div><div><br></div><div>basically I am not able to see the hole at those positions.</div><div><br></div><div>Any suggestions? directions? on how its done will be a great help.</div><div><br></div><div>Thanks,</div><div>Shadab</div></div>
</blockquote></div></div>
</blockquote></div>