Skip to content
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

ttkExtract should provide a new mode where one can extract cells of a specified dimension #398

Open
JonasLukasczyk opened this issue Jun 29, 2020 · 2 comments

Comments

@JonasLukasczyk
Copy link
Contributor

No description provided.

@JonasLukasczyk
Copy link
Contributor Author

This thread describes a way to extract cells of a given type via the programmable filter by first storing the types as cell data, and then thresholding a specific type:

od = self.GetOutput()
od.ShallowCopy(self.GetInput())
cta = vtk.vtkIntArray()
cta.SetName("cell types")
cta.SetNumberOfComponents(1)
cta.SetNumberOfTuples(od.GetNumberOfCells())
od.GetCellData().AddArray(cta)
for x in range(0,od.GetNumberOfCells()):
cta.SetValue(x,od.GetCell(x).GetCellType())

So the question becomes if we should still add this functionality to the ttkExtract filter. What do you think @julien-tierny ?

@julien-tierny
Copy link
Collaborator

julien-tierny commented Jul 1, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants