[vtkusers] How to delete all nodes in the vtkContourWidget without crashes?
Mengda Wu
wumengda at gmail.com
Thu Jan 21 16:45:34 EST 2016
Hello all,
I am trying to delete all nodes (user defined) in vtkContourWidget but
the following code crashes when I call ClearAllNodes. Why is this? How to
do it correctly?
vtkSmartPointer<vtkOrientedGlyphContourRepresentation>
contourRepresentation =
vtkSmartPointer<vtkOrientedGlyphContourRepresentation>::New();
drawWidget = vtkSmartPointer<vtkContourWidget>::New();
drawWidget ->SetRepresentation(contourRepresentation);
drawWidget ->SetInteractor(this->GetInteractor());
drawWidget->On();
vtkOrientedGlyphContourRepresentation *contourRepresentation =
vtkOrientedGlyphContourRepresentation::SafeDownCast(
vtkContourWidget->GetContourRepresentation());
vtkContourWidget->GetContourRepresentation()->ClearAllNodes() //crash
happens
Thanks,
Mengda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160121/31f9ddfc/attachment.html>
More information about the vtkusers
mailing list