Hi everybody.
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
//DEFINING
vtkSTLReader *volumeReader1 = vtkSTLReader::New();
vtkTransform *ActualPosition=vtkTransform::New();
vtkTransformPolyDataFilter *PositionFilter = vtkTransformPolyDataFilter::New();
vtkPolyData *MyPolyData;
…
//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.
Any suggestion?
Thanks in advance
Michele