简体   繁体   中英

How to get number of points of a polydata from sourceproxy?

I would like to check the number of points of the active source from python shell, without Fetching the object. How can I access this information, similarly to PointData[:] ?

Try:

source.GetDataInformation().GetNumberOfPoints()

source.GetDataInformation() returns an vtkPVDataInformation object with other useful methods.

Remember that the source must have been "executed" to get valid information. ie if needed, call source.UpdatePipeline() before calling GetDataInformation().

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM