[vtkusers] vtkUnstructuredGrid output from a vtkLinearToQuadraticCellsFilter

Florian Benedetti florian.benedetti at cea.fr
Tue Nov 27 12:00:28 EST 2018


Hi folks,

I'm new to VTK (I'm using VTK8 C++ API). I have a vtkUnstructuredGrid 
dataset, consisting of linear triangle/tetrahedral cells, and I'm trying 
to convert it into a dataset of quadratic cells with a 
vtkLinearToQuadraticCellsFilter object.

It works fine on visualization. Now, I would like to get an 
vtkUnstructuredGrid dataset from filter but I didn't manage to do that 
since I didn't clearly understand the documentation. How I can get an 
output dataset from a filter ?

// Code example

...

vtkSmartPointer<vtkUnstructuredGrid> dataSet = 
vtkDataSet::SafeDownCast(input_file->GetOutput());

vtkSmartPointer<vtkLinearToQuadraticCellsFilter> quadCells = 
vtkSmartPointer<vtkLinearToQuadraticCellsFilter>::New();

quadCells->SetInputData(dataSet);

// How to recover an output dataset from filter

...

Thanks in advance for your help.

Regards,



More information about the vtkusers mailing list