<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-&gt;Assign("arrayName", vtkDataSetAttributes::PEDIGREEIDS, vtkAssignAttribute::POINT_DATA);</div><div><br></div><div>or&nbsp;</div><div><br></div><div>m_assignAttributes-&gt;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>&nbsp;</div>
<div>I am having a difficulty of retrieving a pedigree array from a filter's output.</div>
<div>&nbsp;</div>
<div><font face="courier new,monospace">&nbsp; m_tableToPolyData-&gt;GetOutput()-&gt;GetAttributes(vtkDataObject::POINT)-&gt;SetPedigreeIds(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_tableToPolyData-&gt;GetOutput()-&gt;GetPointData()-&gt;GetAbstractArray(0));<br>

&nbsp; vtkSmartPointer&lt;vtkClipPolyData&gt; anotherFilter = vtkSmartPointer&lt;vtkClipPolyData&gt;::New();<br>&nbsp; anotherFilter-&gt;SetInputConnection(m_tableToPolyData-&gt;GetOutputPort());<br>&nbsp; anotherFilter-&gt;Update();</font></div>


<div><font face="courier new,monospace">&nbsp;<br>&nbsp; vtkAbstractArray* <font color="#009900">origPedigreeIds</font> = m_tableToPolyData-&gt;GetOutput()-&gt;GetAttributes(vtkDataObject::POINT)-&gt;GetPedigreeIds();</font></div>


<div><font face="courier new,monospace">&nbsp; <font color="#009900">//origPedigreeIds&nbsp;comes back correctly.<br></font>&nbsp; vtkAbstractArray* <font color="#ff0000">pedigreeIds</font> = anotherFilter-&gt;GetOutput()-&gt;GetAttributes(vtkDataObject::POINT)-&gt;GetPedigreeIds();</font></div>


<div><font color="#ff0000" face="courier new,monospace">&nbsp; //pedigreeIds comes back as NULL</font></div>
<div>&nbsp;</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>