# How to create ResliceAxes from two points in vtkImageReslice

**URL:** https://discourse.vtk.org/t/how-to-create-resliceaxes-from-two-points-in-vtkimagereslice/466
**Category:** Support
**Created:** [March 12, 2019, 7:26pm UTC](https://discourse.vtk.org/t/how-to-create-resliceaxes-from-two-points-in-vtkimagereslice/466 "2019-03-12T19:26:07Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![richardander](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/r/c6cbf5/32.png) [@richardander](https://discourse.vtk.org/u/richardander)
#### Post date: [March 12, 2019, 7:26pm UTC](https://discourse.vtk.org/t/how-to-create-resliceaxes-from-two-points-in-vtkimagereslice/466/1 "2019-03-12T19:26:07Z")

</div>

I would like to use vtkImageReslice to get the cross section of a curve at a point P0.

To compute the reslixeAxes, I would like to use P0 and its neighboring point P1 to decisde the direction.

As you know, resliceAxes is a vtkMatrix4x4. I think it should be somehting as:

A, B, C, P0.x  
D, E, F, P0.y  
G, H, I, P0.z  
0, 0, 0, 1

Can anyone let me know how to compute the value of {A, B, … I} based on P0 and P1?

Thank you!
