[vtkusers] PedigreeIds arrays don't propogate accross a pipeline
Eric E. Monson
emonson at cs.duke.edu
Fri Nov 5 09:03:16 EDT 2010
Hey Jenya,
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:
http://www.vtk.org/doc/nightly/html/classvtkAssignAttribute.html
with a call something like:
m_assignAttributes->Assign("arrayName", vtkDataSetAttributes::PEDIGREEIDS, vtkAssignAttribute::POINT_DATA);
or
m_assignAttributes->Assign(vtkDataSetAttributes::SCALARS, vtkDataSetAttributes::PEDIGREEIDS, vtkAssignAttribute::POINT_DATA);
will work if the array you want is already the "active" scalar attribute.
-Eric
------------------------------------------------------
Eric E Monson
Duke Visualization Technology Group
On Nov 4, 2010, at 4:52 PM, Jenya Burstein wrote:
> Hello,
>
> I am having a difficulty of retrieving a pedigree array from a filter's output.
>
> m_tableToPolyData->GetOutput()->GetAttributes(vtkDataObject::POINT)->SetPedigreeIds(
> m_tableToPolyData->GetOutput()->GetPointData()->GetAbstractArray(0));
> vtkSmartPointer<vtkClipPolyData> anotherFilter = vtkSmartPointer<vtkClipPolyData>::New();
> anotherFilter->SetInputConnection(m_tableToPolyData->GetOutputPort());
> anotherFilter->Update();
>
> vtkAbstractArray* origPedigreeIds = m_tableToPolyData->GetOutput()->GetAttributes(vtkDataObject::POINT)->GetPedigreeIds();
> //origPedigreeIds comes back correctly.
> vtkAbstractArray* pedigreeIds = anotherFilter->GetOutput()->GetAttributes(vtkDataObject::POINT)->GetPedigreeIds();
> //pedigreeIds comes back as NULL
>
> Any help is greatly appreciated,
> Jenya
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101105/e0815d60/attachment.htm>
More information about the vtkusers
mailing list