# Sync VtkPlane with VtkPlaneSource vtkactor matrix

**URL:** https://discourse.vtk.org/t/sync-vtkplane-with-vtkplanesource-vtkactor-matrix/12551
**Category:** Support
**Created:** [October 26, 2023, 6:52pm UTC](https://discourse.vtk.org/t/sync-vtkplane-with-vtkplanesource-vtkactor-matrix/12551 "2023-10-26T18:52:23Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![wdw753951](https://discourse.vtk.org/user_avatar/discourse.vtk.org/wdw753951/32/7889_2.png) [@wdw753951](https://discourse.vtk.org/u/wdw753951)
#### Post date: [October 26, 2023, 6:52pm UTC](https://discourse.vtk.org/t/sync-vtkplane-with-vtkplanesource-vtkactor-matrix/12551/1 "2023-10-26T18:52:23Z")

</div>

```auto
    tubeFilter_->Update();
    vtkNew<vtkTransform> vtkTransform_c;
    vtkTransform_c->SetMatrix(cylinderActor_->GetMatrix());
    transFilter_->SetInputConnection(tubeFilter_->GetOutputPort());
    transFilter_->SetTransform(vtkTransform_c);
 
    cutter_->SetInputConnection(transFilter_->GetOutputPort());
    
    cutPlane_->SetOrigin(planeActor_->GetOrigin());
    cutPlane_->SetNormal(1,0,0);
    vtkNew<vtkTransform> vtkTransform;
    vtkTransform->SetMatrix(planeActor_->GetMatrix());
    cutPlane_->SetTransform(vtkTransform);
    cutter_->SetCutFunction(cutPlane_);
    
    cutter_->Update(); 

```

the cut line is not sync with my vtkplanesource, the cutline is somewhere else, i am using styletrackballactor to manipulate the cylinder and the planesource , please help me

---

<div class="post-metadata">

### Author: ![wdw753951](https://discourse.vtk.org/user_avatar/discourse.vtk.org/wdw753951/32/7889_2.png) [@wdw753951](https://discourse.vtk.org/u/wdw753951)
#### Post date: [October 27, 2023, 4:10pm UTC](https://discourse.vtk.org/t/sync-vtkplane-with-vtkplanesource-vtkactor-matrix/12551/2 "2023-10-27T16:10:17Z")

</div>

I have read the doc ,i find i need to inverse the matrix

```auto
vtktransform->inverse()

```

Tha’t ok,but how to use the vtkimageRslice to sync the plane  
I cant understand the cut matrix
