Navigation Cube

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.

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

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 or MITK so that you can spend time with implementing things that add value - your ideas, algorithms, workflows.

This example may help you, with C++/Python: AnatomicalOrientation, four annotated cube actors are generated for both left-handed and right-handed systems. There is also a link to the Python version.

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.

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.

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).

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