[vtkusers] vtkClipPolyData Update call crashes program
timecatcher
8mh at queensu.ca
Sat Oct 1 17:44:28 EDT 2011
Hi,
I am currently facing a problem with calling update on the vtkClipPolyData
object. My program prematurely terminates.
I am not sure why the algorithm is unable to execute. All the objects are
appropriately initialized and used.
I know that connections work because if I don't update the clipper then the
plane widget with an empty polydata is rendered. When I call update() the
program ends prematurely.
Here is my code snippet:
void initializeClippingObjects() {
planeWidget = vtkImplicitPlaneWidget::New();
planeWidget->SetInteractor(interactor); // vtkRenderWindowInteractor
interactor
planeWidget->DrawPlaneOff();
planeWidget->OutlineTranslationOff();
planeWidget->ScaleEnabledOff();
planeWidget->KeyPressActivationOff();
planeWidget->NormalToXAxisOn();
planeWidget->Off();
clipper = vtkClipPolyData::New();
clipper->DebugOn();
clippingPlane = vtkPlane::New();
clippingPlane->DebugOn();
clipper->SetClipFunction(clippingPlane);
}
void enableClipping() {
planeWidget->SetProp3D(surfaceActor);
planeWidget->SetPlaceFactor(1.25);
planeWidget->PlaceWidget();
planeWidget->On();
clipper->SetInput(dataset); //dataset is of type vtkPolyData
}
void performClip() {
planeWidget->GetPlane(clippingPlane);
clipper->Update();
dataset->DeepCopy(clipper->GetOutputDataObject(0)); //this drives the
dataset pipeline to update the view
}
initializeClippingObjects() is called in the constructor.
A qt checkbox triggers enableClipping() which works fine since the dataset
is displayed in the plane widget. Then a qt button triggers performClip().
Here are the debug messages:
Debug: In /build/buildd/vtk-5.4.2/Filtering/vtkAlgorithm.h, line 150
vtkClipPolyData (0x1a0af00): vtkClipPolyData (0x1a0af00): setting
AbortExecute to 0
Debug: In /build/buildd/vtk-5.4.2/Graphics/vtkClipPolyData.cxx, line 135
vtkClipPolyData (0x1a0af00): Clipping polygonal data
Debug: In /build/buildd/vtk-5.4.2/Filtering/vtkAlgorithm.h, line 151
vtkClipPolyData (0x1a0af00): vtkClipPolyData (0x1a0af00): returning
AbortExecute of 0
Debug: In /build/buildd/vtk-5.4.2/Filtering/vtkAlgorithm.h, line 151
vtkClipPolyData (0x1a0af00): vtkClipPolyData (0x1a0af00): returning
AbortExecute of 0
Debug: In /build/buildd/vtk-5.4.2/Filtering/vtkAlgorithm.h, line 151
vtkClipPolyData (0x1a0af00): vtkClipPolyData (0x1a0af00): returning
AbortExecute of 0
Debug: In /build/buildd/vtk-5.4.2/Filtering/vtkAlgorithm.h, line 151
vtkClipPolyData (0x1a0af00): vtkClipPolyData (0x1a0af00): returning
AbortExecute of 0
Debug: In /build/buildd/vtk-5.4.2/Filtering/vtkAlgorithm.h, line 151
vtkClipPolyData (0x1a0af00): vtkClipPolyData (0x1a0af00): returning
AbortExecute of 0
Debug: In /build/buildd/vtk-5.4.2/Filtering/vtkAlgorithm.h, line 151
vtkClipPolyData (0x1a0af00): vtkClipPolyData (0x1a0af00): returning
AbortExecute of 0
Debug: In /build/buildd/vtk-5.4.2/Filtering/vtkAlgorithm.h, line 151
vtkClipPolyData (0x1a0af00): vtkClipPolyData (0x1a0af00): returning
AbortExecute of 0
Debug: In /build/buildd/vtk-5.4.2/Filtering/vtkAlgorithm.h, line 151
vtkClipPolyData (0x1a0af00): vtkClipPolyData (0x1a0af00): returning
AbortExecute of 0
Debug: In /build/buildd/vtk-5.4.2/Filtering/vtkAlgorithm.h, line 151
vtkClipPolyData (0x1a0af00): vtkClipPolyData (0x1a0af00): returning
AbortExecute of 0
Debug: In /build/buildd/vtk-5.4.2/Filtering/vtkAlgorithm.h, line 151
vtkClipPolyData (0x1a0af00): vtkClipPolyData (0x1a0af00): returning
AbortExecute of 0
Debug: In /build/buildd/vtk-5.4.2/Filtering/vtkAlgorithm.h, line 151
vtkClipPolyData (0x1a0af00): vtkClipPolyData (0x1a0af00): returning
AbortExecute of 0
Segmentation Fault
Any help will be appreciated.
Thanks,
timecatcher
--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkClipPolyData-Update-call-crashes-program-tp4860718p4860718.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list