Commit bf5a5d11 authored by David Thompson's avatar David Thompson
Browse files

Use new (non-deprecated) API from VTK.

parent 69b3826f
......@@ -253,11 +253,10 @@ int vtkImageNarrowBand::RequestData(vtkInformation* request,
{
// Try to convert to polydata surface
bool is2d = true;
vtkNew<vtkCellTypes> cellTypes;
inputUnstructuredGrid->GetCellTypes(cellTypes);
for (vtkIdType i = 0; i < cellTypes->GetNumberOfTypes(); i++)
auto* cellTypes = inputUnstructuredGrid->GetDistinctCellTypesArray();
for (vtkIdType i = 0; i < cellTypes->GetNumberOfTuples(); i++)
{
const int cellType = cellTypes->GetCellType(i);
const unsigned char cellType = cellTypes->GetTuple1(i);
if (cellType != VTK_QUAD && cellType != VTK_TRIANGLE && cellType != VTK_LINE &&
cellType != VTK_VERTEX)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment