Skip to content
Snippets Groups Projects
Commit ff94a5ea authored by Andrew Maclean's avatar Andrew Maclean
Browse files

Updating PineRoot*

parent 75794024
Branches
No related tags found
1 merge request!354All classes in Python are now represented in PythonicAPI
......@@ -15,7 +15,7 @@ To illustrate the application of connectivity analysis, we will use an MRI datas
#### Python
We just implement:
``` python
def NumberOfTriangles(pd):
def number_of_triangles(pd):
```
within the scope of the calling function.
......
......@@ -15,7 +15,7 @@ auto NumberofTriangles = [](auto *pd)
We just implement:
``` python
def NumberOfTriangles(pd):
def number_of_triangles(pd):
```
within the scope of the calling function.
......
......@@ -41,25 +41,6 @@ This example demonstrates how to use the vtkConnectivityFilter and vtkDecimate.
def main():
# def NumberOfTriangles(pd):
# """
# Count the number of triangles.
# :param pd: vtkPolyData.
# :return: The number of triangles.
# """
# cells = pd.GetPolys()
# numOfTriangles = 0
# idList = vtkIdList()
# for i in range(0, cells.GetNumberOfCells()):
# cells.GetNextCell(idList)
# # If a cell has three points it is a triangle.
# if idList.GetNumberOfIds() == 3:
# numOfTriangles += 1
# return numOfTriangles
#
# colors = vtkNamedColors()
#
# fileName = get_program_parameters()
def number_of_triangles(pd):
"""
Count the number of triangles.
......
......@@ -164,7 +164,7 @@ Sometimes we need to update part of a pipeline so that output can be used in oth
| -------------- | ---------------------- | ------- |
[LineOnMesh](/PythonicAPI/DataManipulation/LineOnMesh) | One pipeline creates a smoothed dataset. However we need to update `smooth_loop` in the pipeline so that `?vtkCellLocator?` finds cells in order to create the spline.
[MeshLabelImageColor](/PythonicAPI/DataManipulation/MeshLabelImageColor) | We need the smoother error for the scalar range in the mapper. So we create the pipeline and update `smoother` to get the needed scalar range. Of course, all other pipeline elements feeding into `smoother` will be updated also.
[PineRootDecimation](/PythonicAPI/VisualizationAlgorithms/PineRootDecimation) | In this line `(reader >> deci >> connect >> iso_mapper).update()` we update the pipeline so that we can output counts of triangles all in one place.
[PineRootDecimation](/PythonicAPI/VisualizationAlgorithms/PineRootDecimation) | We update the pipeline in this line: `(reader >> deci >> connect >> iso_mapper).update()`. This allows us to output counts of triangles all in one place.
## Reusing a pipeline
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment