[vtk-developers] VTK SetPoints Error
ragu at myosight.org
Sun Dec 19 06:12:19 EST 2010
This is my first time posting to this list, so I hope someone out there can help me. I have the following code that needs to create a model that I will specify. I am using VTK 5.6.1 under OSX 10.6.5 with Cocoa build and RelWithDebInfo, linked with Qt 4.7, and
VTK_REQUIRED_OBJCXX_FLAGS:STRING="" to get it to work with Qt.
The issue lies with the SetPoints method, which seems to automatically delete the parameter 'Points'. I stepped through the debugger, and it shows that the method makes points reference count 0 from 1, while the fielddata and cells lines all work as expected. My program crashes on 'points->Delete' everytime, and I'm not sure why?
vtkPolyData* model = vtkPolyData::New();
cout << model->GetPoints() << endl;
vtkPoints* points = vtkPoints::New();
vtkFieldData* fieldData = vtkFieldData::New();
vtkCellArray* cells = vtkCellArray::New();
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtk-developers