<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hey Jenya,<div><br></div><div>I'm not totally sure, but it may be that you're having problems because you're assigning the Pedigree IDs "outside the pipeline". So, when the pipeline updates, it doesn't know to re-run your pedigree ids assignment statement. Instead of that first line, try putting a vtkAssignAttributes filter into the pipeline:</div><div><br></div><div><a href="http://www.vtk.org/doc/nightly/html/classvtkAssignAttribute.html">http://www.vtk.org/doc/nightly/html/classvtkAssignAttribute.html</a></div><div><br></div><div>with a call something like:</div><div><br></div><div>m_assignAttributes->Assign("arrayName", vtkDataSetAttributes::PEDIGREEIDS, vtkAssignAttribute::POINT_DATA);</div><div><br></div><div>or </div><div><br></div><div>m_assignAttributes->Assign(vtkDataSetAttributes::SCALARS, vtkDataSetAttributes::PEDIGREEIDS, vtkAssignAttribute::POINT_DATA);</div><div><br></div><div>will work if the array you want is already the "active" scalar attribute.</div><div><br></div><div>-Eric</div><div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div>------------------------------------------------------</div><div>Eric E Monson</div><div>Duke Visualization Technology Group</div><div><br class="webkit-block-placeholder"></div></span></div><br><div><div>On Nov 4, 2010, at 4:52 PM, Jenya Burstein wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hello,</div>
<div> </div>
<div>I am having a difficulty of retrieving a pedigree array from a filter's output.</div>
<div> </div>
<div><font face="courier new,monospace"> m_tableToPolyData->GetOutput()->GetAttributes(vtkDataObject::POINT)->SetPedigreeIds(<br> m_tableToPolyData->GetOutput()->GetPointData()->GetAbstractArray(0));<br>
vtkSmartPointer<vtkClipPolyData> anotherFilter = vtkSmartPointer<vtkClipPolyData>::New();<br> anotherFilter->SetInputConnection(m_tableToPolyData->GetOutputPort());<br> anotherFilter->Update();</font></div>
<div><font face="courier new,monospace"> <br> vtkAbstractArray* <font color="#009900">origPedigreeIds</font> = m_tableToPolyData->GetOutput()->GetAttributes(vtkDataObject::POINT)->GetPedigreeIds();</font></div>
<div><font face="courier new,monospace"> <font color="#009900">//origPedigreeIds comes back correctly.<br></font> vtkAbstractArray* <font color="#ff0000">pedigreeIds</font> = anotherFilter->GetOutput()->GetAttributes(vtkDataObject::POINT)->GetPedigreeIds();</font></div>
<div><font color="#ff0000" face="courier new,monospace"> //pedigreeIds comes back as NULL</font></div>
<div> </div>
<div>Any help is greatly appreciated,</div>
<div>Jenya<br></div>
_______________________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br></blockquote></div><br></div></body></html>