Add Two vtkImageData To Avoid Connectivity Removing Object
We create a cone and a sphere individually, then combine the cone and the sphere, show it in the middle renderer. #define vtkSPtr vtkSmartPointer #define vtkSPtrNew(Var, Type) vtkSPtr<Type> Var = vtkSPtr<Type>::New(); unsigned char inval = 255; unsigned char outval = 0; double spacingVal = 0.5; vtkSPtr<vtkImageData> ConvertPolydataToImage(vtkPolyData *polydata) { double Read more…