[vtkusers] Assigning cell values on structured grid

David Doria daviddoria+vtk at gmail.com
Wed Feb 24 09:00:35 EST 2010


On Wed, Feb 24, 2010 at 8:54 AM, Sebastian Gatzka <
sebastian.gatzka at stud.tu-darmstadt.de> wrote:

>  I was afraid you would say that.
>
>
>
> I don’t know how to extract the cell center coordinates out of the cell
> Center class/object/filter.
>
> Please keep the discussion on the mailing list so everyone can
help/benefit.

  for(vtkIdType i = 0; i <
cellCentersFilter->GetOutput()->GetNumberOfPoints(); i++)
    {
    double p[3];
    cellCentersFilter->GetOutput()->GetPoint(i, p);
    cout << "Point " << i << " : " << p[0] << " , " << p[1] << " , " << p[2]
<< endl;
    }

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100224/aed4123a/attachment.htm>


More information about the vtkusers mailing list