# Update crosslines in Multi planar reconstruction(MPR)

**URL:** https://discourse.vtk.org/t/update-crosslines-in-multi-planar-reconstruction-mpr/12357
**Category:** Support
**Tags:** code
**Created:** [September 25, 2023, 2:52am UTC](https://discourse.vtk.org/t/update-crosslines-in-multi-planar-reconstruction-mpr/12357 "2023-09-25T02:52:20Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Hedwig\_Huang](https://discourse.vtk.org/user_avatar/discourse.vtk.org/hedwig_huang/32/7745_2.png) [@Hedwig\_Huang](https://discourse.vtk.org/u/Hedwig_Huang)
#### Post date: [September 25, 2023, 2:52am UTC](https://discourse.vtk.org/t/update-crosslines-in-multi-planar-reconstruction-mpr/12357/1 "2023-09-25T02:52:20Z")

</div>

Hey there, I am using VTK-8.0 for MPR, which is initialing 3 windows of axial,coronal and sagittal plane, and each plane with 2 crosslines in it.  
With moving slice is correct while my rotation is wrong! For example:

1. I grabbed `line1` in `plane3` and rotate the line.
2. As a result, `plane1`’s slice is changing and display is updating, and the `line3` of `plane1` stands still, while `line2` is rotating.  
_refer to Slicer, the crossline(`line2`/`line3`) in `plane1` will rotate because the rotation of `plane1`._

**My crossline updation is like:** each time update the current renderwindow with calculating the crossline of two plane(the plane is defined with one point and the parallel vector), and then the crossline is project to the current plane as a sech, then add polyline to the crossshape(the shapedata I defined myself).

The update order is like:  
-GradMouseButtonHangOn/Release  
-GetTheRotationMatrixWithMousePoint  
-GetTheFlipAngle-NotifyWithResetTheRotatedPlaneOrientZ/Origin  
-UpdateRender(ImageMapper/ImageActor/WindowLevel/Camera…Modified)  
-UpdateDecorators-UpdateCrosslines(See the description above)  
-RendererWindowUpdate(`vtkTypeMacro(wRenderWindow, vtkWin32OpenGLRenderWindow);`)

It’s very ok for me if you need more details and looking for some advice! Thanks a lot!!!
