ResliceCursorWidget that display the locations in .VTK file

Hey,

I’m using ResliceCursorWidget to dispay the 3 directions of the brain slices (.VTI file) like in the example in the official website,

I need the last container to show the 3D VTK actor and a little sphere in it that position itself after each manipulation of the ResliceCursorWidget crosshairs

image

I don’t know how to achieve that, thank you for your help

What is the sphere for ?
have you considered vtkSphereSource with vtkActor ?

The sphere is for the 3D position, it positions itself inside the .VTK geometry in term of X,Y,Z fixed by crossahirs in the other renderers.
Yes but I don"t know how to use ResliceCursorWidget to position vtkSphereSource inside a 3D .VTK geometry after we manipulate the crosshairs.

Thank you

It does not seem that the ResliceCursorWidget should be the one positionning the sphere source.
What is the sphere representing ? A fixed point in 3D world or a moving point ?

I’m sorry if I’m not explaining well, The idea is, to replace the actual last container:

image

In that last container we can see the 3 slices combined in a 3D representation, and if we manipulate the crosshairs of other renderers (X,Y and Z) we can see the slice in the 3D representation of the 3 slices last container) changes position, to target a point in the 3D reprenstation that define where X and Y and Z meet => this is exactly what I need to do but with the .VTK 3D actor.

Yes a moving point that moves on every change of the crosshair either X or Y or Z.

You need to create a sphere source with an actor and mapper.
Add the actor in the 3D view renderer.
Then each time updateReslice() is called, you call setOrigin() on the sphere actor with the center of the reslice cursor widget state.

1 Like