I was using VTK 5.10 and decided to move to newer version. I found that there was a Migration/Replacement of SetInput and modified accordingly my code.
In terms of Polydata visualization, everything works fine.
However, I have problems reading the output of filters. In particular, I would like to access to vtkPolyData info (i.e. number of points and so on) form a vtkTransformPolyDataFilter.
In what follow the updated version of the code, which compile but doesn’t work as the previous version under VTK 5.10
vtkSTLReader *volumeReader1 = vtkSTLReader::New();
vtkTransformPolyDataFilter *PositionFilter = vtkTransformPolyDataFilter::New();
//CONNECTING volumeReader1->SetFileName(filename1); PositionFilter->SetInputConnection(volumeReader1->GetOutputPort()); PositionFilter->SetTransform(ActualPosition); MyPolyData = PositionFilter->GetOutput(); BonePolyData->Modified(); ... //READING INFO int n = BonePolyData->GetNumberOfPoints(); //I also tried int n = PositionFilter->GetOutput()->GetNumberOfPoints();
In both cases I got n = 0 while it should not be.
Thanks in advance