# Navigation Cube

**URL:** https://discourse.vtk.org/t/navigation-cube/2258
**Category:** Support
**Created:** [December 12, 2019, 2:07am UTC](https://discourse.vtk.org/t/navigation-cube/2258 "2019-12-12T02:07:27Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Yongun\_Lee](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/y/6f9a4e/32.png) [@Yongun\_Lee](https://discourse.vtk.org/u/Yongun_Lee)
#### Post date: [December 12, 2019, 2:07am UTC](https://discourse.vtk.org/t/navigation-cube/2258/1 "2019-12-12T02:07:27Z")

</div>

Hello.

I used the vtk example to load the DICOM image and see the MPR and RAYCAST. The patient head was intuitive in direction, but thought that other parts of the body should be guided because it can be confusing.

I want to create a small navigation cube that knows the volume rendering direction.

Cube Actions:  
This navigation cube has text on each plane. (‘Front’, ‘back’, ‘top’, bottom ‘,’ left ‘,’ right ')  
It is unaffected by zoom and WWL, and does not change position or size, and rotates as the volume rendering rotates.

Which class and example should I reference to implement?  
I have been searching most of vtkSample, Class List and other users’ posts for about two weeks, but it’s hard to find the answer myself.  
I would appreciate a hint.

thank you.

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [December 12, 2019, 2:36am UTC](https://discourse.vtk.org/t/navigation-cube/2258/2 "2019-12-12T02:36:04Z")

</div>

See implementation of the exact feature that you describe, but with some extras (it can switch between displaying a small human figure, cube, or axis arrows; with 3 size presets; works for both 3D and slice views): [https://github.com/Slicer/Slicer/blob/master/Libs/MRML/DisplayableManager/vtkMRMLOrientationMarkerDisplayableManager.cxx](https://github.com/Slicer/Slicer/blob/master/Libs/MRML/DisplayableManager/vtkMRMLOrientationMarkerDisplayableManager.cxx)

It seems that you are developing a medical image viewer and you are in the process of reimplementing basic features. This is a good learning exercise, so if the goal is to learn some C++/Python and VTK programming then go on. If the goal is to have a functional image viewer/analysis application then I would recommend to customize/extend an existing open-source framework, such as [3D Slicer](https://www.slicer.org) or MITK so that you can spend time with implementing things that add value - your ideas, algorithms, workflows.

---

<div class="post-metadata">

### Author: ![amaclean](https://discourse.vtk.org/user_avatar/discourse.vtk.org/amaclean/32/224_2.png) [@amaclean](https://discourse.vtk.org/u/amaclean)
#### Post date: [December 13, 2019, 5:53am UTC](https://discourse.vtk.org/t/navigation-cube/2258/3 "2019-12-13T05:53:54Z")

</div>

This example may help you, with C++/Python: [AnatomicalOrientation](https://lorensen.github.io/VTKExamples/site/Cxx/VisualizationAlgorithms/AnatomicalOrientation/), four annotated cube actors are generated for both left-handed and right-handed systems. There is also a link to the Python version.

---

<div class="post-metadata">

### Author: ![Yongun\_Lee](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/y/6f9a4e/32.png) [@Yongun\_Lee](https://discourse.vtk.org/u/Yongun_Lee)
#### Post date: [December 17, 2019, 9:14am UTC](https://discourse.vtk.org/t/navigation-cube/2258/4 "2019-12-17T09:14:47Z")

</div>

What I want is to apply the features in the 3D Slicer to our product.  
I was able to get a glimpse of how far it was possible using VTK.  
Thank you.

---

<div class="post-metadata">

### Author: ![Yongun\_Lee](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/y/6f9a4e/32.png) [@Yongun\_Lee](https://discourse.vtk.org/u/Yongun_Lee)
#### Post date: [December 17, 2019, 9:17am UTC](https://discourse.vtk.org/t/navigation-cube/2258/5 "2019-12-17T09:17:06Z")

</div>

Thank you.

The example in the link you shared works perfectly. This is exactly what I want.  
I added it to vtkWin32OpenGLRenderWindow but I can’t see the AnnotatedCube. I don’t know what the problem is.  
Doesn’t it work with vtkWin32OpenGLRenderWindow?  
i used vtkWin32OpenGLRenderWindow, vtkWin32RenderWindowInteractor and vtkRenderer.

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [December 18, 2019, 3:58am UTC](https://discourse.vtk.org/t/navigation-cube/2258/6 "2019-12-18T03:58:26Z")

</div>

> [@Yongun\_Lee](#):
>
> What I want is to apply the features in the 3D Slicer to our product.

Just to clarify, you can use 3D Slicer in your product or as a basis of your product - as it has been done many times before. Most companies prefer not to disclose such details publicly, but a few of them agreed to it (see examples [here](https://www.slicer.org/wiki/CommercialUse#Slicer_Based_Products_and_Product_Prototypes)).

---

<div class="post-metadata">

### Author: ![Yongun\_Lee](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/y/6f9a4e/32.png) [@Yongun\_Lee](https://discourse.vtk.org/u/Yongun_Lee)
#### Post date: [December 18, 2019, 6:42am UTC](https://discourse.vtk.org/t/navigation-cube/2258/7 "2019-12-18T06:42:42Z")

</div>

> [@lassoan](#):
>
> Just to clarify, you can use 3D Slicer in your product or as a basis of your product - as it has been done many times before. Most companies prefer not to disclose such details publicly, but a few of them agreed to it (see examples [here](https://www.slicer.org/wiki/CommercialUse#Slicer_Based_Products_and_Product_Prototypes)).

thank you. But we want to add features to the product without calling third party products…
