Hi everyone,<div><br></div><div>I have a polydata that results from using vtkThresholdPoints on another mesh. I want to retrieve the "vtkOriginalPointIds" from this resulting polydata, here's the code snippet:</div>
<div><br></div><div><div>vtkIdTypeArray* origIds = vtkIdTypeArray::SafeDownCast(polydataThresholded->GetPointData()->GetArray("vtkOriginalPointIds"));</div><div><br></div><div>so far so good. However, when I try to access the "origIds" 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 << origIds << std::endl;</div><div>std::cout << origIds->GetNumberOfTuples() << 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>