[vtkusers] About vtkPoints::InsertPoint()
Wenlong
scc.wwl at gmail.com
Thu Apr 26 10:04:39 EDT 2012
Hi, David & Robert
Thank you very much for your reply.
Robert,
Yes, I use x[2] = 3. That was a mistyping.
David,
I call vtkPoints->InsertPoint(1, x) without SetNumberOfComponents() in my
previous application with Windows Vista & Visual Studio 2008 on another PC.
It works. But as I call it in my current application with Windows 7 & Visual
Studio 2008, the error pops up. I'm not sure if this is caused by different
OS.
A demo code #1 is like this
{
vtkPoints* points = vtkPoints::New();
float x[3];
x[0] = 0;
x[1] = 1;
x[2] = 2;
points->InsertPoint(0, x); //where the access conflict happens
}
Another demo code #2 is
{
vtkGenericDataObjectReader* reader = vtkGenericDataObjectReader::New();
reader->SetFileName("C:\\Users\\Wenlong\\Desktop\\surface.vtk");
//where the access conflict happens
reader->OpenVTKFile();
reader->Update();
}
The same access conflict happens when the vtkGenericDataObjectReader
instance try to get to the .vtk file. I check the file and it does exist and
it is not occupied by any other program.
I don't understand why this is happening cause I set the including
directories and libraries as necessary.
Thank you very much for your kindly help.
Best regards
Wenlong
--
View this message in context: http://vtk.1045678.n5.nabble.com/About-vtkPoints-InsertPoint-tp5667490p5667705.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list