how to get a vtkDataSet from the vtkSmartPointer


I have a vtkSmartPointer such like this:
vtkSmartPointer sphereSource = vtkSmartPointer::New();

How could I get a vtkDataSet from the sphereSource? It seems there is a vtkDataSet::SafeDownCast function, but I’m not sure what is the suitable input parameters for this function

Thanks a lot for your help!

I answer it by myself, it seems this works for me: