[vtkusers] GetNumberOfPoints() of vtkPoints

Ming Chao mingchao2005 at gmail.com
Thu Oct 23 16:25:12 EDT 2008


Hi,
A couple of weeks ago I posted a problem with the GetNumberOfPoints() when
doing the following:

   vtkPolyDataReader *contourReader = vtkPolyDataReader::New();
contourReader->SetFileName( "Test.vtk" ); // test contour file in vtk format
contourReader->Update();

vtkPolyData *poly = vtkPolyData::New();
poly->DeepCopy( contourReader->GetOutput() );

vtkPoints *points = poly->GetPoints();
int NumberOfTotalPoints = points->GetNumberOfPoints(); <=======  here the
problem occurs!!!!

I am using the latest version 5.2.0 and visual studio 7. The compiling and
linking are fine, but when running the executable there was an error. I
tried to debug, and found that the break point in file crtexe.c at

#ifdef WPRFLAG
            __winitenv = envp;
            mainret = wmain(argc, argv, envp);
#else  /* WPRFLAG */
            __initenv = envp;
            mainret = main(argc, argv, envp);    <================= break
point !!!
#endif  /* WPRFLAG */

#endif  /* _WINMAIN_ */

            if ( !managedapp )
                exit(mainret);

            _cexit();

        }

When I was running the same code using older version vtk (before 5.0
release), everything was fine. Is there any change in vtkPoints?

I need to use this function urgently. I could not fine a workaround. Thanks
again for any suggestion and help.

Ming
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081023/724c0396/attachment.htm>


More information about the vtkusers mailing list