# VtkImplicitFunction SetTransform not working

**URL:** https://discourse.vtk.org/t/vtkimplicitfunction-settransform-not-working/7089
**Category:** Support
**Created:** [November 5, 2021, 6:31pm UTC](https://discourse.vtk.org/t/vtkimplicitfunction-settransform-not-working/7089 "2021-11-05T18:31:25Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Hanxin\_Hua](https://discourse.vtk.org/user_avatar/discourse.vtk.org/hanxin_hua/32/3787_2.png) [@Hanxin\_Hua](https://discourse.vtk.org/u/Hanxin_Hua)
#### Post date: [November 5, 2021, 6:31pm UTC](https://discourse.vtk.org/t/vtkimplicitfunction-settransform-not-working/7089/1 "2021-11-05T18:31:25Z")

</div>

Hi everyone,

I am having an issue with the transform of the VtkImplicitFunction.  
I have the following code work:  
baseTransform is a defined vtkTransform

```
vtkSmartPointer<vtkSphere> sphere = vtkSmartPointer<vtkSphere>::New();
double* newCenter;
newCenter = baseTransform->TransformDoubleVector(0.0, 0.0, 0.0);
sphere->SetCenter(newCenter);
sphere->SetRadius(2.0);

```

And the following is not working properly:

```
vtkSmartPointer<vtkSphere> sphere = vtkSmartPointer<vtkSphere>::New();
sphere->SetCenter(0.0, 0.0, 0.0);
sphere->SetRadius(2.0);
sphere->SetTransform(baseTransform);

```

Anyone knows what I am missing?  
Thank you!

---

<div class="post-metadata">

### Author: ![Hanxin\_Hua](https://discourse.vtk.org/user_avatar/discourse.vtk.org/hanxin_hua/32/3787_2.png) [@Hanxin\_Hua](https://discourse.vtk.org/u/Hanxin_Hua)
#### Post date: [November 5, 2021, 6:53pm UTC](https://discourse.vtk.org/t/vtkimplicitfunction-settransform-not-working/7089/2 "2021-11-05T18:53:51Z")

</div>

Found the solution!  
We need to add Inverse to the transform
