[vtkusers] Show whole volume under a slice

Lonni Besançon lonni.besancon at gmail.com
Thu Feb 25 10:31:59 EST 2016


Ok thanks for the advice.

So here is what I have tried:

      /  vtkSmartPointer<vtkPlanes> planes =
vtkSmartPointer<vtkPlanes>::New();
	vtkSmartPointer<vtkPoints> origins = vtkSmartPointer<vtkPoints>::New();
	origins->SetNumberOfPoints(1);
	origins->InsertNextPoint(plane->GetOrigin());
	vtkSmartPointer<vtkDoubleArray> normalsArray =
vtkSmartPointer<vtkDoubleArray>::New();
	normalsArray->SetNumberOfComponents(3);
	normalsArray->SetNumberOfTuples(1);
	normalsArray->SetComponent(0,0,plane->GetNormal()[0]);
	normalsArray->SetComponent(0,1,plane->GetNormal()[1]);
	normalsArray->SetComponent(0,2,plane->GetNormal()[2]);
	planes->SetPoints(origins);
	planes->SetNormals(normalsArray);
	mainMapper->SetClippingPlanes(planes);/

But this gives me a memory access error when reaching the last line.
According to the debuger, the error is located in the for loop of the
SetClippingPlanes() method which is in turn in the call to:
/void vtkAbstractMapper::RemoveAllClippingPlanes(){if ( this->ClippingPlanes
) //.../

Would you happen to know what's wrong with what I've done there. I can't
really understand where the error comes from



--
View this message in context: http://vtk.1045678.n5.nabble.com/Show-whole-volume-under-a-slice-tp5736839p5736845.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list