Hi everyone,<div><br></div><div>I have a polydata that results from using vtkThresholdPoints on another mesh. I want to retrieve the &quot;vtkOriginalPointIds&quot; from this resulting polydata, here&#39;s the code snippet:</div>
<div><br></div><div><div>vtkIdTypeArray* origIds = vtkIdTypeArray::SafeDownCast(polydataThresholded-&gt;GetPointData()-&gt;GetArray(&quot;vtkOriginalPointIds&quot;));</div><div><br></div><div>so far so good. However, when I try to access the &quot;origIds&quot; array I get a segmentation fault. When printing origIds I find that it is a NULL pointer. For example, the snippet:</div>
<div><br></div><div>std::cout &lt;&lt; origIds &lt;&lt; std::endl;</div><div>std::cout &lt;&lt; origIds-&gt;GetNumberOfTuples() &lt;&lt; std::endl;</div></div><div><br></div><div>gives me:</div><div><br></div><div>0</div>
<div>Segmentation fault</div><div><br></div><div>Is there something wrong with my code? How to retrieve the original point ids array from a polydata?</div><div><br></div><div>Thanks,</div><div>Miguel</div>