New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to output the radius from vtkvmtkPolyDataCenterlines #356
Comments
You can get radius from the centerline extraction filter as point data array in the output polydata. You can set the array name using SetRadiusArrayName before executing the filter. |
Thank you very much for your reply. But I still don't know how to obtain the radius. If I know the radius array name: How can I obtain the radius? Could you please provide an example? Python or C++ is OK. For example, I can obtain the point coordinate of center line as:
How to obtain the radius for each point? |
You can get point data as a numpy array as it is done in this convenience method: |
I can get the point as:
However, the shape of narray is: n*3, and I believe this array is the coordinate of center lines. I still can not obtain the radius. |
You are right, to get point data arrays (not the point coordinates), you need to use a slightly different method: |
@lassoan Thank you for your nice reply. Finally, I can obtain the radius.
Hope it may help others. |
The VMTK tutorial said that the vtkvmtkPolyDataCenterlines can provide the radius of every point. How can I obtain the radius?
I can obtain the points of center lines as following:
Even I can obtain the voronoi diagram voronoiDiagram = centerlineFilter.GetVoronoiDiagram(), I don't know how to obtain the radius.
The text was updated successfully, but these errors were encountered: