<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_attr">On Fri, Jan 18, 2019 at 3:40 PM shadab anwar <<a href="mailto:sk.shadabanwar@gmail.com">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>