# How to display the direction of the slices?

**URL:** https://discourse.vtk.org/t/how-to-display-the-direction-of-the-slices/7773
**Category:** Web
**Created:** [February 4, 2022, 12:58pm UTC](https://discourse.vtk.org/t/how-to-display-the-direction-of-the-slices/7773 "2022-02-04T12:58:33Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![dexter](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/dc4da7/32.png) [@dexter](https://discourse.vtk.org/u/dexter)
#### Post date: [February 4, 2022, 12:58pm UTC](https://discourse.vtk.org/t/how-to-display-the-direction-of-the-slices/7773/1 "2022-02-04T12:58:34Z")

</div>

Hey I’m using ResliceCursorWidget to display an MPR viewer like in the example in the website:

> **[vtk.js](https://kitware.github.io/vtk-js/examples/ResliceCursorWidget.html)**
>
> ResliceCursorWidgetLive example Sourceimport 'vtk.js/Sources/favicon';// Load the rendering pieces we want to use (for both WebGL and WebGPU)import 'vtk.js/Sources/Rendering/Profiles/A

I need to display the directions (Right- Left- Below -Above- Posterior, Anterior ) in each View of the 3 views, Like this example:

 ![image](https://discourse.vtk.org/uploads/default/original/2X/1/1217412d3b86f043ba8dfc70161bcf5fa1ab2aa6.png)

---

<div class="post-metadata">

### Author: ![finetjul](https://discourse.vtk.org/user_avatar/discourse.vtk.org/finetjul/32/154_2.png) [@finetjul](https://discourse.vtk.org/u/finetjul)
#### Post date: [February 4, 2022, 2:43pm UTC](https://discourse.vtk.org/t/how-to-display-the-direction-of-the-slices/7773/2 "2022-02-04T14:43:41Z")

</div>

This does not exist as of now.  
You might want to create a 2D actor and render text similarly to how it is done in vtkCubeAxes).  
Alternatively you could implement it simply in HTML.  
Hth,  
J.

---

<div class="post-metadata">

### Author: ![dexter](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/dc4da7/32.png) [@dexter](https://discourse.vtk.org/u/dexter)
#### Post date: [February 4, 2022, 2:55pm UTC](https://discourse.vtk.org/t/how-to-display-the-direction-of-the-slices/7773/3 "2022-02-04T14:55:28Z")

</div>

So is there a way to know to know directions from the VTI file? or from the Actor?  
Thank you for your answer

---

<div class="post-metadata">

### Author: ![finetjul](https://discourse.vtk.org/user_avatar/discourse.vtk.org/finetjul/32/154_2.png) [@finetjul](https://discourse.vtk.org/u/finetjul)
#### Post date: [February 4, 2022, 2:59pm UTC](https://discourse.vtk.org/t/how-to-display-the-direction-of-the-slices/7773/4 "2022-02-04T14:59:38Z")

</div>

You can get the information from the Camera (getPosition(), getFocalPoint() and getViewUp() should be all you need).

---

<div class="post-metadata">

### Author: ![dexter](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/dc4da7/32.png) [@dexter](https://discourse.vtk.org/u/dexter)
#### Post date: [February 8, 2022, 10:05am UTC](https://discourse.vtk.org/t/how-to-display-the-direction-of-the-slices/7773/5 "2022-02-08T10:05:15Z")

</div>

Thank you for your answer,
