[vtkusers] no matching function for call to vtkPolyData::GetNumberofPoints()
Vetria Byrd
byrdv at cis.uab.edu
Tue Jan 27 12:12:36 EST 2004
I have written a simple program (Reader.cxx) to read in PolyData from a file and
print the number of points found in the data file. I have included
vtkPolyData.h and vtkPolyDataReader.h but I am getting the following error
message:
Building object file Reader.o...
Reader/Reader.cxx: In function `int main(...)':
Reader/Reader.cxx:26: no matching function for call to
`vtkPolyData::GetNumberofPoints ()'
make[1]: *** [Reader.o] Error 1
make: *** [default_target] Error 2
I don't understand what the problem is . . .
Here's the code:
#include "vtkPolyData.h"
#include "vtkPolyDataReader.h"
void main ()
{
// read data from file
vtkPolyDataReader *PolyDataReader = vtkPolyDataReader::New();
vtkPolyData *PolyData;
PolyDataReader->SetFileName("Data/honolulu.vtk");
PolyDataReader->Update();
PolyData = PolyDataReader->GetOutput();
printf("\n pts read: %d\n",PolyData->GetNumberofPoints() );
//
// Free up any objects created
//
PolyData->Delete();
PolyDataReader->Delete();
return 0;
}
More information about the vtkusers
mailing list